Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.
QUESTION
You are required to create a CPU Scheduler Simulator written in Python to schedule the provided dataset (the spreadsheet below) according to the four Scheduling Algorithms discussed in Week 2 tutorial activities.
The spreadsheet your Python Scripts must read is here. [attached xlsx]
When simulating the Round Robin algorithm, you must use Quantum = 3 TUs. RR is also subject to an overhead of 1 TU each time a context switch occurs, the same as explained in Tutorial 2 and illustrated in Lecture 5.
Algorithms:
1. Priority Scheduling. PRI
2. Round Robin Scheduling. RR
Fallback algorithms
As illustrated in the tutorial, there can be situations where it is not clear which process should be next to use the CPU. For example, if two processes arrive at the same time having the same priority when scheduling based on priority. For those situations, a fallback algorithm must be chosen. FIFO and SJF are both good as a fallback and both could be considered good choices, but in order to keep all submissions under the same parameters, let’s agree that:
1. If by any chance when scheduling Priority two or more processes are ready to be selected, the scheduler must fall back to FIFO.
2. If by any chance when scheduling Round Robin two or more processes are ready to be selected, the scheduler must fall back to SJF.
Resources you should refer to:
1. The Dinosaur’s book, if possible.
2. Week 2’s Lecture handouts, especially Lecture 5.
3. Week 2’s Tutorial, especially the CPU Scheduling section.
Guidelines:
• The output of your simulator must be similar to the one we have been seeing in the Week 2 Tutorial.
This is an example of how the output of your scripts should look like:
Time Unit 1: PID 1 executes. 5 instructions left. Q=3.
PID 2 wait=1.
Time Unit 2: PID 1 executes. 4 instructions left. Q=2.
PID 2 wait=2. PID 3 wait=1.
Time Unit 3: PID 1 executes. 3 instructions left. Q=1.
PID 2 wait=3. PID 3 wait=2.
Time Unit 4: PID 1 executes. 2 instructions left. Q=0.
PID 2 wait=4. PID 3 wait=3.
Time Unit 5: Context switch. PID 2 wait=5.
PID 3 wait=4. PID 1 wait=1.
issuing python filename.py.
These are the questions the assessor will have in mind when assessing your submission:
1. Does the CPU scheduler generate the expected output for each algorithm for a given set of test data?
2. Does it look like the students submitted an authentic implementation?
3. Does it work when I run it?
Sample Solutions
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, dapibus id, mattis vel, nisi. Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.
Get sample solution
Order Now
Sed egestas, ante et vulputate volutpat, eros pede semper est, vitae luctus metus libero eu augue. Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis. Vestibulum volutpat, lacus a ultrices sagittis, mi neque euismod dui, eu pulvinar nunc sapien ornare nisl. Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.
Morbi interdum mollis sapien. Sed ac risus. Phasellus lacinia, magna a ullamcorper laoreet, lectus arcu pulvinar risus, vitae facilisis libero dolor a purus. Sed vel lacus. Mauris nibh felis, adipiscing varius, adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus. Nunc tellus ante, mattis eget, gravida vitae, ultricies ac, leo. Integer leo pede, ornare a, lacinia eu, vulputate vel, nisl.
Suspendisse mauris. Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula. Integer adipiscing risus a sem. Nullam quis massa sit amet nibh viverra malesuada. Nunc sem lacus, accumsan quis, faucibus non, congue vel, arcu. Ut scelerisque hendrerit tellus. Integer sagittis. Vivamus a mauris eget arcu gravida tristique. Nunc iaculis mi in ante. Vivamus imperdiet nibh feugiat est.
Ut convallis, sem sit amet interdum consectetuer, odio augue aliquam leo, nec dapibus tortor nibh sed augue. Integer eu magna sit amet metus fermentum posuere. Morbi sit amet nulla sed dolor elementum imperdiet. Quisque fermentum. Cum sociis natoque penatibus et magnis xdis parturient montes, nascetur ridiculus mus. Pellentesque adipiscing eros ut libero. Ut condimentum mi vel tellus. Suspendisse laoreet. Fusce ut est sed dolor gravida convallis. Morbi vitae ante. Vivamus ultrices luctus nunc. Suspendisse et dolor. Etiam dignissim. Proin malesuada adipiscing lacus. Donec metus. Curabitur gravida
