|
Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006
FreeBSD4.9 achieve the level is the core thread?
Today I see some articles : (from : http://www.cnfug.org/project/ffs/chapter1.5.2.html)
[code] "However, because the concept of threads Unix system itself does not exist, then there are two kinds of thread in Unix introduce more direct way.
The first is not kernel threads, and user procedures to achieve thread, which is actually a simulation of the thread, the thread switching and scheduling is in the process of internal users, such as user space on the way to the thread. This thread is very simple and the benefits, and the performance is also very good, because switching between threads in the process of internal users, switching overhead is relatively small. FreeBSD default mode on the use of this thread.
It is also very obvious shortcomings, the first full use of high-end SMP multi-processor server system advantages, as a process to deal with only one processor, and the second is due to user space thread switching in user space, a need to have a thread blocking system call and the whole process will be blocked. Other threads are blocked so that the actual situation in this thread concept is not allowed, but the actual realization of which are difficult to avoid entirely.
The second way is through the realization of the way to complete the revision process, the process of building methods can be used not fully in the process of creating a common information space in which Linux system calls for Clone (), and FreeBSD, it has to rfork (). This form is the basic thread handling of Linux, FreeBSD compatibility linuxthread reservoir can be used to achieve this thread.
Thread the realization of the process used to the advantage of multi-processor, and will also achieve the purpose of sharing data, but it is the actual cost of switching threads and processes is the same, thus spending more in core need. But in fact the process threads, problems still exist in many areas, such as the process identifier different threads inconsistent procedures for the implementation of multi-thread priority to a higher level than the thread, thread synchronization between the needs of the relatively large overhead, etc., and thus can not be regarded as satisfactory the thread.
Thus, although there are two different thread FreeBSD, but they have their own advantages and disadvantages, resulting in a multi-threaded applications on FreeBSD unsatisfactory performance under the status quo. "[/code]
FreeBSD4.9 now I would like to know, is whether or not the core level (also known as kernel-level) threads?
We hope that the discussion will give the best basis or source |
| |