ready queue -> cpu
I/O <- I/O queue <- I/O request
time slice expired, fork a child, wait for an interrupt
Scheduler Responsibility
- maintaining the ready queue
- decision on when to context switch
P1(web server) P2(Database)
mm, cpu
Inter Process communication
IPC mechanisms
-transfer data/info between address spaces
-maintain protection and isolation
Threads to the rescue!
threads -> multithreaded process -> core1, core2, core3 …
parallelization => speed up
specialization => hot cache!
efficiency => lower mm requirement & cheaper IPC
Are threads useful on a signle CPU?
or when (#of Threads) > (# of CPUs)?
t_ctx_switch -> t_idle -> t_ctx_switch