ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 26 Apr 2017 My Price 8.00

Average Turnaround Time

I have to create a program that simulates Round Robin CPU scheduling.

 

 

Deadline: Monday April 17th at 5:30 PM EST
Your objective is to create a program that simulates Round Robin CPU scheduling.
Program Requirements:
The program you will create is used to generate a schedule of processes. The
processes are stored in a plaintext file. The program accepts two parameters. The
first parameter is the path of the processes file. The second parameter is the time
quantum. Your simulation should include the following:
Clock
Process Creator
CPU
Queue
Process Arrival Time
Process Service Time
Time Quantum
Context Switch timestamps all events for processes, such as creation time, completion time,
etc.
creates processes at arrival time
runs processes for a time slice (time quantum)
FIFO ready queue used by both the process creator and CPU
arrival time of new processes into the ready queue
amount of time required by the processes to complete execution
time each process can spend in the CPU, before it is removed
number of times a process is switched Your program should also print out the following performance evaluation criteria:
CPU Utilization
Throughput
Average Waiting Time
Average Turnaround Time
Sample Input:
Your program will be tested with an input file that has a certain format. It is a csv
(comma space value) format that resembles a table. The three columns are Process
ID, Arrival Time and Burst Time. Each row is a process. The following is an example:
CSV File
pid,arrive,burst
1,0,5
2,1,7
3,0,2
4,2,6 Meaning
pid arrive burst
1
0
5
2
1
7
3
0
2
4
2
6 Program Execution:
Your program accepts two parameters. The first is that path to the processes text file.
The second parameter is the time quantum to be used in the simulation. For example
if your program was written in java, the following could be how would test it.
$ javac target.java $ java target processes.csv 2
Suggestions:
1. Research the Round Robin CPU scheduling algorithm.
2. Understand goals of scheduling:
CPU Utilization
CPU Throughput
Turnaround Time
Waiting Time
Response Time Maximize CPU utilization. Keep the CPU 100% busy.
Maximize the number of jobs processed.
Minimize the total time to complete processes.
Minimize the total time processes wait in the ready queue.
Minimize the time from when a request is submitted until the first
response (not output) is produced. 3. Understand the requirements and plan steps involved to meet the requirements.
4. Set up the environment for the scheduler.
5. Define classes/subclasses used by the scheduler (CPU, clock, process, process-creator,
simulator, etc.), FIFO scheduler, and all the parameters involved.
6. Define queues (i.e., ready queue/FIFO and waiting queue) used by the scheduler, the data
structure, and mechanisms used for each queue to determine when and which queue a
process should enter, and when to be removed to resume execution or be terminated.
7. Keep track of context-switch time.
8. Provide input to your simulator (time quantum, process arrival time, number of process,
burst time of each process) process-creator.
9. Output the sequence of events and show how the algorithm is executed and the
performance of your scheduling algorithm for the same set of processes and their associated
burst time, but different time quantum, in terms of the turnaround time, waiting time, CPU
utilization, and throughput.
10. Empirical evaluation: Full accounting and statistics after the simulation completes. Create
processes with different arrival time and burst time. Run the scheduling algorithm on these
processes (i.e., the same set of processes), with five different Time Quantum. Create metrics
of the results and get the average of these metrics.
11. Analyze the result.

Attachments:

Answers

(11)
Status NEW Posted 26 Apr 2017 06:04 AM My Price 8.00

-----------

Not Rated(0)