What kinds of things would you want in the GNU OS?

Barry Shein bzs at bu-cs.BU.EDU
Thu Jun 1 10:07:32 AEST 1989


From: les at chinet.chi.il.us (Leslie Mikesell)
>That's what I thought, but I can't see where it would be useful, except
>perhaps to make up for certain OS functions that might be lacking
>like the ability to cheaply determine that no I/O is pending on any
>of several channels so you can continue doing some work without needing
>a new thread.  Wouldn't there be a problem with static data in
>library routines (or anywhere else)?

One obvious use of threads is on a parallel machine where each thread
gets its own CPU (if available, but that's a resource scheduling
issue.) The ability to start up threads quickly and cheaply is
fundamental to being useful since waiting as long to get started
(latency) as it would have taken to do the computation on one
processor is useless.

Consider the following simple example:

	Read large array
	Partition array for N CPUs
	Start a thread on each partition searching for some value

If it takes 1 second to search on a uni-processor it had better take
less than 1/10 of a second to start each of 10 threads searching.

Of course, this doesn't mean that the current implementations of
"threads" are correct or even necessary. It just means what it means.

In particular consider gigabytes of memory and hundreds of CPUs
available. Most unix fork() implementations can't begin to take any
advantage of such configurations, yet they're becoming available
rapidly.

-- 
	-Barry Shein

Software Tool & Die, Purveyors to the Trade
1330 Beacon Street, Brookline, MA 02146, (617) 739-0202



More information about the Comp.unix.wizards mailing list