Multimedia Systems (Part 2)

Slides:



Advertisements
Similar presentations
DISTRIBUTED MULTIMEDIA SYSTEMS
Advertisements

Streaming Video over the Internet
2.02F Publishing Animated Videos 2.02 Develop Computer Animations.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 28 – Media Server (Part 3) Klara Nahrstedt Spring 2009.
Continuous Media 1 Differs significantly from textual and numeric data because of two fundamental characteristics: –Real-time storage and retrieval –High.
Multimedia SystemsCS-502 Fall Multimedia Systems CS-502 Operating Systems Fall 2007 (Slides include materials from Operating System Concepts, 7 th.
T.Sharon-A.Frank 1 Multimedia Quality of Service (QoS)
Multimedia Systems As Presented by: Craig Tomastik.
Chapter 20: Multimedia Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 20: Multimedia Systems What is Multimedia.
The Real Time Streaming Protocol (RTSP)
1 Introduction to Computer Science بسم الله الرحمن الرحيم MULTIMEDIA LEVEL -9 King Khalid University Kingdom of Saudi Arabia Ministry of Higher Education.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 20: Multimedia Systems.
Distributed Multimedia Systems
1 Multimedia Chapter Introduction to multimedia 7.2 Multimedia files 7.3 Video compression 7.4 Multimedia process scheduling 7.5 Multimedia file.
Dynamic Adaptive Streaming over HTTP2.0. What’s in store ▪ All about – MPEG DASH, pipelining, persistent connections and caching ▪ Google SPDY - Past,
Fan Zhang Hiranmayi Mechineni. OUTLINE  Multimedia  Compression  Requirements of Multimedia kernels  CPU Scheduling  Disk Scheduling  Network Management.
CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)1 Multimedia Topics (continued) CS-3013 & CS-502 Operating Systems.
Multimedia Systems 1 CS502 Spring 2006 Multimedia Systems CS-502 Operating Systems.
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
CS-3013 & CS-502, Summer 2006 Multimedia topics1 Multimedia CS-3013 & CS-502 Operating Systems.
Multimedia Applications r Multimedia requirements r Streaming r Phone over IP r Recovering from Jitter and Loss r RTP r Diff-serv, Int-serv, RSVP.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
Multimedia Systems (Part 1) CS-502 Fall Multimedia Systems (Part 1) CS-502 Operating Systems Fall 2006 (Slides include materials from Operating System.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 34 – Media Server (Part 3) Klara Nahrstedt Spring 2012.
Introduction to Streaming © Nanda Ganesan, Ph.D..
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 32 – Media Server (Part 2) Klara Nahrstedt Spring 2012.
T Multimedia Programming Maciej Korczyński, Krzysztof Zurek.
Using Multimedia on the Web
RTSP Real Time Streaming Protocol
1 CMSCD1011 Introduction to Computer Audio Lecture 10: Streaming audio for Internet transmission Dr David England School of Computing and Mathematical.
CIS679: RTP and RTCP r Review of Last Lecture r Streaming from Web Server r RTP and RTCP.
E0262 MIS - Multimedia Playback Systems Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India.
Joonwon Lee OS Support for Multimedia.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 19/20: Real-time and Multimedia Systems Inclusions from Tanenbaum,
2.02G Publishing Animated Videos 2.02 Develop Computer Animations.
XE33OSA Chapter 20: Multimedia Systems. 20.2XE33OSA Silberschatz, Galvin and Gagne ©2005 Chapter 20: Multimedia Systems What is Multimedia Compression.
Multimedia Operating Systems ●File System Paradigms ●File Replacement ●Caching ●Disk.
Dr. M. Munlin Real-Time and Multimedia Systems 1 NETE0516 Operating Systems Instructor: ผ. ศ. ดร. หมัดอามีน หมัน หลิน Faculty of Information Science and.
Scheduling policies for real- time embedded systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Multimedia Systems.
Streaming Media A technique for transferring data on the Internet so it can be processed as a steady and continuous stream.
03/11/2015 Michael Chai; Behrouz Forouzan Staffordshire University School of Computing Streaming 1.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 28 Multimedia.
Multimedia streaming Application Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Querying.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 18 – Multimedia Transport (Part 1) Klara Nahrstedt Spring 2014.
Fs Streaming Media a presentation by Florian Seidel.
CS333 Intro to Operating Systems Jonathan Walpole.
Multimedia Streaming I. Fatimah Alzahrani. Introduction We can divide audio and video services into three broad categories: streaming stored audio/video,
For a good summary, visit:
California State University, LA Presented by Amanda Steven StevenAamirObaid.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara Nahrstedt Spring 2009.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 17 – QoS Classes and Setup Operations Klara Nahrstedt Spring 2014.
Chapter 20: Multimedia Systems
Multimedia Systems Operating System Presentation On
Chapter 20: Multimedia Systems
Lecture 12: Real-Time Scheduling
Klara Nahrstedt Spring 2009
2.02G Publishing Animated Videos
Chapter 20: Multimedia Systems
2.02F Publishing Animated Videos
Chapter 7 Multimedia 7.1 Introduction to multimedia
Chapter 7 Multimedia 7.1 Introduction to multimedia
Chapter 7 Multimedia 7.1 Introduction to multimedia
Chapter 7 Multimedia 7.1 Introduction to multimedia
Chapter 20: Multimedia Systems
Chapter 7 Multimedia 7.1 Introduction to multimedia
Chapter 20: Multimedia Systems
Chapter 20: Multimedia Systems
Presentation transcript:

Multimedia Systems (Part 2) CS-502 Operating Systems Fall 2006 (Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne and from Modern Operating Systems, 2nd ed., by Tanenbaum) Assumptions: Graduate level Operating Systems Making Choices about operation systems Why a micro-century? …just about enough time for one concept CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Review What is multi-media? Audio, video, etc., in digital computing environment Requirements and challenges for audio and video in computer systems CD devices and formats Systems for multimedia Compression and bandwidth JPEG and MPEG CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) This week Processor and disk scheduling Real-time scheduling QoS: quality of service Network streaming and management HTTP vs. RTSP Video Server organization CS-502 Fall 2006 Multimedia Systems (Part 2)

Operating System Challenge How to get the contents of a movie file from disk or DVD drive to video screen and speakers. Fixed frame rate (25 or 30 fps) Steady audio rate Bounded jitter Such requirements are known as Quality-of-Service (QoS) guarantees. Classical problem in real-time scheduling Obscure niche become mainstream! See Silbershatz, §19.1–19.5 CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) QoS Challenge Building a system to guarantee QoS effects the following:– CPU processing Scheduling and interrupt handling File systems Network protocols CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Three levels of QoS Best-effort service: the system makes a best effort with no attempt to guarantee Soft QoS: allows different traffic streams to be prioritized, but no QoS guarantees are made Prioritization Hard QoS: system ensures QoS requirements are always met Admission control Bounded latency on interrupt handling, processing, etc. CS-502 Fall 2006 Multimedia Systems (Part 2)

Parameters Defining QoS Throughput: total amount of work completed during a specified time interval Delay: elapsed time from when request is first submitted to desired result Jitter: (uneven) variation in playback rate of a stream. Reliability: how errors are handled during transmission and processing of continuous media CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Further QoS Issues QoS may be negotiated between the client and server. Operating systems may use an admission control algorithm Admits a request for service only if the server has sufficient resources to satisfy the request CS-502 Fall 2006 Multimedia Systems (Part 2)

Processor scheduling – two common methods Rate Monotonic Scheduling Earliest Deadline First Many variations Many analytic methods for proving QoS (Quality of Service) CS-502 Fall 2006 Multimedia Systems (Part 2)

Rate Monotonic Scheduling (RMS) Assume m periodic processes Process i requires ti msec of processing time every pi msec. Equal processing every interval — like clockwork! CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Example Periodic process i requires the CPU at specified intervals (periods) pi is the duration of the period ti is the processing time di is the deadline by when the process must be serviced Often same as end of period CS-502 Fall 2006 Multimedia Systems (Part 2)

Rate Monotonic Scheduling (RMS) Assume m periodic processes Process i requires ti msec of processing time every pi msec. Equal processing every interval — like clockwork! Assume Assign priority of process i to be Statically assigned Let priority of non-real-time processes be 0 CS-502 Fall 2006 Multimedia Systems (Part 2)

Rate Monotonic Scheduling (continued) Scheduler simply runs highest priority process that is ready May pre-empt other real-time processes Real-time processes become ready in time for each frame or sound interval Non-real-time processes run only when no real-time process needs CPU CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Example p1 = 50 msec; t1 = 20 msec p2 = 100 msec; t2 = 35 msec Priority(p1) > Priority(p2) Total compute load is 75 msec per every 100 msec. Both tasks complete within every period 25 msec per 100 msec to spare CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Example 2 p1 = 50 msec; t1 = 25 msec p2 = 80 msec; t2 = 35 msec Priority(p1) > Priority(p2) Total compute load is ~ 94% of CPU. Cannot complete both tasks within some periods Even though there is still CPU capacity to spare! CS-502 Fall 2006 Multimedia Systems (Part 2)

Rate Monotonic Theorems (without proof) Theorem 1: using these priorities, scheduler can guarantee the needed Quality of Service (QoS), provided that Asymptotically approaches ln 2 as m   ln 2 = 0.6931… Theorem 2: If a set of processes can be scheduled by any method of static priorities, then it can be scheduled by Rate Monotonic method. CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Example 2 again Note that p1 pre-empts p2 in second interval, even though p2 has the earlier deadline! CS-502 Fall 2006 Multimedia Systems (Part 2)

More on Rate Monotonic Scheduling Rate Monotonic assumes periodic processes MPEG-2 playback is not a periodic process! CS-502 Fall 2006 Multimedia Systems (Part 2)

Earliest Deadline First (EDF) When each process i become ready, it announces deadline Di for its next task. Scheduler always assigns processor to process with earliest deadline. May pre-empt other real-time processes CS-502 Fall 2006 Multimedia Systems (Part 2)

Earliest Deadline First Scheduling (continued) No assumption of periodicity No assumption of uniform processing times Theorem: If any scheduling policy can satisfy QoS requirement for a sequence of real time tasks, then EDF can also satisfy it. Proof: If i scheduled before i+1, but Di+1 < Di , then i and i+1 can be interchanged without affecting QoS guarantee to either one. CS-502 Fall 2006 Multimedia Systems (Part 2)

Earliest Deadline First Scheduling (continued) EDF is more complex scheduling algorithm Priorities are dynamically calculated Processes must know deadlines for tasks EDF can make higher use of processor than RMS Up to 100% There is a large body of knowledge and theorems about EDF analysis CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Example 2 (again) Priorities are assigned according to deadlines: the earlier the deadline, the higher the priority; the later the deadline, the lower the priority. CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Questions? CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Network Management General methods for delivering content from a server to a client across a network:– Broadcasting: server delivers content to all clients, whether they want it or not. Multicasting: server delivers content to group of clients who indicate they wish to receive the content. Unicasting: server delivers content to a single client. CS-502 Fall 2006 Multimedia Systems (Part 2)

Network Management (continued) Broadcasting Like cable TV Fixed portion of network bandwidth dedicated to set of broadcast streams; inflexible Multicasting Typical webcast Multicast tree set up through internet to reach customers Customers can come and go Unicast Dedicated connection between server and client Streaming version of familiar transport protocols CS-502 Fall 2006 Multimedia Systems (Part 2)

Streaming – Delivery of Multimedia Data over Network Two types of streaming:– Progressive download: client begins playback of multimedia file during delivery. File is ultimately stored on client computer (Hopefully) download speed > playback speed Real-time streaming: multimedia file is delivered to, but not stored on, client computer Played back at same speed as delivery Limited amount of buffering to remove jitter CS-502 Fall 2006 Multimedia Systems (Part 2)

Two Types of Real-time Streaming Live streaming: to deliver a live event while it is occurring. Broadcast or multicast On-demand streaming: to deliver archived media streams Movies, lectures, old TV shows, etc. Events not delivered when they occur. Playback with pause, fast forward, reverse, etc Unicast (usually) CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Network Streaming Traditional HTTP Stateless Server responds to each request independently Real-Time Streaming Protocol (RTSP) Client initiates a “push” request for stream Server provides media stream at frame rate CS-502 Fall 2006 Multimedia Systems (Part 2)

Pull (HTTP) vs. Push (RTSP) server CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) RTSP States SETUP: server allocates resources for client session. PLAY: server delivers stream to a client session. PAUSE: server suspends delivery of a stream. TEARDOWN: server releases resources and breaks down connection. CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) RTSP state machine CS-502 Fall 2006 Multimedia Systems (Part 2)

Bandwidth Negotiation Client application provides feedback to server to adjust bandwidth E.g., Windows Media Player RealPlayer Quicktime CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Video Server Multiple CPUs Disk farm 1000s of disks Multiple high-bandwidth network links Cable TV Video on demand Internet CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia File & Disk Management Single movie or multimedia file on disk Interleave audio, video, etc. So temporally equivalent blocks are near each other Attempt contiguous allocation Avoid seeks within a frame Audio Frame Text Frame CS-502 Fall 2006 Multimedia Systems (Part 2)

File organization – Frame vs. Block Frame organization Small disk blocks (4-16 Kbytes) Frame index entries point to starting block for each frame Frames vary in size (MPEG) Advantage: very little storage fragmentation Disadvantage: large frame table in RAM Block organization Large disk block (256 Kbytes or more) Block index entries point to first I-frame of a sequence Multiple frames per block Advantage: much smaller block table in RAM Disadvantage: large storage fragmentation on disk CS-502 Fall 2006 Multimedia Systems (Part 2)

Frame vs. Block organization smaller larger CS-502 Fall 2006 Multimedia Systems (Part 2)

File Placement on Server Random Striped “Organ pipe” allocation Most popular video in center of disk Next most popular on either side of it, etc. Least popular at edges of disk Minimizes seek distance CS-502 Fall 2006 Multimedia Systems (Part 2)

Resources on a file server CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Conclusion Multimedia computing is challenging Possible with modern computers Compression is essential, especially for video Real-time computing techniques move into mainstream Processor and disk scheduling There is much more to this subject than fits into one class CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Reading Assignment Silbershatz, §20.7 CineBlitz video server CS-502 Fall 2006 Multimedia Systems (Part 2)

Multimedia Systems (Part 2) Next Topic CS-502 Fall 2006 Multimedia Systems (Part 2)