Title: Course Matters
1Course Matters
2Make-Up Lecture
- This Saturday, 23 October
- TR7, 1-3pm
- Topic CPU scheduling
3Multimedia Storage Issues
4Media vs. Documents
5Media vs. Documents
- large file size
- write once, read many
- sequential access
- periodic access
- deadlines
6Average Service Time?
7OS Review Disk
8Disk
head, spindle, track, sector, cylinder
9Latency components
seek time, rotational time and transfer time
10Disk Scheduler
read/write command
disk sched
I/O Request
11OS Review Disk Scheduling Algorithm
12FCFS
98 183 37 122 14 124 65 67
13SSTF
98 183 37 122 14 124 65 67
14SCAN (Elevator)
98 183 37 122 14 124 65 67
15C-SCAN
98 183 37 122 14 124 65 67
16EDF
98 183 37 122 14 124 65 67
30 10 13 5 24 33 21 39
17EDF-SCAN
98 183 37 122 14 124 65 67
30 10 13 5 24 33 21 39
18Other Schemes
19Data Placement
20Contiguous
21Fragmented
22Striping (RAID-0)
23Mirroring (RAID-1)
24Parity (RAID-5)
25Parity
26Summary of Concerns
- High Throughput
- Fault Tolerant
- Load balancing
27This Lecture
- Consider striping only (RAID-0)
28Efficient Striping Techniques for Multimedia File
Servers
- P. Shenoy, H. Vin
- NOSSDAV 97
29Design Parameters
- unit of striping (block size)
- degree of striping (num of disks)
30Stripe Unit
31Model
- Disk serves clients in rounds
- Time to read media from disk should be smaller
than round time - Concern minimize service time of most heavily
loaded disk
32Effects of Block Size
service time
Block Size
33Problem
- Find block size such that the service time for
the most heavily loaded disk is minimize
34Analysis Model A Plan
- service time of the busiest disk as a function of
block size - expected num of blocks accessed on the busiest
disk - expected num of blocks accessed on any disk
35Assumptions
- Non-redundant array
- VBR
- Analyze read operation only
36Variables Declaration
- Nd Number of Disks
- Nc Number of Clients
- B Block size
37Variables Declaration
- Nb(i,j) Number of blocks client i access from
disk j - Pa(i,m) Probability of i access m blocks in a
round
38Analysis
- Suppose i request m blocks
39Reading 1 block
- Nd Number of Disks
- Nc Number of Clients
- B Block size
- Nb(i,j) Number of blocks client i access from
disk j - Pa(i,m) Probability of i access m blocks in a
round
40Reading k block
- Nd Number of Disks
- Nc Number of Clients
- B Block size
- Nb(i,j) Number of blocks client i access from
disk j - Pa(i,m) Probability of i access m blocks in a
round
41Blocks Read From a Disk
- Nd Number of Disks
- Nc Number of Clients
- B Block size
- Nb(i,j) Number of blocks client i access from
disk j - Pa(i,m) Probability of i access m blocks in a
round
42Busiest Disk
- Nd Number of Disks
- Nc Number of Clients
- B Block size
- Nb(i,j) Number of blocks client i access from
disk j - Pa(i,m) Probability of i access m blocks in a
round
43Access Time
- Nd Number of Disks
- Nc Number of Clients
- B Block size
- Nb(i,j) Number of blocks client i access from
disk j - Pa(i,m) Probability of i access m blocks in a
round
- T Nmax(ts tr Btt)
- Depends on
- block size B
- disk characteristic ts,tr,tt
- server design Nd
- workload characteristic Nc, Nb(i,j)_
44Model Verification
45Imbalance and Overhead
46Effects of Block Size
47Effects of Clients
48Effects of Num of Disks
49Choosing Block Size
- Given Nc, assume rest is fixed
- find B that minimize T
- if T lt duration of a round
- incr Nc and try again
50There is more..
- redundant array
- finding optimum degree of striping
51Cello A Disk Scheduling Framework for Next
Generation Operating Systems
- P. Shenoy, H. Vin
- SIGMETRICS 98
52Problem
- How to co-exist with other applications?
53Classes of Applications
- Real-time
- hard/soft
- periodic/aperiodic
- Best-effort
- interactive
- troughput-intensive
54Attempt 1
- Priority-based scheduler
- Always schedule real-time tasks ahead of
best-effort tasks
55Attempt 2
- Partition time slots into real-time and
best-effort
56Attempt 3
- Assign weight to application class, based on
their priority - Service based on weight
57Attempt 3 Cello
58Class Independent Scheduler
59Allocating Disk Bandwidth
- Allocate in proportion to time
- Allocate in proportion to bytes
60Proportionate Time-Allocation
61Variables
- P Interval of a period
- I Idle time so far
- Ui Allocated time for class i
- wi Weightage of class i
62Proportional Time Allocation
63Example
10
20
16
14
Weights 112 P 100 I 30
64 65next
r
prev
66Need to Make Sure..
- Does not exceed share for class i
67Need to Make Sure..
- Total service time does not exceed available time
68Update and Repeat
next
prev
69Being Work Conserving
- Work conserving dont work only if no work to
do
70What if..
- a class have no pending request?
- put in no_work group
- a class violates one of the constraints?
- put in too_much_work group
71Improving Utilization
- When disk is idle, distribute service time among
classes in too_much_work group - Pick a request from this class and put into
scheduled queue
72Free Time Utilization
73Class Specific Scheduler
- How to pick (r, prev, next)?
- Must not affect tasks in queue
- Idea Compute slack time
74Slack Time
- li Latest time must begin servicing request i
- ei Earliest time may begin servicing request i
- di Deadline for request i
- si Slack time for i li ei
- ti Time to service request i
75Slack Time
i
i
76Class 1 Interactive Best Effort
next
prev
77Class 2 High Throughput Best Effort
next
prev
78Class 3 Real Time Application
next
prev
79Evaluations
response time
video
80Evaluations
time
time
81Cello Summary
- OS disk scheduler
- Support multiple classes
- Protect classes from each other
- Work conserving
- Use two-level scheduling