[comp.unix.internals] What is the kernel doing?

palowoda@fiver (Bob Palowoda) (11/14/90)

 I'm curious, I was running umon386 and watching my system when there was
no activity. I notice that a rawch read causes a process switch. And in turn
it appears that the pwitch causes a iget, namei and dirblk. I assume the  
latter are disk access. Why does it do this?

---Bob

-- 
Bob Palowoda   palowoda@fiver              |   *Home of Fiver BBS*
Home {sun}!ys2!fiver!palowoda              | 415-623-8809 1200/2400
     {pacbell}!indetech!fiver!palowoda     |     An XBBS System                
Work {sun,pyramid,decwrl}!megatest!palowoda| 415-623-8806 1200/2400/19.2k TB+

bzs@world.std.com (Barry Shein) (11/15/90)

> I'm curious, I was running umon386 and watching my system when there was
>no activity. I notice that a rawch read causes a process switch. And in turn
>it appears that the pwitch causes a iget, namei and dirblk. I assume the  
>latter are disk access. Why does it do this?

Looks like it's updating the access time for the /dev/ inode associated
with the device. Not sure why it's going thru namei() tho.
-- 
        -Barry Shein

Software Tool & Die    | {xylogics,uunet}!world!bzs | bzs@world.std.com
Purveyors to the Trade | Voice: 617-739-0202        | Login: 617-739-WRLD

boyd@necisa.ho.necisa.oz (Boyd Roberts) (11/16/90)

In article <1990Nov14.092733.456@fiver> palowoda@fiver.UUCP (Bob Palowoda) writes:
> I'm curious, I was running umon386 and watching my system when there was
>no activity. I notice that a rawch read causes a process switch. And in turn
>it appears that the pwitch causes a iget, namei and dirblk. I assume the  
>latter are disk access. Why does it do this?
>

I think you've got it around the wrong way.  iget, namei and dirblk [sic]
will cause process switches.


Boyd Roberts			boyd@necisa.ho.necisa.oz.au

``When the going gets wierd, the weird turn pro...''

palowoda@fiver (Bob Palowoda) (11/16/90)

From article <1940@necisa.ho.necisa.oz>, by boyd@necisa.ho.necisa.oz (Boyd Roberts):
> In article <1990Nov14.092733.456@fiver> palowoda@fiver.UUCP (Bob Palowoda) writes:
>> I'm curious, I was running umon386 and watching my system when there was
>>no activity. I notice that a rawch read causes a process switch. And in turn
>>it appears that the pwitch causes a iget, namei and dirblk. I assume the  
>>latter are disk access. Why does it do this?
>>
> 
> I think you've got it around the wrong way.  iget, namei and dirblk [sic]
> will cause process switches.

 Hmm, maybe. The only thing I noticed is when I hit the <space bar> I assumed
it caused a raw character read. And in turn a process context switch. The
inode functions <a guess here> is some sort of sync with the open stdio to
the cache. namei gets a inode from the current path and as Brian said
"don't know what this is doing exactly". Why it does 5 directory block 
access is still got me confused. For one character? I am confident it was
me hitting the space bar. I waited inbetween the cache to disk syncs to 
do it. Guess it's time to get the books out.

---Bob

-- 
Bob Palowoda   palowoda@fiver              |   *Home of Fiver BBS*
Home {sun}!ys2!fiver!palowoda              | 415-623-8809 1200/2400
     {pacbell}!indetech!fiver!palowoda     |     An XBBS System                
Work {sun,pyramid,decwrl}!megatest!palowoda| 415-623-8806 1200/2400/19.2k TB+

mjr@hussar.dco.dec.com (Marcus J. Ranum) (11/16/90)

In article <1990Nov16.082554.14085@fiver> palowoda@fiver (Bob Palowoda) writes:

> [...] when I hit the <space bar> I assumed
>it caused a raw character read. And in turn a process context switch. The
>inode functions <a guess here> is some sort of sync with the open stdio to
>the cache. namei gets a inode from the current path and as Brian said
>"don't know what this is doing exactly". Why it does 5 directory block 
>access is still got me confused. For one character?

	That does sound rather bizarre - is it possible that whatever shell
is reading the space bar is doing something awful like checking the last
update on mailboxes or setting $cwd or something like that ? Yeah, I *KNOW*
it shouldn't do that, but with all the hokey stuff people put in their
shells these days, who knows ? :) Maybe a really braindead file name
completion routine ?

	Of course, I could be waaay off base here, since I missed the start
of this thread. Are you typing this Space Bar of Doom into some command
interpreter or other, or does your monitor somehow ignore stupid things
the application might be doing ?

mjr.
-- 
"When choosing between two evils, give preference to the council of your
tummy over that of your testes. The history of mankind is full of disasters
that could have been averted by a good meal, followed by a nap on the couch."
		-Me, as explained to me by my wife's cat Strummer.