Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism Review

At first this paper explains the advantage of multi-threading, and the importance of thread management.
Thread 的概念很重要,一个process, 如果要reponse to user input ,同时又要运行后台程序就必须要thread,否则只有等一件事情做完了,才能做下一个。这就是所谓的sequential executation, 这样效率低,同时也阻碍了现在流行multi-core
同时一个process 里面的thread 最重要的特征就是能share 许多资源,比如memory, CPU, I/O, 方便communication

Thread 分为:


Kernel thread: processor 可以分配资源,尤其对于multi-processor,容易把thread 分配在不同的CPU, 缺点是heavy overhead. 另外a process can register a thread as kernel thread. "Kernel thread is like virtual processor"
"Kernel thread is not always running, it only get opportunity to run at event such as timer interrupt"
"Kernel level threads have to be checked by kernel, in case of mess up the kernel"
It's one scheduling unit for kernel scheduler.


User-level thread: easy management, light overhead, good average performance without heavy system call such as I/O. Also it has fast creation time.
These threads are cooperative, kernel level threads have to do preemptive scheduling, kernel is not aware you have user-level thread."Every time you create a user level thread,you create(malloc) a heap." "Share File descriptor and memory"
Customization can be done inside user-level threads, it can choose its own scheduling mechanism, such as FIFO, different from OS scheduling.
"Explicit IO is file input or output and the example of implicit IO is Page Fault"




Q&A (in class)
Key difference between activation and kernel thread?
Kernel never restarts after it is blocked. "Kernel just notify you, not put it in read list"
The old activation blocks;
OS creates new activation, notifies user-level;
when the user thread is read again, OS creates new activation and upcalls
1.May require preemption of another activation
Down Call?
1.add more procs
2.this proc is idle
Critical Section:
1. Bad performance (chain re-action, the waiting thread will wait for the blocked thread)
2. Deadlock
Solution:
Recovery (Run the thread in critical activation to the end)

Why we don't have scheduler activation?
Kernel switch over-head is much larger than user-level thread switch, but the benefit is not apparent.

Improvement
这篇文章想结合两者的优点,方法是:让user-level thread 干kernel-level thread 的事情.提出了virtual multiprocessor which knows how many processor and the state of current thread in processor.
这样从program 的角度看,就像在bare-physical machine 运行一样
(这篇文章 address space == process)

Idle Process: how OS measures CPU utilization such as: 90% means  idle process uses 90% CPU.

评论

此博客中的热门博文

Embedded System interview Question

MicroKernel & Exokernel 操作系统未来可能的发展

2019/08 美国股市风险分析