chapter 10: multiprocessor & real-time scheduling dynamic scheduling wednesday, october 5, 2011...

Post on 11-Mar-2018

232 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Chapter 10: Multiprocessor &

Real-time Scheduling(prelim)

Wednesday, October 5, 2011

Multiprocessor classes

• Loosely coupled (clusters)

• Special-purpose processors (CPU + GPU)

• Tightly coupled (SMP)

Wednesday, October 5, 2011

Synchronization granularity

• Independent

• Very coarse-grained

• Coarse-grained

• Medium-grained

• Fine-grained

Wednesday, October 5, 2011

Design issues

• Assignment of process to CPU

• Dynamic vs. static

• Master/slave vs. peer

• Multiprogramming

• Process dispatching

Wednesday, October 5, 2011

Lower number ==

identical process service times

Wednesday, October 5, 2011

CPUCore

J I H G F E D C B A

High CoVHigh CoVHigh CoVHigh CoV

Process TS FCFS RR

A 100 100 118

B 2 101 11

C 2 103 12

D 2 105 13

E 2 107 14

F 2 109 15

G 2 111 16

H 2 113 17

I 2 115 18

J 2 117 19

Low CoVLow CoVLow CoVLow CoV

Process TS FCFS RR

A 2 2 11

B 2 3 11

C 2 5 12

D 2 7 13

E 2 9 14

F 2 11 15

G 2 13 16

H 2 15 17

I 2 17 18

J 2 19 19

B, C, D, ..., J arrive at time 1Wednesday, October 5, 2011

CPU

CoreCore

J I H G F E D C B A

High CoVHigh CoVHigh CoVHigh CoV

Process TS FCFS RR

A 100 100 108

B 2 2 6

C 2 4 6

D 2 6 7

E 2 8 7

F 2 10 8

G 2 12 8

H 2 14 9

I 2 16 9

J 2 18 10

Low CoVLow CoVLow CoVLow CoV

Process TS FCFS RR

A 2 2 6

B 2 2 6

C 2 3 6

D 2 4 7

E 2 5 7

F 2 6 8

G 2 7 8

H 2 8 9

I 2 9 9

J 2 10 10

J I H G F E D C B A

B, C, D, ..., J arrive at time 1Wednesday, October 5, 2011

Wednesday, October 5, 2011

Thread scheduling

• Load sharing

• Gang sharing

• Dedicated processor assignment

• Dynamic scheduling

Wednesday, October 5, 2011

Load sharing

CPU

CoreCore

CoreCore

Memory

Thread

Thread

Thread

Thread

Thread

Thread

Thread

X

Wednesday, October 5, 2011

Gang scheduling

Wednesday, October 5, 2011

Gang scheduling

CPU

CoreCore

CoreCore

Memory

Thread

Thread

Thread

Thread

Thread

Thread

Thread

Wednesday, October 5, 2011

Dedicated processor assignment

• Extreme version of gang scheduling

• No multiprogramming (blocked thread)

• Utilization not emphasized

• No context switch gives speedup

Wednesday, October 5, 2011

16 CPUssimultaneous execution

Wednesday, October 5, 2011

Real-time systems

Wednesday, October 5, 2011

Wednesday, October 5, 2011

Real-time scheduling

• Correctness

• Logical result of computation

• Time results produced

• Hard vs. soft real-time

• Periodic vs. aperiodic

Wednesday, October 5, 2011

Characteristics

• Determinism

• Responsiveness

• User control

• Reliability

• Fail-soft operation

Wednesday, October 5, 2011

Wednesday, October 5, 2011

Real-time scheduling

• Static table-driven

• Static priority-driven

• Dynamic planning-based

• Dynamic best effort

Wednesday, October 5, 2011

Wednesday, October 5, 2011

Wednesday, October 5, 2011

Wednesday, October 5, 2011

Rate monotonic scheduling

Rate = 1 / T

Higher rate ==> higher priority

Wednesday, October 5, 2011

Wednesday, October 5, 2011

Rate monotonic theorem

• Rate monotonic scheduling is optimal

• If any static priority scheduler meets all deadlines, so does RMS

• Does not guarantee best utilization

Wednesday, October 5, 2011

top related