nus.soc.cs5248 ooi wei tsang 1 course matters. nus.soc.cs5248 ooi wei tsang 2 make-up lecture this...
DESCRIPTION
NUS.SOC.CS5248 Ooi Wei Tsang 3 Multimedia Storage IssuesTRANSCRIPT
1NUS.SOC.CS5248Ooi Wei Tsang
Course Matters
NUS.SOC.CS5248Ooi Wei Tsang
2
Make-Up LectureThis Saturday, 23 OctoberTR7, 1-3pm
Topic: “CPU scheduling”
3NUS.SOC.CS5248Ooi Wei Tsang
Multimedia Storage Issues
NUS.SOC.CS5248Ooi Wei Tsang
4
Media vs. Documents
NUS.SOC.CS5248Ooi Wei Tsang
5
Media vs. Documents large file sizewrite once, read many sequential accessperiodic accessdeadlines
NUS.SOC.CS5248Ooi Wei Tsang
6
Average Service Time?
7NUS.SOC.CS5248Ooi Wei Tsang
OS Review: Disk
NUS.SOC.CS5248Ooi Wei Tsang
8
Disk
head, spindle, track, sector, cylinder
NUS.SOC.CS5248Ooi Wei Tsang
9
Latency components
seek time, rotational time and transfer time
NUS.SOC.CS5248Ooi Wei Tsang
10
Disk Scheduler
disksched
I/O Request
read/write command
11NUS.SOC.CS5248Ooi Wei Tsang
OS Review: Disk Scheduling Algorithm
NUS.SOC.CS5248Ooi Wei Tsang
12
FCFS
98 183 37 122 14 124 65 67
NUS.SOC.CS5248Ooi Wei Tsang
13
SSTF
98 183 37 122 14 124 65 67
NUS.SOC.CS5248Ooi Wei Tsang
14
SCAN (Elevator)
98 183 37 122 14 124 65 67
NUS.SOC.CS5248Ooi Wei Tsang
15
C-SCAN
98 183 37 122 14 124 65 67
NUS.SOC.CS5248Ooi Wei Tsang
16
EDF
98 183 37 122 14 124 65 6730 10 13 5 24 33 21 39
NUS.SOC.CS5248Ooi Wei Tsang
17
EDF-SCAN
98 183 37 122 14 124 65 6730 10 13 5 24 33 21 39
NUS.SOC.CS5248Ooi Wei Tsang
18
Other SchemesFD-SCAN
SSEDO
SSEDV
19NUS.SOC.CS5248Ooi Wei Tsang
Data Placement
NUS.SOC.CS5248Ooi Wei Tsang
20
Contiguous
NUS.SOC.CS5248Ooi Wei Tsang
21
Fragmented
NUS.SOC.CS5248Ooi Wei Tsang
22
Striping (RAID-0)
NUS.SOC.CS5248Ooi Wei Tsang
23
Mirroring (RAID-1)
NUS.SOC.CS5248Ooi Wei Tsang
24
Parity (RAID-5)
NUS.SOC.CS5248Ooi Wei Tsang
25
Parity
NUS.SOC.CS5248Ooi Wei Tsang
26
Summary of ConcernsHigh ThroughputFault TolerantLoad balancing
NUS.SOC.CS5248Ooi Wei Tsang
27
This LectureConsider striping only (RAID-0)
28NUS.SOC.CS5248Ooi Wei Tsang
Efficient Striping Techniques for Multimedia File Servers P. Shenoy, H. VinNOSSDAV 97
NUS.SOC.CS5248Ooi Wei Tsang
29
Design Parametersunit of striping (block size)degree of striping (num of disks)
NUS.SOC.CS5248Ooi Wei Tsang
30
Stripe Unit
NUS.SOC.CS5248Ooi Wei Tsang
31
ModelDisk 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
NUS.SOC.CS5248Ooi Wei Tsang
32
Effects of Block Size
Block Size
servicetime
NUS.SOC.CS5248Ooi Wei Tsang
33
ProblemFind block size such that the
service time for the most heavily loaded disk is minimize
NUS.SOC.CS5248Ooi Wei Tsang
34
Analysis Model: A Planservice time of the busiest disk
as a function of block sizeexpected num of blocks
accessed on the busiest diskexpected num of blocks
accessed on any disk
NUS.SOC.CS5248Ooi Wei Tsang
35
AssumptionsNon-redundant arrayVBRAnalyze read operation only
NUS.SOC.CS5248Ooi Wei Tsang
36
Variables DeclarationNd : Number of Disks
Nc : Number of Clients
B : Block size
NUS.SOC.CS5248Ooi Wei Tsang
37
Variables DeclarationNb(i,j): Number of blocks client i
access from disk j
Pa(i,m): Probability of i access m blocks in a round
NUS.SOC.CS5248Ooi Wei Tsang
38
AnalysisSuppose i request m blocks
NUS.SOC.CS5248Ooi Wei Tsang
39
Reading 1 blockProb(Nb(i,j)=1)
Nd : Number of DisksNc : Number of ClientsB : Block sizeNb(i,j): Number of blocks client
i access from disk jPa(i,m): Probability of i access
m blocks in a round
NUS.SOC.CS5248Ooi Wei Tsang
40
Reading k blockProb(Nb(i,j)=k)
Nd : Number of DisksNc : Number of ClientsB : Block sizeNb(i,j): Number of blocks client
i access from disk jPa(i,m): Probability of i access
m blocks in a round
NUS.SOC.CS5248Ooi Wei Tsang
41
Blocks Read From a Disk Nb(*,j) =
Nd : Number of DisksNc : Number of ClientsB : Block sizeNb(i,j): Number of blocks client
i access from disk jPa(i,m): Probability of i access
m blocks in a round
NUS.SOC.CS5248Ooi Wei Tsang
42
Busiest DiskNmax =
Nd : Number of DisksNc : Number of ClientsB : Block sizeNb(i,j): Number of blocks client
i access from disk jPa(i,m): Probability of i access
m blocks in a round
NUS.SOC.CS5248Ooi Wei Tsang
43
Access TimeT = Nmax(ts + tr + Btt)
Depends on:block size Bdisk characteristic ts,tr,tt
server design Nd
workload characteristic Nc, Nb(i,j)_
Nd : Number of DisksNc : Number of ClientsB : Block sizeNb(i,j): Number of blocks client
i access from disk jPa(i,m): Probability of i access
m blocks in a round
NUS.SOC.CS5248Ooi Wei Tsang
44
Model Verification
NUS.SOC.CS5248Ooi Wei Tsang
45
Imbalance and Overhead
NUS.SOC.CS5248Ooi Wei Tsang
46
Effects of Block Size
NUS.SOC.CS5248Ooi Wei Tsang
47
Effects of Clients
NUS.SOC.CS5248Ooi Wei Tsang
48
Effects of Num of Disks
NUS.SOC.CS5248Ooi Wei Tsang
49
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.CS5248Ooi Wei Tsang
50
There is more.. redundant arrayfinding optimum degree of striping
51NUS.SOC.CS5248Ooi Wei Tsang
Cello: A Disk Scheduling Framework for Next Generation Operating Systems P. Shenoy, H. VinSIGMETRICS 98
NUS.SOC.CS5248Ooi Wei Tsang
52
ProblemHow to co-exist with other
applications?
NUS.SOC.CS5248Ooi Wei Tsang
53
Classes of ApplicationsReal-time
hard/soft periodic/aperiodic
Best-effort interactive troughput-intensive
NUS.SOC.CS5248Ooi Wei Tsang
54
Attempt 1Priority-based schedulerAlways schedule real-time tasks
ahead of best-effort tasks
NUS.SOC.CS5248Ooi Wei Tsang
55
Attempt 2Partition time slots into real-time
and best-effort
NUS.SOC.CS5248Ooi Wei Tsang
56
Attempt 3Assign weight to application class,
based on their priorityService based on weight
NUS.SOC.CS5248Ooi Wei Tsang
57
Attempt 3: CelloTwo-level scheduling
NUS.SOC.CS5248Ooi Wei Tsang
58
Class Independent Scheduler
NUS.SOC.CS5248Ooi Wei Tsang
59
Allocating Disk BandwidthAllocate in proportion to timeAllocate in proportion to bytes
NUS.SOC.CS5248Ooi Wei Tsang
60
Proportionate Time-Allocation
NUS.SOC.CS5248Ooi Wei Tsang
61
VariablesP : Interval of a period I : Idle time so farUi : Allocated time for class iwi : Weightage of class i
NUS.SOC.CS5248Ooi Wei Tsang
62
Proportional Time Allocation
NUS.SOC.CS5248Ooi Wei Tsang
63
Example
Weights 1:1:2P = 100I = 30
10 20 16 14
NUS.SOC.CS5248Ooi Wei Tsang
64
NUS.SOC.CS5248Ooi Wei Tsang
65
r
next
prev
NUS.SOC.CS5248Ooi Wei Tsang
66
Need to Make Sure..Does not exceed share for class i
NUS.SOC.CS5248Ooi Wei Tsang
67
Need to Make Sure..Total service time does not exceed
available time
NUS.SOC.CS5248Ooi Wei Tsang
68
Update and Repeat
next
prev
NUS.SOC.CS5248Ooi Wei Tsang
69
Being Work ConservingWork conserving: “don’t work only
if no work to do”
NUS.SOC.CS5248Ooi Wei Tsang
70
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
NUS.SOC.CS5248Ooi Wei Tsang
71
Improving UtilizationWhen disk is idle, distribute service
time among classes in too_much_work group
Pick a request from this class and put into scheduled queue
NUS.SOC.CS5248Ooi Wei Tsang
72
Free Time Utilization
NUS.SOC.CS5248Ooi Wei Tsang
73
Class Specific SchedulerHow to pick (r, prev, next)?
Must not affect tasks in queue Idea: Compute slack time
NUS.SOC.CS5248Ooi Wei Tsang
74
Slack Time li Latest time must begin
servicing request iei Earliest time may begin
servicing request idi Deadline for request isi Slack time for i = li – ei
ti Time to service request i
NUS.SOC.CS5248Ooi Wei Tsang
75
Slack Time
i
i
NUS.SOC.CS5248Ooi Wei Tsang
76
Class 1: Interactive Best Effort
next
prev
NUS.SOC.CS5248Ooi Wei Tsang
77
Class 2: High Throughput Best Effort
next
prev
NUS.SOC.CS5248Ooi Wei Tsang
78
Class 3: Real Time Application
next
prev
NUS.SOC.CS5248Ooi Wei Tsang
79
Evaluationsresponsetime
# video
NUS.SOC.CS5248Ooi Wei Tsang
80
Evaluations%time
time
NUS.SOC.CS5248Ooi Wei Tsang
81
Cello SummaryOS disk schedulerSupport multiple classesProtect classes from each otherWork conservingUse two-level scheduling