SME
Operating Systems
Processes and threads
Use this for “A running process requests I/O. Which state does it enter?”
Sort
Which state does the process move to?
Tap a card, then tap its group.
Only a running process can block; a blocked one goes back to ready, never straight to running.
Assumptions
•
One CPU runs one process at a time; the others that could run wait in the ready queue.
•
A process that waits for an event (a disk read, a lock) is blocked and cannot be scheduled until it happens.
•
Each card is an event happening to a process; the group is the state it moves to.
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.
More problem types
Cost of a context switch
Use this for “The time slice is 10 ms and a context switch takes 0.1 ms. What share of the CPU time does useful work?”
Processes after n forks
Use this for “A program calls fork() 3 times in a row. How many processes are there at the end, and how many are children?”
CPU use with I/O waits
Use this for “Each process waits for I/O 80% of the time. With 4 processes in memory, how busy is the CPU?”