Shell Scripts v. Command Options

John F Haugh II jfh at rpp386.cactus.org
Sat Jan 19 11:15:51 AEST 1991


In article <1249:Jan1811:37:3991 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>Your test is extremely misleading. On one system I manage, the page size
>is 64K, and practically every executable is at least two pages. Guess
>what? fork() takes a *noticeable* amount of real time, simply because
>the machine spends so long loading from disk. But with several users
>running programs from several different disks, everything overlaps
>nicely and the total time spent is relatively small. I suspect the same
>is true of the systems you test---every fork() takes 30 or 50 ms, but
>many of them can overlap at once.

Had you looked at the test data you would see that the CPU time is
actually spent in the kernel executing code.  The load during this
test is 100% CPU utilization - there was no time available to overlap
CPU and I/O cycles.

In the case you gave of a large page size architecture, fork() should
still take very little time since there need not be any physical I/O
unless the available memory is consumed - fork() does not load a new
image from disk, but rather copies the existing user structure, makes
a few modifications and dopes around with page tables or the data
pages themselves.

An exec() test would illustrate any weakness in the exec() code caused
by large page sizes.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org
"While you are here, your wives and girlfriends are dating handsome American
 movie and TV stars. Stars like Tom Selleck, Bruce Willis, and Bart Simpson."



More information about the Comp.bugs.sys5 mailing list