Skip to content

implementation of a program that simulates some of the job scheduling and CPU scheduling of an operating system.

Notifications You must be signed in to change notification settings

shalabs/cpu-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

cpu-simulator

implementation of a program that simulates some of the job scheduling and CPU scheduling of an operating system.

A graphic view of the simulator

image

When a job arrives, one of three things may happen:

  1. If there is not enough total main memory or total number of devices in the system for the job, the job is rejected never gets to one of the Hold Queues.
  2. If there is not enough available main memory or available devices for the job, the job is put in one of the Hold Queues, based on its priority, to wait for enough available main memory (Preallocation).
  3. If there is enough main memory and devices for the job, then a process is created for the job, the required main memory and devices are allocated to the process, and the process is put in the Ready Queue. When a job terminates, the job releases any main memory. The release of main memory may cause one or more jobs to leave one of the Hold Queues and move to the Ready Queue. Assume that all the two Hold Queues are based on priority. There are two external priorities: 1, and 2 with 1 being the highest priority. Priority is only used for the job scheduler: --Job scheduling for Hold Queue 1 is Shortest Job First (SJF). --Job scheduling for Hold Queues 2 is First In First Out (FIFO). Process scheduling will be Limited Round Robin. Once a job has exceeded the threshold of CPU time, it is considered a long job and may not run until the Ready Queue is empty. At that time the Long Queue becomes the Ready Queue and Round Robin (with a quantum) process scheduling is used.

The input of the program is text. Each line in the file contains one of the commands listed below. Each command consists of a letter in column one followed by a set of parameters.

(This was made as a final project for Operating Systems class (CPCS361) in 2017)

About

implementation of a program that simulates some of the job scheduling and CPU scheduling of an operating system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages