Message-ID: <3C32DBD3.B9C9CE5@dit.upm.es>
Date: Wed, 02 Jan 2002 11:07:15 +0100
From: Javier Sedano <jsedano@dit.upm.es>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.18pre21 i686)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.minix
Subject: Re: A bit more memory neede
References: <3C299C9E.72E28261@dit.upm.es> <slrna2p2mh.ea5.pienjo@mud.stack.nl> <3C2CC72F.74E7102F@dit.upm.es> <slrna2pog5.ugv.pienjo@mud.stack.nl>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Original-NNTP-Posting-Host: taran.dit.upm.es
X-Original-Trace: 2 Jan 2002 12:12:27 +0100, taran.dit.upm.es
Lines: 95
NNTP-Posting-Host: 138.4.2.12
X-Trace: 2 Jan 2002 11:07:29 +0100, 138.4.2.12
Path: bunyip.cc.uq.edu.au!news1.optus.net.au!optus!priapus.visi.com!news-out.visi.com!hermes.visi.com!wesley.videotron.net!logbridge.uoregon.edu!news.rediris.es!news-2.rediris.es!138.100.251.9.MISMATCH!news.upm.es!news.dit.upm.es!taran.dit.upm.es
Xref: bunyip.cc.uq.edu.au comp.os.minix:38106
X-Cache: nntpcache 1.0.7.1 (see ftp://suburbia.net/pub/nntpcache)

Martijn van Buul wrote:
> 
> There should be a getty running for each 'free' terminal. Keep in mind that
> it is replaced by login (and the shell, in that order) when you're logging
> in.
> 

Ouch! That's why I couldn't see any getty: I was logged in both tty's
;-)

> 
> > Can I hack it to run always a shell?
> 
> Yes, see /etc/inittab (and man 5 inittab)
> 

RTFM, RTFM, RTFM, RTFM, RTFM,... (can I cut-paste it up to 1000 times?
;-)


> 
> It can only swap out processes waiting on certain calls to MM (most notably:
> wait()). A process waiting on FS cannot be swapped out. To be more precise,
> it cannot be swapped back in ;)
> 
> Consider this:
> 
> A process (waiting on FS) is swapped out. FS has the requested data handy,
> and wants the data segment of the swapped out program back in order to
> resume working. It would detect that the process is swapped out, and call
> MM to do some more swapping to get things straight. However, in order to do
> so, MM needs the assistance of FS to do the actual disk IO. FS how ever is
> waiting on a reply from MM, and will continue do so. MM is waiting on FS
> to do it's thing, but considering that FS is single-threaded, they're both
> waiting for eachother.
> 
> Bingo: Deadlock.
> 
> Ironically, a *runnable* process can be swapped out just like that.
> Unfortunately, those are the worst processes to swap out.
> 
> The MM only swaps out data segments too. Code segments would need a reference
> counter before they could be swapped out. If two processes are sharing
> one code segment, both processes need to be swapped out before it's safe
> to swap out the code segment. Things get rather complicated when a third
> copy of the process is started.
> 

Let's try to recall a few of the knowledge achieved from the reading of
"Operating Systems, blah". Can a kind of buffering be tried? I'll
explain: when the FS receives a message, the sender is stored in the
message itself, isn't it? So if the message came from the MM subsystem,
the "answer" goes to the MM itself. But if the message came from any
other process, the "answer" goes to a "buffering process".

That "buffering process" just fordwards the "answer" to the given
process, maybe signaling MM first to swap it in, if needed.

That way, the FS process is allways free to receive the MM messages,
even when a message from FS is virtually not sent yet.

Uhm... I need to buy the 2nd edition of the book and play on this...

> 
> It's somewhere on my todo list - quite near to "take over the world". My
> todo list is a bit of a FIRONO-queue ("First In, Random Or Never Out")
> as of lately.
> 

XDDD

In Spanish TODO means something like "everything". Once a day, a friend
of mine was reading a TODO list and told: "Look at this, 'everything' is
here" ("Mira, aqu est 'todo'") XDDDD. Since that, I think on my TODO
list in that way ;-)

> 
> This is more or less the idea EMS used. Their windows were bigger, for
> efficiency's sake.
> 
> (EMS stands for Expanded Memory System, by the way. An idea of Lotus, Intel
>  and Microsoft). It was the only way to access more than 1 MB of memory
> on a 8086 (or a more modern PC in real mode).
> 

Uhm... can I still buy one of those cards (8 bit ISA)? I suposse they
need help from the OS to be seen as memory. How did MSDOS it, not having
the concept of swap?

--
El README es para los cobardes. Se valiente: ejecuta.
----
Javier Sedano Jarillo            jsedano@dit.upm.es(*)
Dep. de Ingeniera Telemtica    jsedano@ieee.org
Univ. Politcnica de Madrid      jsedano@it.uc3m.es
