Professional Documents
Culture Documents
• During this course, you have to develop and program a project on CPU
scheduling algorithms
• You need to make a team consisting of 5 students ( Two groups will have 6
students).
• During the semester, make sure you meet the deadline for the project.
• You can use any programming languages such as Java, or C++ for the
implementation.
This scheduler does exactly what it says - jobs are scheduled in the
FCFS order that they appear to the scheduler. This policy will never
preempt the currently running job.
This scheduler should return the Job that will have the shortest
CPU burst. To implement this and the next technique (i.e. SJFp),
you are allowed to "cheat" to determine the shortest CPU burst.
Simply call the burst Remaining () method for each Job object in the
SJFnp queue. Burst Remaining () returns the amount of time left for a
particular jobs CPU burst. This method basically allows you to look
into the future. In a real system, you would not have access to this
information. This policy will never preempt the currently running
job.
This is exactly like the previous technique (SJFnp) except it is even
more aggressive in scheduling jobs. If a new job is added to the
system whose next CPU burst is less than the time remaining on
SJFp
the current jobs burst, the new Job should be scheduled. To make
this happen, you add method should return true if the new Job has
a shorter burst than the current Job. Be careful, though, to make
sure that you compare the new jobs burst time to that remaining on
the current jobs (as opposed to the total burst time for the current
job). This policy will occasionally preempt the currently running job.
This scheduler does exactly as the following, first have a queue
where the processes are arranged in first come first serve order. A
quantum value is allocated to execute each process. The first process
RR is executed until the end of the quantum value. After this, an
interrupt is generated and the state is saved. The CPU then moves
to the next process and the same method is followed. Same steps are
repeated till all the processes are over.
Input file
You can use any input file for a trace of actual process activity on a real system
for 10 processes. Suppose we have an input file as the following schedule that
contains 2 columns.
The first column is the time when a particular process enters the system (arrival
time). The second column shows how long the process needs to run on the
processor (burst time).
Project Report
For this project you will be required to write a brief report discussing what you
have learned about scheduling policies. You should run the following 7
experimental:
• Round-Robin with Quantum equal to zero.
• Round-Robin with Quantum equal to 10.
• Round-Robin with Quantum equal to 100.
• Round-Robin with Quantum equal to 10000.
• First-Come, First-Serve.
• Shortest Job First Non-Preemptive.
• Shortest Job First Preemptive.
Your report should include such things as why different schedulers perform the
way they do, the effects of different length quantum on a Round-Robin scheduler,
the effects of preemptive versus non-preemptive scheduling. The comparison
between average waiting time for all algorithms.
Additional information about your report
Include the names of each partner on the first page of the report. A softcopy of
your report and program should be placed in Blackboard. Your report should be
approximately 7-pages long. Be brief and concise.