Scheduling Algorithms Simulation
Name: ______________________ Date: ___________
1. Objectives
• To simulate First Come First Served (FCFS) scheduling algorithm using C/C++
• To simulate Priority Scheduling algorithm using C/C++
• To compare average waiting time and average turnaround time among the above two and Shortest Process Next scheduling algorithms.
2. Procedures
1) Simulate First Come First Served (FCFS) Scheduling Algorithm
a. In this part of the program, you will:
• Prompt the user to enter the number of processes (limit to 5)
• Prompt the user to enter the burst time for each process
• Calculate waiting time for each process
• Calculate turnaround time for each process
• Calculate average waiting time and turnaround time for all the processes
• Display all the information similar to the sample output window below
b. Built and debug the program. Copy the source file below. (15 pts)
c. Run three different sets. Paste the output windows below. Use fewer than three sentences to summarize the results. (5 pts)
2) Simulate Priority Scheduling Algorithm
a. In this part of the program, you will (just modify your last program):
• Prompt the user to enter the number of processes (limit to 5)
• Prompt the user to enter the burst time and priority number for each process (1 is the highest)
• Sort the processes in ascending order according to their priorities.
• Calculate waiting time for each process based on the priority list
• Calculate turnaround time for each process based on the priority list
• Calculate average waiting time and turnaround time for all the processes
• Display all the information similar to the sample output window below
You can simply use arrays for the processes, priority, process number, wait time and turnaround time in the program. You can also pointers and structure, etc.
b. Built and debug the program. Copy the source file below. (15 pts)
c. Run three different sets outputs. Paste the output windows below. (5 pts)
3. Questions
1) In the second part of the program, we assigned priorities to three processes. If we choose Shortest Process Next scheduling algorithm instead, describe how you will modify the program using five or fewer sentences. (5 pts)
2) Calculate the average waiting time and average turnaround time for the Shortest Process Next scheduling using the three sets of inputs you used for the Priority scheduling algorithm. Compare average waiting time and average turnaround time and comment on the differences between using Priority scheduling and Shortest Process Next scheduling algorithms. For clarity, make a table to list the results and show the comparison. (5 pts)
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.