lkml.org 
[lkml]   [1997]   [Feb]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromJerome Etienne <>
SubjectRe: wierd behaviour...
DateTue, 25 Feb 1997 10:06:56 +0100 (MET)
>       hi, i compile a c program
>
> main(){ fork();}      /* no while to do several fork(). so its safe */
>                       /* no danger for your computer */
>
> so when i run it, my harddrive is running. Even if i run it several times
> to be sure sure that the code is in buffers. i don't understand why my
> hd need to write or read something during or after this little program.
>
> any explaination ?
some answers me by email to suggest it is a atime update but i don't think
so. because "main(){}" doesn't read/write anything. any other classic 
unix tools like ls, ping etc... don't read/write anything immediatly on 
my hd...
i studied vmstat's io bo ("bo: Blocks received from a block device (blocks/s)"
from vmstat's manpage) and i see 4 new bo each time i run my source.

that comes from fork(), and the following source makes me think something
these 4 blocks is read when the child die.
main(){ if( !fork()) sleep(4); else sleep(2); }
any explaination ?

-- 
Jerome Etienne <jetienne at ifhamy.insa-lyon.fr> aim: being human, not ape
aim: Learn the core knowledge and deduce from it and the current context.
Thou shalt not make a machine in the likeness of a human mind. --- f.herbert

\
 
 \ /
  Last update: 2005-03-22 12:39    [from the cache]
©2003-2008