Operating Systems and Systems Integration

Tutorial: Process Control Blocks

1. What is a process control block (pcb)?

2. Is a pcb only found in a Linux or posix os or is it found in all operating systems?

3. Give ONE other name for a pcb.

4. Give ONE name for the data structure that holds the pcbs.

5. Briefly define the term program counter.

6. What data is held in the program counter?

Process Control Blocks: In figure 1 on the following page we see three processes, P1, P2 and P3. There are seven moments in time where the main values of the pcbs of the three processes are shown. The time intervals are not equal; they are just where the scheduler changed the process. The size of all i^{/}o instructions is three bytes. In each pcb I have shown the program counter value, and the process state. The process state can be running (i.e., executing on the cpu), ready (i.e., ready to run), and sleeping (i.e., blocked). There are two queues shown: a wait queue for processes that are blocked waiting for i^{/}o, and a ready queue, for processes that are in the ready to run state.

1. State the technical term for what the scheduler does at each of the times t_{0}, t_{1}, t_{2}, t_{3}, t_{4}, t_{5} and t_{6}.

Tutorial: Process Control Blocks Operating Systems and Systems Integration

2

Figure 1: An example of three processes executing, showing their process control blocks. 2. Does process P1 perform i^{/}o? If so, at what address is the i^{/}o instruction?

3. Does process P2 perform i^{/}o? If so, at what address is the i^{/}o instruction?

4. Does process P3 perform i^{/}o? If so, at what address is the i^{/}o instruction?

5. List at least FIVE other kinds of data that will be stored in a pcb that is not shown

Nick Urbanik ⟨nicku(at)vtc.edu.hk⟩  ver. 1.0

Tutorial: Process Control Blocks Operating Systems and Systems Integration

3

in figure 1 on the previous page.