home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!howland.reston.ans.net!zaphod.mps.ohio-state.edu!swrinde!emory!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!gmdtub!ceres.fokus.gmd.de!jbm
- From: jbm@fokus.gmd.de (Joerg Micheel)
- Newsgroups: comp.unix.wizards
- Subject: Re: a novice unix internals question
- Message-ID: <1992Dec21.171809.11037@fokus.gmd.de>
- Date: 21 Dec 92 17:18:09 GMT
- References: <1992Dec16.081648.22123@sbcs.sunysb.edu> <1992Dec20.225210.9418@thunder.mcrcim.mcgill.edu>
- Sender: news@fokus.gmd.de (News system)
- Organization: GMD-Fokus (Berlin)
- Lines: 44
-
- In article <1992Dec20.225210.9418@thunder.mcrcim.mcgill.edu>, mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- |> In article <1992Dec16.081648.22123@sbcs.sunysb.edu>, synchem@sbcs.sunysb.edu (Synchem proj acct) writes:
- |>
- |> > In the Leffler 4.3BSD Unix book, it was discussed that the run-time
- |> > structure of the kernel is divided into a top and a bottom half.
- |> > [...] My question is, which process does the bottom half belong
- |> > to[?]
- |>
- |> As you guess (in text I deleted), bottom-half routines do not
- |> inherently belong to any process. If they correspond to a device that
- |> is being used by only one process, they could be thought of as
- |> belonging to that process, but the code is generally not written to
- |> correspond to this, and for some devices (eg, disks) it doesn't even
- |> really make sense. There usually is some process current when the
- |> bottom half runs, but it bears no relation to anything in particular;
- |> it's simply whatever process happened to have the cpu when the
- |> interrupt happened. If the machine isn't busy, it's even reasonably
- |> likely that the interrupt happened during the idle loop. (For example,
- |> the bottom half cannot count on any given process being incore. Some
- |> things are kept incore even for swapped processes, like the proc struct
- |> in 4.3; these can of course be used once the correct one is found. But
- |> the u area may be swapped....)
-
- I completely agree with you, but have to mention, that the deamon book isn't
- as strict as you with these semantics. In particular (page 46) Entry to the
- Kernel they say: "When a process enters the kernel trough a system call, a
- trap, or an interrupt, the kernel must ....". Aha. So the process currently
- running enters the kernel, when an interrupt occurs ?! Yes and no. I guess
- that CSRG people were just playing a bit with the term of a process (like:
- everybody dealing with these things knows, what happens, so why bother ? ;-).
- It's true, that the interrupt thread is completely unrelated to the process
- running, but the process get's charged for the time of interrupt processing
- (see the statement in kern_clock.c to hardclock()).
- I think that things might get clearer, when talking about threads instead
- of processes.
-
- Just thoughts ...
-
- Joerg
-
- --
- GMD German National Research Center for Computer Science
- FOKUS Open Communication Systems Research Center
- Berlin, Germany
-