心得分享

Card image cap

陳同學 報告/作業 分享經驗 12/11 OS作業

12/11 OS作業
名稱 OS作業
日期 12/11
課程名稱 作業系統
指導教師 劉艾華老師

1.What kind of strategies we can have for using thread pools.

Unlimited treads could exhault system resources so we use a thread pools.
Create a number of threads at process startup and place them into a pool, where they sit

and wait for work.

2.Why the windows uses one to one mapping for the threads while there are many to many

available.

The one-to-one model creates a separate kernel thread to handle each user thread.
One-to-one model overcomes the problems listed above involving blocking system calls and

the splitting of processes across multiple CPUs.
However the overhead of managing the one-to-one model is more significant, involving

more overhead and slowing down the system.
Most implementations of this model place a limit on how many threads can be created.

3.To specify the differences between processes and threads.

Processes are the abstraction of running programs: A binary image, virtualized memory,

various kernel resources, an associated security context, and so on.
A process contains one or more threads. In single-threaded processes, the process

contains one thread. You can say the thread is the process—there is one thing going on.

In multithreaded processes, the process contains more than one thread—there's more than

one thing going on.
Threads are the unit of execution in a process: A virtualized processor, a stack, and

program state. Put another way, processes are running binaries and threads are the

smallest unit of execution schedulable by an operating system's process scheduler.

更新日期:2015/12/18 上午 02:05:27