CSC 325 Operating Systems with an Emphasis on UNIX
Assignment 13

This assignment will explore the algorithms in a simulation environment. I recommend that this assignment be completed in a group.

Simulating the Linux Scheduler

Reading about scheduling in the text can be pretty boring, but scheduling is a core part of every operating system. So, I thought it would be interesting to learn about Lnux scheduling by writing a simulator program that simlulates scheduling.

As explained in your text, Linux uses a simple priority based scheduling algorithm to choose between the current processes in the system. As you know from your reading, there are two types of processes in Linux, normal user process and real time processes. Real time processes will always run before normal user processes and they may have either of two types of policy: round robin (RR) or first come first served (FCFS).

In particular, implement the following assumptions:


Your task is to write a program that simulates scheduling in Linux. This simulation can be used, among other things for seeing how effective the Linux scheduler is under a variety of conditions. Hence the simulation will simulate conditions that would be occurring in the actual operating system, but you need not write all the code to do all the actual context swaps. In addition, for similicity, you may assume a uniform distribution for all of the necessary probability distributions. While this assumption is not realistic, it makes the programming easier. You a fixed time slice of 200ms.

You may use any of the relevant C++ libraries, such as the queue and/or priority que libraries.

Input Specifications:


Output Specifications:

You must use good style: using good structure, a good header, appropriate declarations, meaningful variable names, preconditions, postconditions, comment lines, etc.

Submit your C++ code, yourlastnameA13scheduling.cpp.