12/18 OS作業 | |
---|---|
名稱 | OS作業 |
日期 | 12/18 |
課程名稱 | 作業系統 |
指導教師 | 劉艾華 |
ONE:Next homework will be what kind of strategies we can have for using thread pools.
Ans of ONE: ThreadPool initialize some threads and use in specific times, in order to saving time.
ThreadPool can help manage each cycle of the thread, it makes us can be more concentrate to work, and no write the code of the thread.
TWO: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.
ANS of TWO:The mode of Windows use is one-to-one, each of the thread in user layer response to a kernel thread. And Windows also provide fiber library. This library provide many-to-many function. With using the library of the threads, each of the threads belong to a process and access the virtual address space of this process.
THREE:The third question for chapter 4 is to specify the differences between processes and threads.
ANS of THREE:Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.
更新日期:2015/12/18 上午 02:25:28