Title: Multimedia Storage Issues
1Multimedia Storage Issues
2Media vs. Documents
- large file size
- write once, read many
- deadlines!
3OS Review Disk
4Disk
head, spindle, track, sector, cylinder seek time,
rotational latency
5Disk Scheduler
read/write command
disk sched
I/O Request
6Disk Scheduling Algorithm
7Best Effort Scheduler
- FCFS First come first serve
- SSTF Shortest seek time first
- SCAN Serve all requests in one direction, then
in the other direction - C-SCAN Serve all requests in one direction only,
then jump back to the other end and repeat.
8Other Schemes
- EDF Earliest deadline first
- EDF-SCAN Use SCAN to schedule request with same
deadline. - FD-SCAN SCAN towards direction with earliest
feasible deadline - SSEDO Rank request by deadline and use formula
(seektime?rank) - SSEDV Use formula (lifetime? seektime(1- ?)
9Data Placement
10Contiguous
11Fragmented
12Stripping (RAID-0)
13Mirroring (RAID-1)
14Parity (RAID-5)
15Parity
16Summary of Concerns
- High Throughput
- Fault Tolerant
- Load balancing
17Design Parameters
- unit of striping (block size)
- degree of striping (num of disks)
18Stripe Unit
19Stripe Unit
20Effects of Block Size
service time
Block Size
21Problem
- Find block size such that the service time for
the most heavily loaded disk is minimize
22Analysis 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
23Assumptions
- Non-redundant array
- Analyze read operation only
24Variables Declaration
- Nd Number of Disks
- Nc Number of Clients
- B Block size
- Nb(i,j) Number of blocks client i access from
disk j - Nb(i,) Total number of blocks client i access
25Analysis
- Suppose i request m blocks
26Reading 1 block
27Reading k block
28Total Num of Blocks from Disk j
29Busiest Disk
30Access Time
- T Nmax(ts tr Btt)
- Depends on
- block size B
- disk characteristic ts,tr,tt
- server design Nd
- workload characteristic Nc, N(i,j)_
31Model Verification
Service Time
Block Size
32Imbalance and Overhead
- I 1 Tavg/Tmax
- O 1 NmaxBTt/Tmax
33Effects of Block Size
Imbalance
Overhead
Block Size
optimum
34Effects of Clients
Nc incr, I decr, opt B incr
Imbalance
Overhead
Block Size
35Effects of Clients
Block Size
Nc
36Effects of Num of Disks
Nd incr, N(i,j) decr, I incr, opt B decr
Block Size
Nd
37Choosing 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
38There is more..
- redundant array
- finding optimum degree of striping
39Cello Disk Scheduler
40Problem
- How to co-exist with other applications?
41Classes of Applications
- Real-time
- hard/soft
- periodic/aperiodic
- Best-effort
- interactive
- troughput-intensive
42Attempt 1
- Priority-based scheduler
- Always schedule real-time tasks ahead of
best-effort tasks
43Attempt 2
- Partition time slots into real-time and
best-effort
44Attempt 3
- Assign weight to application class, based on
their priority - Service based on weight
45Attempt 3 Cello
46Class Independent Scheduler
47Allocating Disk Bandwidth
- Allocate in proportion to time
- Allocate in proportion to bytes
48Notations
- P Interval of a round
- I Total idle time so far in this round
- Ui Time allocated so far to class i
- wi Weight for class i
- W Total weight for all class
49Proportionate Time-Allocation
?Ui lt P-I
50Proportional Time Allocation
Ui lt (P-I)wi/W
51Example
10
20
16
14
Weights 112 P 100 I 30
52 Pick a class i which is underutilized, i.e. Ui lt
(P-I)wi/W
53Class specific schedule will return a request to
be inserted, plus to location in the scheduled
queue for insertion. (r, prev, next)
next
r
prev
54Need to Make Sure..
- Does not exceed share for class i
Ui T lt (P-I)wi/W
service time for new request
55Need to Make Sure..
- Total service time does not exceed available time
?Ui T Tnext Tnext lt P-I
56Update and Repeat
next
prev
57What 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
58Improving 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
59Free Time Utilization
60Class Specific Scheduler
- How to pick (r, prev, next)?
61Slack Time
- li Latest time you must begin servicing request
i - ei Earliest time you may begin servicing
request i - di Deadline for request i
- si Slack time for i li - ei
62Slack Time
- li min(di, li1) Ti
- ei ei-1 Ti-1
- Special case when request is at the beginning of
queue or end of queue.
63Slack Time
i
i
64Class 1 Interactive Best Effort
pick r at front of pending queue, insert into
earliest position in scheduled queue without
violating deadlines of others.
next
prev
65Class 2 High Throughput Best Effort
pick r at front of pending queue, insert into
tail of scheduled queue. Order consecutive best
effort request by SCAN order.
next
prev
66Class 3 Real Time Application
pick r in EDF order. Insert into scheduled queue
such that it will meet its deadline and will not
violate deadlines of others
next
prev
67Evaluations
SCAN
response time of best effort app
Cello
video
68Evaluations
bandwidth
text app
50
video app
No video
time
69Cello Summary
- OS disk scheduler
- Support multiple classes
- Protect classes from each other
- Work conserving
- Use two-level scheduling