★ Shared and Private Items ¥ 斗 ★★ Per process items Per thread items Address space Program counter Global variables Registers Open files Stack Child processes State Pending alarms Signals and signal handlers Accounting information
21 Shared and Private Items Per process items Per thread items Address space Program counter Global variables Registers Open files Stack Child processes State Pending alarms Signals and signal handlers Accounting information
★ Shared and Private Items ¥ 斗 ★★ Thread 2 Thread 1 Thread 3 Process Thread 1's stack 日自目 Thread 3s stack Kern Each thread has its own stack
22 Shared and Private Items Each thread has its own stack
★ A Word Processor w/3 Threads ¥ 斗 ★★ Display thread 兰民三 Backup thread Input thread Kernel Keyboard Disk
23 Input thread Backup thread Display thread A Word Processor w/3 Threads
★ Implementation of Thread ¥ 斗 ★★ o How many options to implement thread? o Implement in kernel space o Implement in user space o Hybrid implementation
24 Implementation of Thread How many options to implement thread? Implement in kernel space Implement in user space Hybrid implementation
★ Kernel-Level Implementation ¥ 斗 ★★ o Completely implemented in kernel space o oS acts as a scheduler s OS maintains information about threads In additions to processes
25 Kernel-Level Implementation Completely implemented in kernel space OS acts as a scheduler OS maintains information about threads – In additions to processes