CPU Scheduling

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

Cpu_Scheduling_Simulation_Project

Design and implement a program (in python) that simulates some of the job scheduling, CPU scheduling, and semaphore processing of an operating system. A large portion of the simulation is given to you already (if you choose to use it). An explanation of the code can be found here.

New Jobs

When jobs initially arrive in the system, they are put on the job scheduling queue which is maintained in FIFO order.

The job scheduling algorithm is run when a job arrives or terminates.

Job scheduling allows as many jobs to enter the ready state as possible given the following restriction:

a job cannot enter the ready state if there is not enough free memory to accommodate that job's memory requirement.

Do not start a job unless it is the first job on the job scheduling queue.

When a job terminates, its memory is released, which may allow one or more waiting jobs to enter the ready state.

Memory

A job can only run if it requires less than or equal to the system's main memory capacity.

The system has a total of 512 blocks of usable memory.

If a new job arrives needing more than 512 blocks, it is rejected by the system with an appropriate error message.

Rejected jobs do not factor into the final statistics (described below).

Note that all jobs in the ready state must fit into available main memory.

Process Scheduling

Process scheduling is managed as a multilevel feedback queue.

The queue has two levels, each queue is organized as a FIFO, and both use a round robin scheduling technique.

New jobs are put on the first level when arriving in the ready state.

When a job from the first level is given access to the CPU, it is allowed a quantum of 100 time units.

If it exceeds that time quantum, it is preempted and moves to the second level.

The jobs on the second level may only be allocated the CPU if there are no jobs on the first level.

When a job on the second level is given access to the CPU, it is allowed a quantum of 300 time units.

If it exceeds that, it is preempted and put back on the second level of the ready queue.

Process scheduling decisions are made whenever any process leaves the CPU for any reason (e.g., expiration of a quantum or job termination).

When a job terminates, do job scheduling first, then process scheduling.

Also, give preference to first level jobs (i.e., if a job from the second level of the ready queue is running, and a new job enters the first level, the running job is preempted to the second level in favor of the first level job).

IO Interrupts

While executing on the CPU, a job may require I/O, which preempts it to the I/O wait queue for the duration of its I/O burst.

Critical Section

While executing on the CPU, a job may perform a semaphore operation.

Assume there are five semaphores shared among all jobs running in the system, numbered 0 through 4, each initialized to 1.

If a job must wait because of a semaphore, it goes onto the appropriate wait queue until it is signaled.

There is a separate wait queue for each semaphore.

When a job completes, put it on a finished list for later processing.

Python

Project ID: #13909553

About the project

4 proposals Remote project Active 6 years ago

4 freelancers are bidding on average $76 for this job

schoudhary1553

Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve. Here is the reason. Why you should pick me? a) I am a very expert and have the same kind of ex More

$150 USD in 2 days
(4 Reviews)
4.1
thewebscraper

A proposal has not yet been provided

$30 USD in 3 days
(7 Reviews)
3.1