Question:
a) Each process is represented in the operating system by a process control block (PCB). The PCB contains many pieces of information associated with a specific process. Describe five pieces of information that can be found in a PCB.
b) Consider Figure 1.0 below, which shows two processes (P0 and P1) being executed on a single CPU system, and answer the questions which follow:
i) What is the difference between an interrupt and a system call and how do they affect the processing of processes P1 and P0?
ii) What is the state of process P1 when it is marked as idle in the diagram?
iii) Considering that process P1 is executed for 10 milliseconds, marked as ‘executing' in the diagram, and completes its execution before it is interrupted. In your opinion what changes will occur in the system, and typically in the diagram.
iv) Describe context switching and identify where it is taking place in the diagram.
c) What is the difference between an independent process and a cooperating process?
d) Briefly describe the producer-consumer problem within the concept of cooperating processes.
e) To allow producer and consumer processes to run concurrently, there must be a buffer for holding items. The buffer will be filled by the producer and emptied by the consumer, and there are two types of buffer available for this purpose. Describe these two types of buffer.