You are scheduling jobs on processors. You have n jobs, and each job i has an arrival time a i , and length l i
You are scheduling jobs on processors. You have n jobs, and each job i has an arrival time ai, and length li of cycles that it must be processed, and a deadline di. The job must be scheduled for exactly li cycles no earlier than time ai and it must complete by time di. Each processor can process exactly one job at a time, and each job can be run on exactly one processor at a time. However, jobs can be interrupted and restarted on the same or a different processor as long as the total time spent processing the job is li. In addition, you have k processors and each processor j is available for processing jobs between time sj and tj.
Given a set of n jobs and k processors, give an efficient algorithm that either finds a schedule that can complete each job by its deadline or reports that no such schedule exists. Prove the algorithm is correct, and state and justifty the running time.
(For example, we have two jobs. J1 arrives at time 0, requires 3 cycles, and must complete by time 4. Job J2 arrives at time 1, requires 2 cycles, and must complete by time 3. We have 2 processors. P1 is available between times 0 and 4. Processor P2 is available for times 2 to 3. At time 0 we schedule job J1 on P1. At time 1 we interrupt J1 and run J2 on P1. At time 2 we start running J1 on processor P2. At time 3, job J2 is now complete by its deadline, and processor P2 is no longer available. We interrupt job J1 and move J1 to run on processor P1. At time 4, job J1 has now run 3 cycles and is complete by its deadline. As a result, we scheduled both jobs to complete by their deadline.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started