=AlexD= (22.10.2007 14:51, просмотров: 194) ответил =AlexD= на Абисняю.
+++ http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html
K.1: What is the implementation model for LinuxThreads?
LinuxThreads follows the so-called "one-to-one" model: each thread is actually a separate process in the kernel. The kernel scheduler takes care of scheduling the threads, just like it schedules regular processes. The threads are created with the Linux clone() system call, which is a generalization of fork() allowing the new process to share the memory space, file descriptors, and signal handlers of the parent.
Advantages of the "one-to-one" model include:
* minimal overhead on CPU-intensive multiprocessing (with about one thread per processor);
* minimal overhead on I/O operations;
* a simple and robust implementation (the kernel scheduler does most of the hard work for us).
The main disadvantage is more expensive context switches on mutex and condition operations, which must go through the kernel. This is mitigated by the fact that context switches in the Linux kernel are pretty efficient.
Три кита на которых зиждется реклама: враньё, преувеличение, замалчивание. Новости СМИ - это политическая реклама.