心得分享

Card image cap

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

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

1.what kind of strategies we can have for using thread pools?
A: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.?
A:Because each kernel thread is actually a different kernel-schedulable entity, multiple threads can run concurrently on different processors. It can achieve significant speedups when migrated from uniprocessors to multiprocessors.
3.specify the differences between processes and threads.
The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.

Each process provides the resources needed to execute a program. A process has a virtual address space, executable code, open handles to system objects, a security context, a unique process identifier, environment variables, a priority class, minimum and maximum working set sizes, and at least one thread of execution.

A thread is the entity within a process that can be scheduled for execution. All threads of a process share its virtual address space and system resources. In addition, each thread maintains exception handlers, a scheduling priority, thread local storage, a unique thread identifier, and a set of structures the system will use to save the thread context until it is scheduled.

更新日期:2016/1/4 下午 08:15:52