心得分享

Card image cap

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

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

1. What kind of strategies we can have for using thread pools? Name two of them.
Need time to create the thread prior to servicing the request.
Unlimited treads could exhault system resources...use 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 it has many-to-many available?
The one-to-one model allows for greater concurrency, but the developer has to be careful not to create too many threads within an application.
3. Please specify the differences between processes and threads.
Processes: In the world of computer programming, a process is an instance or execution of a program. Every process contains a program code and the existing activity. There can be more than one thread that may make up a particular process. Instructions may be executed concurrently. However, it will depend on the operating system being used.
Treads: Even with minimal system resources, threads are able to be executed simultaneously to attain a specified task. The reason is the fact that a thread is only an execution sequence. It is merely within a process and that is why it is also referred to as a “lightweight process”.

更新日期:2015/12/18 上午 01:24:13