[371] in Pthreads mailing list archive
Re: Newbie to threads mailing list
daemon@ATHENA.MIT.EDU (Rob Browning)
Thu Jul 25 18:58:42 1996
To: "Brynn D. Rogers" <brynn@wwa.com>
Cc: pthreads@MIT.EDU
From: Rob Browning <osiris@cs.utexas.edu>
Date: 25 Jul 1996 17:46:08 -0500
In-Reply-To: "Brynn D. Rogers"'s message of Thu, 25 Jul 1996 13:36:57 -0500 (CDT)
"Brynn D. Rogers" <brynn@wwa.com> writes:
> What difference does it make between having say 3 threads to do my
> work instead 3 processes?
Threads are generally lighter weight (less context) than processes. A
C level thread generally captures the stack and the program counter
and perhaps a little thread specific state. A process (by definition?
(at least in unix)) is much "bigger" since it has it's own address
space. A process is what you generally think of as an independent
"program". Funky (but cool) OSes like Mach (and the HURD?) have begun
to blur this distinction some.
> I would want the three to run at different priority levels.
I'm not sure whether or not pthreads has any idea about priorities. I
haven't needed them yet, so I haven't looked. Having real thread
blocking IO eliminated many of the places I might have cared about
priorities.
> Also, what function do I call to change the priority of a thread or
> process?
For processes, see "man nice" and "man 2 nice".
--
Rob