(1,0)6.5
Due Date: November 30
(1,0)6.5
Introduction:
Operating systems are analyzed using three different techniques. First, we can build a queueing model and analyze the system mathematically (Queueing Theory). Secondly, we could build mechanisms into the operating system which would provide feedback regarding its performance. Once this feedback is rendered, we can then fine-tune the system. The final and most commonly used technique is simulation.
In this project, you will simulate a simple operating system using a technique known as discrete event simulation. You will gain insight into how jobs move through the system, changing states and accessing services. Most importantly, you will gather various statistics in order to analyze the efficiency of the system, find bottlenecks, and suggest improvements to the scheduling algorithm in order to decrease turnaround time.
System Description:
Consider a simple computer with one CPU, one I/O device, one page fault server, and a particular Multi Programming Level (MPL). The CPU has a Ready Queue associated with it, the I/O device has an I/O Queue associated with it, and the Page device has a Page Queue associated with it. A number of users sit at terminals, ``sending'' jobs into the system. Jobs arrive one at a time, requesting to enter the system. If the system is full (number of jobs in the system == MPL), then the job will wait for access to the system in an additional queue, the Arrive Queue.
Once a job is in the system, it attempts to gain use of the CPU. Scheduling is accomplished by use of the Round-Robin algorithm. If the CPU is being used by another job, then the requesting job is placed in the Ready Queue. Otherwise, the requesting job acquires the CPU, and runs until one of four events occurs:
Simulation Parameters:
When started up, your simulator should prompt the user for various system parameters. These parameters are outlined below.
tSIMUL Total simulation time (float, ms, constant) [0.1in]nUSERS Number of terminals/users (int, constant) [0.1in]MPL Multi-Programming Level (int, constant) [0.1in]ALGO CPU scheduling algorithm (0 = Round-Robin) [0.1in]Average thinking time (float, ms, exponentialdistribution) [0.1in]
Average time a job needs to use the CPU(float, ms, exponential distribution) [0.1in]tSLICE Time slice for Round-Robin scheduling(float, ms, constant) [0.1in]
Average I/O interarrival time (float, ms,exponential distribution) [0.1in]tSIO I/O service time (float, ms, constant) [0.1in]tPage Average Page fault interarrival time (float, ms, exponential distribution) [0.1in]tSPage Page fault service time (float, ms, constant) [0.1in]
Simulation Output Results:
After running for the required amount of time, your simulation ends, and a report should be printed with the following statistics displayed.
Implementation Notes
You are allowed to use any discrete event simulation package.
Project Submission:
Your documentation should discuss (in great detail) the results you obtained given various input parameters for the system.
Grading Policy:
Proper execution/statistics | 60 |
Report with Design suggestions | 20 |
Documentation | 20 |
One week (7 days) early submission earns 5 bonus points.