linux & kernel multithreaded scheduling

Paul Barton-Davis (pbd@Op.Net)
Tue, 6 Oct 1998 10:32:27 -0400


what do I do under linux to create a process containing multiple
independent kernel threads (something like Solaris' LWP, or Mach
kernel threads in a task) ?

my guess: use clone(), with

CLONE_PID|CLONE_VM|CLONE_FS|CLONE_FILES

as the flags() argument.

Next, how do I stop such a process from hogging the CPU ? As far as I
can tell, the Linux scheduler pays no attention to the PID of a "task"
(a kernel thread in most other OS's). It seems to me that it would be
quite easy to create a multi-threaded process that stole time very
effectively, while the whole time the scheduler thought it was being
fair.

This seems unfortunate. Is it true ?

--pbd

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/