心得分享

Card image cap

王同學 作品集 分享經驗 12/11 OS 12/11 OS

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

1.Next homework will be what kind of strategies we can have for using thread pools

Thread pool can be used to fetch a big amount of file, when there is thousand even million of web page to fetch

, but our computer don’t have the ability to create that much thread, thats the time when thread pool to be use,
simply after fetching an amount of file, the computer will get the next thread from thread pool to keep on running, the advantage of this method is that it can improve the performance of processing these thread ,speeding up the thread load in time.

2.The next question for chapter 4 is why the windows uses one to one mapping for the threads while there are many to many available.

Because one-to-one model maps each user thread to a kernel thread, and it will limit the number
of threads so the utility of computing won't be slow down.
Also, one-to-one model can work efficiently on concurrent.

One-to-one model is use for spetial threads while many-to-many model is use for usual threads.

3.The third question for chapter 4 is to specify the differences between processes and threads.

Here’s a summary of the differences between threads and processes:

1. Threads are easier to create than processes since they
don't require a separate address space.

2. Multithreading requires careful programming since threads
share data strucures that should only be modified by one thread
at a time. Unlike threads, processes don't share the same
address space.

3. Threads are considered lightweight because they use far
less resources than processes.

4. Processes are independent of each other. Threads, since they
share the same address space are interdependent, so caution
must be taken so that different threads don't step on each other.
This is really another way of stating #2 above.

5. A process can consist of multiple threads.

更新日期:2015/12/18 上午 12:42:16