You are on page 1of 2

Faculty of Computers and Information

CS214: Data Structures


Fall 2016

Dr. Marwa M. A. Fattah & Dr. Sarah Nabil


Faculty of Computers and Information

HomeWork 3 (Priority Scheduling)


In some systems, a priority is associated with each process and the CPU is allocated to the
process with the highest priority (small value). Equal priority processes are scheduled in FIFO
order.

Define a suitable data structure, and then write a simulation program for the system
described above. The program should display the following menu:

1. Add a New Process.


2. Serve a Process.
3. Display Information about Waiting Process.
4. Number of Waiting Process
5. Exit menu

Hints:

You have to adjust the QUEUE ADT in implementation level to be suitable for solving this
problem.

The process should have the following fields: process ID and priority.
Turning in Homework:
You will turn in your assignment as a hard copy accompanied by a soft copy on a rewritable
CD. Submission is due at the beginning of your Section next week. Your submitted homework
(hard & soft copies) will be graded by your TA and returned to you.

You might also like