تم الحل ✓
categoryهندسة الحاسبات
schoolبكالوريوس
event_available2026-07-14
السؤال
Transcribed Image Text:
There are 3 programs that you should write.
Each program implements scheduling algorithm:
First Serve
First Come
Shortest Job Next
Priority
Below is the same as in lab 2:
Please comment you code, so that I can understand
your particular choice of actions in solutions.
Try to especially comment what each variable in
the code means in the comments.
Based on the results, write a small report
explaining which algorithm works
best for the input data in the test file.
To summarize, you should submit:
3 source code files (preferably)
one small report (either pdf or docx) which contains:
the results for each algorithm (order of jobs,
turnaround time,
etc., see text files for each problem)
the explanation for which algorithm works best for the
input and why.
Lab #3 FCFS
Write a program that will simulate non-
preemptive process scheduling algorithm:
First Come First Serve
-
Your program should input the information
necessary for the calculation of average
turnaround time including:
• Time required for a job execution;
• Arrival time;
The output of the program should include: starting and
terminating time for each job, turnaround time for each
job, average turnaround time.
Lab #3 Priority
Write a program that will simulate non-
preemptive process scheduling algorithm:
Priority
Your program should input the information
necessary for the calculation of average
turnaround time including:
• Time required for a job execution;
• Arrival time;
• Priority
The output of the program should include: starting and
terminating time for each job, turnaround time for each
job, average turnaround time.
Lab #3 SJN
Write a program that will simulate non-
preemptive process scheduling algorithm:
Shortest Job Next
Your program should input the information
necessary for the calculation of average
turnaround time including:
• Time required for a job execution;
Arrival time;
The output of the program should include: starting and
terminating time for each job, turnaround time for each
job, average turnaround time.
Sample Test data for lab #3
P1
0
P2
5
P3
10
Priority:
P4
FCF
S:
15
10
Feel free
to
use
your own
test
example
2552
42
13
a
Average turnaround time Tav=
?
?
SJN
?
Tav=
?
Tav
==
?
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.