12/15 12/11 OS作業

名稱
12/11 OS作業
日期
12/15
課程名稱
作業系統
指導教師
劉艾華
心得
1. Next homework will be what kind of strategies we can have for using thread pools.

Ans: 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.
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.

ANS: 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.

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

ANS: 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.