Title: Design of Operating Systems that support Distributed Multimedia Applications
1Design of Operating Systems that support
Distributed Multimedia Applications
- Vijay Gondi
- Dhigha D Sekaran
2What is Multimedia OS ?
- A Multimedia OS extends functionality of
traditional OS's to accommodate multimedia data
manipulation, so as to provide an environment for
Real-Time Support, while simultaneously running
traditional applications efficiently. - The architecture of the MM OS is optimized for
dealing with real-time, high-bandwidth data types
such as audio and video, and for handling a wide
array of communications capabilities.
3How to Build Multimedia OS ?
- Extension of traditional OS.
- Constructing from scratch using micro-kernel
architecture( Ex. CHORUS, Real-Time Mach).
4Technology Thrust
- Multimedia workstations with audio and video
processing capabilities - Tremendous improvement in CPU processing power
- Special purpose compression engines for video and
audio - High capacity, high performance storage devices
- Availability of magnetic disks with several
gigabyte capacity, tremendous increase in data
transfer for large optical storage servers
evolving rapidly - High speed fibre optic networks and fast packet
switching technology - Networks with 100-200 Mbits/s already in place,
prototype gigabit networks also being deployed
5Service Vision and Applications
- Residential services
- Switching access television, video on demand
- Video phone/conferencing systems
- Video advertising and shopping (e.g, multimedia
catalogue classified by category, product
demonstrations, real estate sales,..) Residential
services - Business services
- Corporate education
- Desktop MM conferencing and multimedia e-mail
- Education services
- MM repository of available classes, videos,
books,.. - Access to digital MM library over high speed
networks - Science and Technology
- Computational prototyping and scientific
visualization - Astronomy and environmental science studies
efficient access to large number of satellite
images - Medicine
- Diagnosis and treatment- support queries like
where was the tumor found, what happened to the
tumor and assessment of therapeutic response(I.e
, temporal analysis, etc
6Hierarchy of Distributed Multimedia Applications
- Class 1 Information Retrieval
- Distance Learning
- Class 2 Information retrieval and processing
- Digital library of satellite imagery, subsurface
modeling - Desktop MM conferencing and multimedia e-mail
- Class 3 Interactive systems
- Education and training for fire fighters, command
and control
7Design Difficulties.
- Real-time performance requirements
- Large sizes of information objects
8Real-Time requirements for Multimedia
- The fault-tolerance requirements of multimedia
systems are less strict than those of real-time
systems - - Such as a delay in delivering
video-on-demand, will not lead to the destruction
of technical equipment - Missing a deadline in a multimedia system is not
a severe failure - - If an uncompressed video frame is not
prepared on time, it can simply be omitted - A sequence of digital continuous-media data
results from periodically sampling a sound or
image signal - - Scheduling periodic task is much easier than
scheduling sporadic ones - The bandwidth demand of continuous media is not
always that stringent - - If not enough bandwidth is available for full
quality, the application can accept a reduced
quality
9 Main Characteristics of Multimedia OS
- CPU Management
- Memory Management
- I/O Management
- File-System Management
- Resource Management
- Synchronization Issues
10Resource Management
- In MM Operating System the given timing
guaranties for the processing of continuous media
must be adhered to by every H/W and S/W component
along the data path. - In a Distributed MM system several applications
compete for resources - Shortage of resources requires careful
allocation. - Resource types
- Active/Passive
- Active Resource like CPU, Network Adaptor
provides a service - Passive Resource like Main Memory, Communication
Bandwidth, File System etc denotes system
capability required by active resources - Exclusive or Shared
- Single or Multiple A resource type that
exists only once in the system is single,
otherwise multiple -
11Phases of Resource Management
- Schedulability test The Resource Manager checks
whether, given the Qos Parameters-Throughput and
Reliability, for e.g.-there is enough resource
capacity to handle the additional request - Quality-of-service calculation The Resource
Manager Calculates the best possible performance. - Resource reservation The Resource Manager
allocates the capacity required to meet the Qos
guarantees for each request. - Resource scheduling The incoming messages are
Scheduled according the given Qos guarantees. In
Process Management, for instance, the Scheduler
allocates resources a the moment the data arrives
for processing.
12Resource Management
- QOS requirements
- - Throughput It is Determined by the
- data rate a connection needs to satisfy the
application requirements, as well as the size of
the data units - - delay(local or global) Local Delay is the max
time a resource takes to complete a certain task.
Global Delay is the total delay for a data unit
traveling from its source to its destination - - Jitter Maximum allowed variance in the arrival
of data at the destination - - Reliability Error Detection and Error
Correction Mechanisms used for the transmission
and processing of MM tasks
13Resource Management
- Allocation Schemes
- Pessimistic or guaranteed Approach avoids
resource conflicts by making reservations for the
worst case that is reserving resource bandwidth
for the longest processing time and the highest
rate a task might ever need. Leads to
Underutilization of resources. - Optimistic or statistical Reserves resources
according to the average workload only. If
Resources are highly utilization this may lead to
failure
14CPU Management
- Real time Processing can be achieved through
efficient real time scheduling. - The Challenges of MM Scheduling is due to two
conflicting goals - Non Real Time Processes should not suffer from
the execution of real time processes - Real Time Processes should be allowed to preempt
non real time processes and other other real time
processes with lower priorities. - The Most important real time scheduling
approaches include EDF and RMS
15EDF(Earliest Deadline First)
- At Any Interval of a new task, EDF immediately
computes a new order that is, it preempts the
running task and schedules the new tasks
according to its deadlines. - EDF not only periodic tasks but also tasks with
arbitrary requests, deadlines and service
executions - Upper bound of processor utilization in EDF is
100. - EDF assigns priorities according to deadlines.
The highest priority is assigned to task with
earliest deadlines and lowest to the one with
furthest - Extension divides every task into a mandatory and
an optional part - The optional parts are processed if the resource
capacity is not fully utilized
16Rate Monotonic Algorithm(RMS)
- Each Task is Preemptive and is assigned a
priority according to the request rate. - The Highest priority is assigned to the job with
the highest rate - It is an optimal, static, priority-driven
algorithm for preemptive, periodic jobs - No other static algorithm can schedule a task set
that set that the RM cannot schedule - It assigns static priorities to tasks at the
connection setup phase according to their
requests - Each task is processed with no further
rearrangement of priorities required - The following 5 assumptions are prerequisites of
RMS - The requests for all tasks with deadlines are
periodic - The Processing of Single task must finish before
the processing of the next task in the same data
stream - All tasks are independent
- Runtime for each request of a task is constant
- Any non-periodic task in the system has no
required deadline.
17EDF and RMS Scheduling Example
18 EDF vs RMS
- EDF is more dynamic. Since it has to be executed
frequently it incurs higher scheduling overheads.
RMS is a static algorithm - Since priorities are assigned according to the
request rate, more context switches occur in RMS
than in EDF - EDF can achieve processor utilization of up to
100RMS has an worst case upper bound of about
69 - Because it has no scheduling overhead and is
optimal for periodic jobs, RMS is suitable for
continuous media applications
19EDF vs RMS
20MM Support in various Operating Systems
21MM Applications in Operating Systems
22Comparison of MM support in Windows and Mac
23File Management
- Distributed MM applications impose major
challenges in the design of MM servers including - Massive storage of huge amount of data
- Real time storage and retrieval performance at
specified Qos Guarantees. - High Data Throughput to support large number of
simultaneous user requests. - The internals of how the System represents
information in files and how it accesses those
files in secondary storage are important to us in
the design and implementation of the file system. -
24File Management
- File System Manages Disk Bandwidth, Storage
Space - Disk Bandwidth Disk Scheduling Algorithms
- Storage Space Placement Techniques.
- Real-time Storage and retrieval CM recording
devices( such as video cameras) generates a
continuous stream of media quanta that should be
stored in real time. CM playback is essentially
the reverse. ( Need for the same timing sequence)
Any deviation leads to jerkiness in video
motion, pops in Audio, or possibly complete
unintelligibility. Further more need for
synchronization between two media. - High Data transfer rate and large storage space
Digital video and audio playback, require
efficient store, retrieve, and manipulate data in
large quantities at high speeds.
25Approaches to supporting continuous media in file
systems
- a. Organization of the files on disk remains as
it is, with the necessary real-time support
provided through special disk-scheduling
algorithms and enough buffer capacity to avoid
jitter. - b. Second approach is to optimize the
organization of audio and video files, especially
on distributed hierarchical storage like disk
arrays. The basic idea being to increase the
throughput and capacity by storing the data of
each audio and video file on several volumes.
26Storage methods
- Contiguous Placement
- Continuous storage of data, requiring just one
seek to position the disk head at the start of
the data. Suitable for VOD Servers (WORM
philosophy). - Disadvantages Subject to Fragmentation, and
require enormous copying overheads during
insertions and deletions to maintain continuity. - Constrained Placement
- Constrained placement allows the successive
segments of media stream to be scattered as long
as the inter-segment separation is bounded by the
constraint of playback continuity. - Disadvantages Require elaborate algorithms to
assure that separation between blocks conforms to
the required constraints.
27Storage Methods
- Log-Structured Placement.
- To reduce disk seeks, when modifying blocks of
data, log-structured systems do not store
modified blocks in their original positions.
Instead, all writes are performed sequentially in
a large contiguous free space. (Suitable for
extensive editing systems) - Disadvantage Playback performance is more
complex to implement. -
- Data striping
- Interleave the storage of each media stream among
disks - Stripe Unit maximum amount logically continuous
data that is stored on a single disk. - Degree of Striping Number of disks across which
a media stream is striped. - RAID (redundant array of inexpensive disks)
28Data placement schemes for multimedia storage
(a) contiguous placement, (b) constrained
placement, and (c) log-structured placement
29Striped data accessed in parallel.(RAID
Architecture).
30Disk Scheduling
- Disk Fundamentals
- - Seek Time
- - Rotational Latency
- - Transfer Rate
31Disk Scheduling Algorithms
- EDF, Earliest Deadline First
- block of stream with the nearest streams are
read first - Most often applied as a preemptive scheduling
scheme - EDF must be adapted or combined with file system
strategies - SCAN-EDF
- Combination of Scan and EDF Mechanisms
- Seek optimization of Scan and the real-time
guarantees of EDF are combined the request with
the earliest deadline is always served first, if
the deadline are same the specific one that is
first according to the scan direction is served
first - SCAN-EDF can be easily implemented
32Disk Scheduling Algorithms .
- Group Sweeping Scheduling, GSS
- Requests are served in cycles, in round-robin
manner - To reduce disk arm movements, the set of n
streams is divided in to g groups. Groups are
served in fixed order - Data must be buffered
- Play out can be started at the end of the group
- Buffer can be reused of each group
- GSS is a trade-off between the optimization of
buffer space and arm movements - Mixed Strategy
- Based on the shortest seek( also called greedy
strategy) and the balanced strategy - The goal is to maximize transfer efficiency by
minimizing seek time and latency and to serve
process requirements with a limited buffer space - Crucial part is to decide among the two
strategies
33Disk Scheduling Algorithms .
34Memory Management
- Traditional virtual memory with demand paging is
inappropriate for such real-time processes since
page faults incur too much swapping time between
main memory and disk and may effect real time
performance. - One solution is to avoid swapping and to lock
continuous media data in memory during the
process. - Another method, is to pre-fetch such data in a
timely fashion, taking advantage of their
periodicity. - Other important practical implementation
technique include using scatter buffers and
passing pointers. - With scatter buffers, the address space of a
process is loaded into possibly discontiguous
regions of memory. By passing pointers, objects
are passed by reference rather than having to
pass the objects themselves.
35Device Management.
- device management and the actual access to a
device allows the operating system to integrate
all hardware components - the physical device is represented by an abstract
device driver - the physical characteristics of devices are
hidden - existing operating system extensions for
multimedia usually provide one common system-wide
interface for the control and management of data
streams and devices - the multimedia extensions of Microsoft Windows,
for example, provide the following classes of
function calls - 1) system commands are not forwarded to a single
device driver (MCI driver) they are served by a
central instance - 2) each device driver must be able to process
compulsory commands - 3) basic commands refer to characteristics that
all devices have in common - 4) extended commands may refer to both device
types and special single devices - for example camera control calls
36System Architecture
- - the employment of continuous media in
multimedia systems also imposes additional new
requirements to the system architecture - - a typical multimedia application does not
require processing of audio and video to be
performed by the application itself - - data are obtained from a source and are
forwarded to a sink - - in such a case the best solution is "The
shortest possible path" through the system, i.e.,
to copy data directly from adapter to adapter - - in multimedia systems, such an adapter to
adapter connection is defined by the capabilities
of the two involved adapters and the bus
performance - - most of today's multimedia systems must coexist
with conventional data processing they share
hardware and software components - - protocol processing is the bottleneck because
it cannot provide the necessary throughput - - the paradigm of streaming from source to sink
is an appropriate way of doing this - - the multimedia application opens devices,
establishes a connection between them, starts the
data flow and returns to other duties - - the most dominant characteristic of multimedia
applications is to preserve the temporal
requirement at the presentation time
37Example of Distributed Multimedia System
38Synchronization in Distributed Multimedia Systems
- Stream Synchronization
- This refers to specific temporal relation between
the source and sink of a single communication. - In the above example, for each individual video
and audio play out it is necessary to maintain an
internal stream synchronization between the
sender and the receiver. - Continuous Synchronization
- This refers to an ongoing commitment to a
repetitive pattern of temporal linkage between
two or more communications. - In the above example, it is required to maintain
an ongoing continuous synchronization
relationship, between the associated video and
audio play outs. -
- Event based Synchronization
- This refers to the act of notifying that a
relevant event or a set of events has taken
place, and then causing an associated action or
actions to take place. This must be done in a
timely manner. - In the above example, it is required to display
text captions and voice annotations at the
correct time, with respect to progress of the
video display.
39Future Research Ideas
- Moving Toward a Multimedia Web OS Integrating
multimedia environment on the Web that includes
new audio, video and 3D technologies. - Integration of real-time processing and non-real
time processing in the Native System Kernel. - Improving Scheduling Algorithms to support
Multimedia Objects in conjunction with
traditional applications more efficiently. - Synchronization Techniques of Multimedia In a
Distributed Environment. - Integrating Database Operations In Multimedia
Operating Sytems Future Search Engines
Would deal not only text , but also - Audio,
Image, Video
40References..
- http//mig.msu.edu/Followups/OS/breakdown.html
- http//www.beos.com
- http//www.computer.org/multimedia/mu1995/u1068abs
.htm - http//www-inf.int-evry.fr/bernard/distributed_sy
stems/node5.html - http//citeseer.nj.nec.com/details/leslie93pegasus
.html - http//www.cl.cam.ac.uk/Research/SRG/netos/pegasus
/papers/usenix/usenix.html - http//www.cl.cam.ac.uk/Research/SRG/nossdav98/
- http//citeseer.nj.nec.com/did/4545
- --P. Goyal, X. Guo, and H. M. Vin. A hierarchical
CPU scheduler for - multimedia operating systems. In Proceedings of
the Second Symposium on - Operating Systems Design and Implementation
(OSDI). USENIX, October 1996 - --Ralf Steinmetz, "Analyzing the Multimedia
Operating Systems," IEEE - Multimedia, Vol. 2, No. 1, Spring 1995, pp.
68-84. - --K. Nahrstedt, R. Steinmetz, "Resource
Management in Networked - Multimedia Operating Systems," IEEE Computer, May
1995, pp 40--49. - --D.J. Gemmell, H.M. Vin, D.D. Kandlur, P.V.
Rangan, and L.A. Rowe. - "Multimedia Storage Servers A Tutorial". IEEE
Computer, 28(5)40--49, May - 1995.
- --V. O. Li and W. Liao, "Distributed multimedia
systems," Proceedings of
41Questions and Answers..