690 likes | 823 Views
Multimedia Storage Issues. Media vs. Documents. large file size write once, read many deadlines!. OS Review: Disk . Disk. head, spindle, track, sector, cylinder seek time, rotational latency. Disk Scheduler. read/write command. disk sched. I/O Request. Disk Scheduling Algorithm.
E N D
Media vs. Documents • large file size • write once, read many • deadlines! NUS.SOC.CS5248 OOI WEI TSANG
Disk head, spindle, track, sector, cylinder seek time, rotational latency NUS.SOC.CS5248 OOI WEI TSANG
Disk Scheduler read/write command disk sched I/O Request NUS.SOC.CS5248 OOI WEI TSANG
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. NUS.SOC.CS5248 OOI WEI TSANG
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- ) NUS.SOC.CS5248 OOI WEI TSANG
Contiguous NUS.SOC.CS5248 OOI WEI TSANG
Fragmented NUS.SOC.CS5248 OOI WEI TSANG
Stripping (RAID-0) NUS.SOC.CS5248 OOI WEI TSANG
Mirroring (RAID-1) NUS.SOC.CS5248 OOI WEI TSANG
Parity (RAID-5) NUS.SOC.CS5248 OOI WEI TSANG
Parity NUS.SOC.CS5248 OOI WEI TSANG
Summary of Concerns • High Throughput • Fault Tolerant • Load balancing NUS.SOC.CS5248 OOI WEI TSANG
Design Parameters • unit of striping (block size) • degree of striping (num of disks) NUS.SOC.CS5248 OOI WEI TSANG
Stripe Unit NUS.SOC.CS5248 OOI WEI TSANG
Stripe Unit NUS.SOC.CS5248 OOI WEI TSANG
Effects of Block Size service time Block Size NUS.SOC.CS5248 OOI WEI TSANG
Problem • Find block size such that the service time for the most heavily loaded disk is minimize NUS.SOC.CS5248 OOI WEI TSANG
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 NUS.SOC.CS5248 OOI WEI TSANG
Assumptions • Non-redundant array • Analyze read operation only NUS.SOC.CS5248 OOI WEI TSANG
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 NUS.SOC.CS5248 OOI WEI TSANG
Analysis Suppose i request m blocks NUS.SOC.CS5248 OOI WEI TSANG
Reading 1 block Prob(Nb(i,j)=1) NUS.SOC.CS5248 OOI WEI TSANG
Reading k block Prob(Nb(i,j)=k) NUS.SOC.CS5248 OOI WEI TSANG
Total Num of Blocks from Disk j • Nb(*,j) = NUS.SOC.CS5248 OOI WEI TSANG
Busiest Disk • Nmax = NUS.SOC.CS5248 OOI WEI TSANG
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)_ NUS.SOC.CS5248 OOI WEI TSANG
Model Verification Service Time Block Size NUS.SOC.CS5248 OOI WEI TSANG
Imbalance and Overhead • I = 1 – Tavg/Tmax • O = 1 – NmaxBTt/Tmax NUS.SOC.CS5248 OOI WEI TSANG
Effects of Block Size Imbalance Overhead ~optimum Block Size NUS.SOC.CS5248 OOI WEI TSANG
Effects of Clients Nc incr, I decr, opt B incr Imbalance Overhead Block Size NUS.SOC.CS5248 OOI WEI TSANG
Effects of Clients Block Size Nc NUS.SOC.CS5248 OOI WEI TSANG
Effects of Num of Disks Nd incr, N(i,j) decr, I incr, opt B decr Block Size Nd NUS.SOC.CS5248 OOI WEI TSANG
Choosing Block Size • Given Nc, assume rest is fixed • find B that minimize T • if T < duration of a round incr Nc and try again NUS.SOC.CS5248 OOI WEI TSANG
There is more.. • redundant array • finding optimum degree of striping NUS.SOC.CS5248 OOI WEI TSANG
Problem • How to co-exist with other applications? NUS.SOC.CS5248 OOI WEI TSANG
Classes of Applications • Real-time • hard/soft • periodic/aperiodic • Best-effort • interactive • troughput-intensive NUS.SOC.CS5248 OOI WEI TSANG
Attempt 1 • Priority-based scheduler • Always schedule real-time tasks ahead of best-effort tasks NUS.SOC.CS5248 OOI WEI TSANG
Attempt 2 • Partition time slots into real-time and best-effort NUS.SOC.CS5248 OOI WEI TSANG
Attempt 3 • Assign weight to application class, based on their priority • Service based on weight NUS.SOC.CS5248 OOI WEI TSANG
Attempt 3: Cello • Two-level scheduling NUS.SOC.CS5248 OOI WEI TSANG
Class Independent Scheduler NUS.SOC.CS5248 OOI WEI TSANG
Allocating Disk Bandwidth • Allocate in proportion to time • Allocate in proportion to bytes NUS.SOC.CS5248 OOI WEI TSANG
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 NUS.SOC.CS5248 OOI WEI TSANG
Proportionate Time-Allocation Ui < P-I NUS.SOC.CS5248 OOI WEI TSANG
Proportional Time Allocation Ui < (P-I)wi/W NUS.SOC.CS5248 OOI WEI TSANG