Академический Документы
Профессиональный Документы
Культура Документы
Chapter 2: Basics
Chapter 3: Multimedia Systems – Communication Aspects and Services
Chapter 4: Multimedia Systems
– Storage Aspects
• Optical Storage Media
4.2: Multimedia File Systems
• Multimedia File Systems
• Traditional File Systems
• Multimedia Database
• Multimedia File Systems
Systems
• Disk Scheduling in
Chapter 5: Multimedia Usage Traditional and Multimedia
File Systems
• Data Structuring
• System Architecture
Disk Layout
The layout of a disk determines
• the way in which content is addressed
• how much storage space on the media is actually addressable and usable
• the density of stored content on the media
Tracks and sectors
• A hard disk consists of one or more heads
• A hard disk is divided into tracks
and further into sectors (512 Byte)
• The same track on all heads is called cylinder
• Storage of a file is done in terms of sectors
• Unused space of a sector is wasted
• Easy mapping of file location information
to head movement and disc rotation
• Constant angular velocity (CAV),
i.e. same access time to inner/outer tracks
• Access to a sector by a movable disk arm
Chapter 4.2: Multimedia File Systems Page 3
Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme
Disk Layout
The file system manages the data organization on a disk and consists of:
1. Files: program codes, data
2. Directory Structure: Organizes files (usually in a tree structure) and provides
information, e.g.
-rwxr-xr-x 1 root other 55160 Jul7 2004 gcc*
Files root
Traditional Files:
Directory
• Executables of programs
• Numeric data
• Text
• Objects etc.
Goals:
• Provide a comfortable interface for file access
• Make efficient use of storage medium (in terms
of space and also of access time to sectors)
Contiguous Placement
Non-contiguous Placement
1st file
2nd file
3rd file
In traditional file systems, efficient usage of storage capacity is the main goal. The total
time to service a request to a file in such a system consist of:
• Seek time, head positioning to appropriate track (diameter)
Delay
• Latency (rotation time), time to find the block in the track
• Actual data transfer time
Technique to reduce delay:
• Seek operation → Scheduling algorithms
• Latency → File allocation methods
Next, we will consider strategies for minimizing the seek time, i.e. for the positioning time
of the head to the appropriate track. Tracks are numbered 0, ..., N - 1. Here, 0 is the
innermost and N - 1 the outermost track.
successive requests
i+1 173 i+1
31 i+2
130
i+2 13
133
order of
63
69
Queue
(51)
108
173
31
SSTF movement: 243 130
13
133
63
Optimal overall 69
movement: 198
+ Fair service
- More uniform waiting time
- Performance not as good as SCAN
+Chapter
Middle4.2: Multimedia
tracks a better service than edge tracks (such as with SCAN or withPage
File Systems
don’t get 14
SSTF)
Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme
#samples
C(t, t0) = rC ·(t- t0)
0 tr t t0 t
tw = minimal starting time without gaps
R(t) = Total number of samples read up to time t C(t, t0) = Number of consumed
tr : Reading is completed samples up to time t
t0 : Playback starts rC = Rate of consumed samples
“The earlier the first sample is played out, the less buffer requirement”
Theorem 1:
The solution using the minimum start time for playback
#samples
R(t)
also requires the least buffer space at any point in time.
⎧R ( t ) if t < y
B( t , y ) = ⎨
⎩ R ( t ) − rC ⋅ ( t − y ) if t ≥ y it follows for gap-free playout:
R( t ) − rC ⋅ t + rC ⋅ y ≥ 0
This must also hold for y = tw and since tw is the minimum starting time we have:
rC ⋅ t W ≤ rC ⋅ y and B(t, tw) ≤ B(t, y)
Chapter 4.2: Multimedia File Systems Page 17
Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme
G S+G
To fulfill the requirements of multimedia data, scheduling has another focus than in
traditional file systems:
• Goals in Traditional File Systems:
Reduce cost of seek time (effective utilization of disk arm)
Achieve fair throughput
Provide fair disk access
Achieve short average response times
• Goals in Multimedia File Systems are different:
Meet deadlines of all time-critical tasks
Keep the necessary buffer space requirements low
Find balance between time constraints and efficiency
3 50
2 42
1 45
1 12 1 12 1 45 2 42 3 50 2 16 3 30
2 40 2 40 1 12 1 45 2 42 3 50 2 16
1 22 2 40 2 40 2 40 2 42 3 50
1 22
22 12 45 40 42 16
• Poor throughput due to excessive seek time. Only deadlines are taken into account, but
not track number.
Chapter
• Very4.2: Multimedia
similar File Systems
to FCFS: Page 22
inefficient. Does not reflect the geographical position of tracks.
Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme
• Thus if the deadline for a task on track 42 is equal to 3 then the perturbed deadline is
3 + 100
42
= 3,42
• This deadline is given to the task at arrival time
3.50 50 2.16 16
3.50 50
2.42 42 3.50 50
2.42 42
1.45 45 2.42 42 2.42 42
2.40 40 2.40 40 16
1.12 12 1.45 45
2.40 40 1.45 45
2.40 40 1.12 12 40
deadline 2, i.e. ∈ [2:3]
2.40 40 1.22 22
1.22 22 45
1.22 22
22
deadline 1, i.e. ∈ [1:2]
12
• Optimization only applies for requests with
• Among the same deadline SCAN is applied the same deadline before the comma
• Request with the earliest deadline is served • Increase this probability by grouping the
• Chapter
Sensible4.2:only
Multimedia File Systems
for a large number of requests requests Page 25
Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme
0 10 20 30 40 50
SCAN-EDF EDF
Deadlines
Disk Scheduling
• Filling status of buffers indicate when to switch from SSTF to “Balanced“ and vice
versa
1
• “Urgency“ criterion: Urgency = ∑
( all streams i ) Fullness i
Components of a strand:
• Media Blocks (MB): placed according to a placement model
• Primary Blocks (PB): contain a sequence of (MB, disk-location) pairs
• Secondary Blocks (SB): contains pointers to PB
• Header Block (HB): root of the strand (pointers to all SB, recording length, rate)
HB
SB SB
SB SB
Requirement
Strand 1 Strand 1
Continuity
Audio Synchronization Video
Strand 2 Requirement Strand 2
Audio Audio
Video Video
INSERT
Rope1 Rope2
Audio Audio
Video Video
Audio Audio
Video Video
REPLACE
Rope1 Rope2
Audio Audio
Video Video
Operations
• INSERT [baseRope, position, media, withRope, withInterval]
• REPLACE [baseRope, position, media, withRope, withInterval]
• SUBSTRING [baseRope, media, interval]
• CONCATENATE [mmRopeID1, mmRopeID2]
Chapter 4.2: Multimedia
• DELETE [baseRope,File Systems
media, interval] Page 37
Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme
• Further operations:
RECORD [media][requestID, mmRpeID]
Records a multimedia rope represented by “mmRopeID“ which consists of
several media strands until a STOP operation is issued
PLAY [mmRopeID, interval, media] requestID
STOP [requestID]
System Architecture
RTE
NRTE
Applications
• Applications make use of systems
calls in the NRTE
user • Extensions to the operating system
space Operating System (i.e. RTE) are part of the kernel space
kernel
space e.g. Traditional
Scheduler
e.g. Deadline
Scheduler
RTE
Source Sink
Stream Sync/Stream Stream
Handler Manager Handler