1. Processes
-
process = running program
with associated address space, registers (PC, SP, FP), and I/O
time sharing = virtualized CPU
context switch mechanism, scheduling policy
process API: create, kill, wait, control, status
2. Loading
3. States
4. Trace: CPU
5. Trace: CPU and I/O
6. Exercises
-
Exercises from the book using process-run.py:
1. Run process-run.py with the following flags: -l 5:100,5:100. What should the CPU utilization be (e.g., the percent of time the CPU is in use?) Why do you know this? Use the -c and -p flags to see if you were right.
2. Now run with these flags: ./process-run.py -l 4:100,1:0. These flags specify one process with 4 instructions (all to use the CPU), and one that simply issues an I/O and waits for it to be done. How long does it take to complete both processes? Use -c and -p to find out if you were right.
3. Switch the order of the processes: -l 1:0,4:100. What happens now? Does switching the order matter? Why? (As always, use -c and -p to see if you were right)