12/17 12/11 OS作業

名稱
12/11 OS作業
日期
12/17
課程名稱
作業系統
指導教師
劉艾華
心得
1.what kind of strategies we can have for using 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?
One-to-one model provides more concurrency. It also another thread to run when a thread makes a blocking system call. It supports multiple thread to execute in parallel on microprocessors.


3. specify the differences between processes and threads.
process is an executing instance of an application. A thread is a path of execution within a process. Also, a process can contain multiple threads. When you start Word, the operating system creates a process and begins executing the primary thread of that process.
It’s important to note that a thread can do anything a process can do. But since a process can consist of multiple threads, a thread could be considered a ‘lightweight’ process. Thus, the essential difference between a thread and a process is the work that each one is used to accomplish. Threads are used for small tasks, whereas processes are used for more ‘heavyweight’ tasks – basically the execution of applications.
Another difference between a thread and a process is that threads within the same process share the same address space, whereas different processes do not. This allows threads to read from and write to the same data structures and variables, and also facilitates communication between threads.