Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2.6. A multiprocessor with eight processors has 16 attached tape drives. There i

ID: 3755944 • Letter: 2

Question

2.6. A multiprocessor with eight processors has 16 attached tape drives. There is a large number of jobs submitted to the system that each require a maximum of four tape drives to complete execution. Assume that each job starts running with only thiod tape drives for a long period before requiring the fourth tape drive for a short peno toward the end of its operation. Also assume an endless supply of such jobs. a. Assume the scheduler in the OS will not start a job unless there are fpre n available. When a job is started, four drives are assigned immediately and a e drives released until the job finishes. What is the maximum number of jobs hat e in progress at once? What are the maximum and minimum number of tape that may be left idle as a result of this policy? b. Suggest an alternative policy to improve tape drive utilization and at the he i time avoid system deadlock. What is the maximum number of jobs that ca progress at once? What are the bounds on the number of idlina tane drives e same

Explanation / Answer

D : dependent task system

Arch: architecture description

initial_schedule : schedule

Output: result : system schedule

result := initial_schedule

while T (D) 6= and result 6= invalid_schedule do

:= choose_task_to_schedule(D)

new_schedule := invalid_schedule

new_cost :=

for all P in Archi do

if WCET(, P) 6= and group_ok(,P,result) then

temp_sched:=

schedule_task_on_proc(,P,result,MTF)

temp_cost := cost_function(temp_sched)

if temp_cost < new_cost then

new_schedule := temp_sched

new_cost := temp_cost

result := new_schedule

T (D) := remove_task(, T (D))

procedure2

: task to schedule

P : processor on which to schedule

schedule : scheduling state before adding

MTF : major time frame of the task system

Output: result : schedule after adding

result := schedule

(result, dearliest) :=

schedule_bus_communications(, P, result)

if dearliest > d() then

result := invalid_schedule

else

needed_duration := WCET(, P)

interval_set :=

failure := false

while needed_duration > 0 and not failure do

(interval, result.free_interval_set):=

get_first_interval(result.free_interval_set,

needed_duration, d(), dearliest,

part , is_preemptive())

if is_valid(interval) then

interval_set := interval_set {interval}

dearliest:=end(interval)

needed_length:=needed_length-len(interval)

else

if deadline MTF then

failure := true

else

deadline:=deadline-MTF(D)

dearliest:=0

if failure then

result := invalid_schedule

else

result := set_task_intervals(result,,interval_set)