Download presentation

Presentation is loading. Please wait.

1
Embedded System Lab. 1 Embedded system Lab. Email : phk0210@hotmail.com

2
Internal seminar Embedded System Lab. 2 contents Lottery Scheduling Defined Lottery scheduling Implementation

3
Internal seminar Embedded System Lab. 3 Lottery Scheduling Defined Lottery scheduling is a randomized resource allocation mechanism. Resource rights are represented by lottery tickets. Each allocation is determined by holding a lottery; the resource is granted to the client with the winning ticket. [Waldspurger]

4
Internal seminar Embedded System Lab. 4 Lottery scheduling Resource rights Lottery Tickets encapsulate Resource Rights that are abstract, relative, and uniform. Abstraction Relativity uniformity

5
Internal seminar Embedded System Lab. 5 Lottery scheduling Lotteries Scheduling by lottery is probabilistically fair. How many wins?

6
Internal seminar Embedded System Lab. 6 Lottery scheduling Lotteries When to wins? Starvation dose not exist.

7
Internal seminar Embedded System Lab. 7 Modular resource management Ticket? The explicit representation of resource rights. Provides a convenient substrate for modular resource management.

8
Internal seminar Embedded System Lab. 8 Modular resource management Ticket transfers Ticket Avoid Priority inversion problem => priority inheritance Ticket :3Ticket :10Ticket :5 c a b b a c t

9
Internal seminar Embedded System Lab. 9 Modular resource management Ticket Inflation Provides alternative to transfers. Escalating resource rights by creating more tickets. In general, such inflation should be disallowed. However, ticket inflation can be very useful among mutually trusting clients.

10
Internal seminar Embedded System Lab. 10 Modular resource management Ticket currencies Local abstraction barrier: Interpretation of value of a ticket in different modules Base currency + exchange rate Compensation tickets A client which consumes only a fraction f of its allocated resource quantum can be granted a compensation ticket that inflates ins value by 1/f until the client starts its next quantum.

11
Internal seminar Embedded System Lab. 11 Implementation 25MHz MUPS-based DECStation 5000/125 Mach kernel 3.0 Scheduling quantum : 100ms Random number park-miller algorithm Executes in approximately 10 RISC instructions.

12
Internal seminar Embedded System Lab. 12 Implementation Lotteries Winning ticket random Ticket O(n) Partial ticket tree : O(lg n)

13
Internal seminar Embedded System Lab. 13 Implementation Mach kernel interface A minimal lottery scheduling interface is exported by the microkernel. operation Create, destroy ticket currency

14
Internal seminar Embedded System Lab. 14 Implementation Ticket currencies

15
Internal seminar Embedded System Lab. 15 Implementation Compensation Tickets This is consistent with proportional sharing, and permits I/O-bound tasks that use few processor cycle to start quickly. A B Ticket : 400 Quantum : 100ms A 100ms B 20ms After 100msAfter 20ms f=1/5 Compensation tickets = 1600 400/f = 2000 B = 2000 tickets

16
Internal seminar Embedded System Lab. 16 Implementation Ticket Transfers mach_msg system call Synchronous RPCs client server ticket transfer User interface User-level comands Create/destroy tickets and currencies mktkt, rmtkt, mkcur, rmcur Fund/unfund a currency fund, unfund Execute a shell command fundx

Similar presentations

OK

DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.

DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on corporate etiquettes of life Ppt on c language functions Making a ppt on ipad Ppt on division as equal sharing worksheets Ppt on product advertising in cartoons Ppt on bluetooth communication ios Ppt on blue ocean strategy Topics for ppt on environmental issues Ppt on alternative sources of energy Ppt on object-oriented programming with c++