COSI 131A (Spring 2025) Fundamentals of Computer Systems

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

COSI 131A (Spring 2025)
Fundamentals of Computer Systems
Programming Assignment 1

To be completed individually and submitted via Moodle. Do NOT share this assignment or its solution.

In this programming assignment, you will design the process manager.

Each process has a Process Control Block (PCB), which contains the following four fields: id, status, priority, and a link to another PCB.

In order to manage processes, you need to implement multiple queues based on their status. For this assignment, assume that there are four types of queues: ready queue, I/O wait queue, child process termination queue, and interrupt wait queue. The structure of each queue is as the following:
Based on the events, the processes are managed accordingly as the following diagram. Below are the events and their corresponding actions:
  • CREATION: Creates a new PCB node and adds it to the ready queue.
  • EXECUTION: Removes the oldest PCB from the ready queue and re-adds it as the newest element.
  • WAIT_I_O: Moves the oldest PCB from the ready queue to the I/O wait queue.
  • WAIT_CHILD: Moves the oldest PCB from the ready queue to the child termination wait queue.
  • WAIT_INTERRUPT: Moves the oldest PCB from the ready queue to the interrupt wait queue.
  • I_O: Moves the oldest PCB from the 1/O wait queue back to the ready queue.
  • CHILD_TERMINATION: Moves the oldest PCB from the child termination wait queue back to the ready queue.
  • INTERRUPT: Moves the oldest PCBfrom the interrupt wait queue back to the ready queue.
  • TERMINATION: Removes the oldest PCB from the ready queue.

发表评论

电子邮件地址不会被公开。 必填项已用*标注