Multimedia Storage Issues - PowerPoint PPT Presentation

About This Presentation
Title:

Multimedia Storage Issues

Description:

SCAN: Serve all requests in one direction, then in the other direction ... How to co-exist with other applications? NUS.SOC.CS5248. OOI WEI TSANG. 41 ... – PowerPoint PPT presentation

Number of Views:14
Avg rating:3.0/5.0
Slides: 70
Provided by: dcso
Category:

less

Transcript and Presenter's Notes

Title: Multimedia Storage Issues


1
Multimedia Storage Issues
2
Media vs. Documents
  • large file size
  • write once, read many
  • deadlines!

3
OS Review Disk
4
Disk
head, spindle, track, sector, cylinder seek time,
rotational latency
5
Disk Scheduler
read/write command
disk sched
I/O Request
6
Disk Scheduling Algorithm
7
Best 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.

8
Other 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- ?)

9
Data Placement
10
Contiguous
11
Fragmented
12
Stripping (RAID-0)
13
Mirroring (RAID-1)
14
Parity (RAID-5)
15
Parity
16
Summary of Concerns
  • High Throughput
  • Fault Tolerant
  • Load balancing

17
Design Parameters
  • unit of striping (block size)
  • degree of striping (num of disks)

18
Stripe Unit
19
Stripe Unit
20
Effects of Block Size
service time
Block Size
21
Problem
  • Find block size such that the service time for
    the most heavily loaded disk is minimize

22
Analysis 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

23
Assumptions
  • Non-redundant array
  • Analyze read operation only

24
Variables 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

25
Analysis
  • Suppose i request m blocks

26
Reading 1 block
  • Prob(Nb(i,j)1)

27
Reading k block
  • Prob(Nb(i,j)k)

28
Total Num of Blocks from Disk j
  • Nb(,j)

29
Busiest Disk
  • Nmax

30
Access 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)_

31
Model Verification
Service Time
Block Size
32
Imbalance and Overhead
  • I 1 Tavg/Tmax
  • O 1 NmaxBTt/Tmax

33
Effects of Block Size
Imbalance
Overhead
Block Size
optimum
34
Effects of Clients
Nc incr, I decr, opt B incr
Imbalance
Overhead
Block Size
35
Effects of Clients
Block Size
Nc
36
Effects of Num of Disks
Nd incr, N(i,j) decr, I incr, opt B decr
Block Size
Nd
37
Choosing 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

38
There is more..
  • redundant array
  • finding optimum degree of striping

39
Cello Disk Scheduler
40
Problem
  • How to co-exist with other applications?

41
Classes of Applications
  • Real-time
  • hard/soft
  • periodic/aperiodic
  • Best-effort
  • interactive
  • troughput-intensive

42
Attempt 1
  • Priority-based scheduler
  • Always schedule real-time tasks ahead of
    best-effort tasks

43
Attempt 2
  • Partition time slots into real-time and
    best-effort

44
Attempt 3
  • Assign weight to application class, based on
    their priority
  • Service based on weight

45
Attempt 3 Cello
  • Two-level scheduling

46
Class Independent Scheduler
47
Allocating Disk Bandwidth
  • Allocate in proportion to time
  • Allocate in proportion to bytes

48
Notations
  • 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

49
Proportionate Time-Allocation
?Ui lt P-I
50
Proportional Time Allocation
Ui lt (P-I)wi/W
51
Example
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
53
Class specific schedule will return a request to
be inserted, plus to location in the scheduled
queue for insertion. (r, prev, next)
next
r
prev
54
Need to Make Sure..
  • Does not exceed share for class i

Ui T lt (P-I)wi/W
service time for new request
55
Need to Make Sure..
  • Total service time does not exceed available time

?Ui T Tnext Tnext lt P-I
56
Update and Repeat
next
prev
57
What 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

58
Improving 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

59
Free Time Utilization
60
Class Specific Scheduler
  • How to pick (r, prev, next)?

61
Slack 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

62
Slack 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.

63
Slack Time
i
i
64
Class 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
65
Class 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
66
Class 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
67
Evaluations
SCAN
response time of best effort app
Cello
video
68
Evaluations
bandwidth
text app
50
video app
No video
time
69
Cello Summary
  • OS disk scheduler
  • Support multiple classes
  • Protect classes from each other
  • Work conserving
  • Use two-level scheduling
Write a Comment
User Comments (0)
About PowerShow.com