Problem

Write a program to simulate job scheduling in an operating system. Jobs are generated at r...

Write a program to simulate job scheduling in an operating system. Jobs are generated at random times. Each job is given both a random priority from 1 to 4—where 1 is the highest priority—and a random amount of time to complete its execution.

Jobs do not begin execution and run to completion, but instead share the processor. The operating system executes a job for a fixed unit of time called a time slice. At the end of the time slice, the current job’s execution is suspended. The job is then placed on a priority queue, where it waits for its next share of processor time. The job having the highest priority is then removed from the priority queue and executed for a time slice.

When a job is first generated, it will begin executing immediately if the processor is free. Otherwise it will be placed on the priority queue.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 10
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT