CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)1 Multimedia Topics (continued) CS-3013 & CS-502 Operating Systems.

Slides:



Advertisements
Similar presentations
DISTRIBUTED MULTIMEDIA SYSTEMS
Advertisements

Chapter 7 - Resource Access Protocols (Critical Sections) Protocols: No Preemptions During Critical Sections Once a job enters a critical section, it cannot.
Class-constrained Packing Problems with Application to Storage Management in Multimedia Systems Tami Tamir Department of Computer Science The Technion.
Chapter 6: Memory Management
CPE555A: Real-Time Embedded Systems
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.
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.
Chapter 7 : Multimedia OS
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.
Multimedia Systems 1 CS502 Spring 2006 Multimedia Systems CS-502 Operating Systems.
Chapter 7 : Multimedia OS
Project 2 – solution code
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.
Operating Systems Operating System Support for Continuous Media.
Chapter 7 Multimedia Operating Systems File System Paradigms File Replacement Caching Disk Scheduling.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Multimedia Systems (Part 1) CS-502 Fall Multimedia Systems (Part 1) CS-502 Operating Systems Fall 2006 (Slides include materials from Operating System.
Multimedia Systems (Part 2)
Chapter 4 – Periodic Task Scheduling In many real-time systems periodic tasks dominate the demand. Three classic periodic task scheduling algorithms: –
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 34 – Media Server (Part 3) Klara Nahrstedt Spring 2012.
MM File Management Karrie Karahlaios and Brian P. Bailey Spring 2007.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 32 – Media Server (Part 2) Klara Nahrstedt Spring 2012.
Using Multimedia on the Web
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,
Page 15/25/2016 CSE 40373/60373: Multimedia Systems QoS Classes  Guaranteed Service Class  QoS guarantees are provided based on deterministic and statistical.
1 Multimedia Storage Issues. NUS.SOC.CS5248 OOI WEI TSANG 2 Media vs. Documents large file size write once, read many deadlines!
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.
Segment-Based Proxy Caching of Multimedia Streams Authors: Kun-Lung Wu, Philip S. Yu, and Joel L. Wolf IBM T.J. Watson Research Center Proceedings of The.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Scheduling policies for real- time embedded systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Multimedia Systems.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 31 – Multimedia OS (Part 1) Klara Nahrstedt Spring 2011.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Real-Time Scheduling CS 3204 – Operating Systems Lecture 20 3/3/2006 Shahrooz Feizabadi.
Distributed Multimedia Systems Resource management and Stream Adaptation Arun A Tharuvai CSC8530 October 21, 2003.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 18 – Multimedia Transport (Part 1) Klara Nahrstedt Spring 2014.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 30 – Media Server (Part 5) Klara Nahrstedt Spring 2009.
RTOS task scheduling models
Real-Time Scheduling CS 3204 – Operating Systems Lecture 13 10/3/2006 Shahrooz Feizabadi.
CS333 Intro to Operating Systems Jonathan Walpole.
NUS.SOC.CS5248 Ooi Wei Tsang 1 Course Matters. NUS.SOC.CS5248 Ooi Wei Tsang 2 Make-Up Lecture This Saturday, 23 October TR7, 1-3pm Topic: “CPU scheduling”
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara Nahrstedt Spring 2009.
Chapter 20: Multimedia Systems
Multimedia Systems Operating System Presentation On
CS 414 – Multimedia Systems Design Lecture 31 – Media Server (Part 5)
Chapter 20: Multimedia Systems
Chapter 20: Multimedia Systems
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:

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)1 Multimedia Topics (continued) CS-3013 & CS-502 Operating Systems

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)2 Review CD-ROM & DVD devices Reading assignment about CD-R and DVD General requirements for multimedia in a computer Jitter-free Guaranteed scheduling Multiple interleaved streams Wide variety of bandwidths

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)3 Review (continued) Compression MP-3 – 10:1 JPEG – 20:1 MPEG-2 – 50:1- 80:1 Asymmetric compression Longer to compress than to decompress Take advantage of temporal locality

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)4 Outline Processor scheduling File, disk, and network management for multimedia in computers

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)5 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 (24, 25 or 30 fps) –Steady audio rate –Bounded jitter Classical problem in real-time scheduling –Obscure niche becomes mainstream! –See Silbershatz, Chapter 19

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)6 Two common methods Rate Monotonic Scheduling Earliest Deadline First Many variations Many analytic methods for proving QoS (Quality of Service)

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)7 Processor Scheduling for Real-Time Rate Monotonic Scheduling (RMS) Assume m periodic processes –Process i requires t i msec of processing time every p i msec. –Equal processing every interval — like clockwork!

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)8 Example Periodic process i requires the CPU at specified intervals (periods) p i is the duration of the period t i is the processing time d i is the deadline by when the process must be serviced –Often same as end of period

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)9 Processor Scheduling for Real-Time Rate Monotonic Scheduling (RMS) Assume m periodic processes –Process i requires t i msec of processing time every p i 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)10 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)11 Example p 1 = 50 msec; t 1 = 20 msec p 2 = 100 msec; t 2 = 35 msec Priority(p 1 ) > Priority(p 2 ) Total compute load is 75 msec per every 100 msec. Both tasks complete within every period 25 msec per 100 msec to spare

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)12 Example 2 p 1 = 50 msec; t 1 = 25 msec p 2 = 80 msec; t 2 = 35 msec Priority(p 1 ) > Priority(p 2 ) Total compute load is ~ 94% of CPU. Cannot complete both tasks within some periods Even though there is still CPU capacity to spare!

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)13 Rate Monotonic Theorems (without proof) Theorem 1: using these priorities, scheduler can guarantee the needed Quality of Service (QoS), provided that –Asymtotically approaches ln 2 as m   ln 2 = … 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)14 Example 2 again Note that p 1 pre-empts p 2 in second interval, even though p 2 has the earlier deadline!

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)15 More on Rate Monotonic Scheduling Rate Monotonic assumes periodic processes MPEG-2 playback is not a periodic process!

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)16 Processor Scheduling for Real-Time Earliest Deadline First (EDF) When each process i become ready, it announces deadline D i for its next task. Scheduler always assigns processor to process with earliest deadline. May pre-empt other real-time processes

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)17 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 D i+1 < D i, then i and i+1 can be interchanged without affecting QoS guarantee to either one.

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)18 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)19 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)20 Questions?

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)21 Multimedia File & Disk Management Single movie or multimedia file on PC disk –Interleave audio, video, etc. So temporally equivalent blocks are near each other –Attempt contiguous allocation Avoid seeks within a frame Text Frame Audio Frame

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)22 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) 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)23 Frame vs. Block organization smaller larger

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)24 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)25 Placing Multiple files on Single Disk Zipf’s Law Rank items by “popularity” Zif’s Law says: Probability that next customer will choose item k is approximately C/k –Where C is a normalization constant such that N = 10  C = N = 100  C = N = 1000  C = N =  C = 0.102

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)26 Zipf’s Law applied to US cities Points represent populations 20 largest cities – sorted on rank order

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)27 Application of Zipf’s Law to movie file placement Organ-pipe distribution of files on server –most popular movie in middle of disk –next most popular either on either side, etc.

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)28 Calculate … Probability that next movie is in the middle five cylinders

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)29 Questions?

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)30 Disk Scheduling (server) Scheduling disk activity is just as important as scheduling processor activity Advantage:– Predictability Unlike disk activity of ordinary computing In server, there will be multiple disk requests in each frame interval One request per frame for each concurrent video stream

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)31 Disk Scheduling (continued) SCAN (Elevator) algorithm for each frame interval Sort by cylinder # Complete in time for start of next frame interval Variation – SCAN–EDF: Sort requests by deadline Group similar deadlines together, apply SCAN to group Particularly useful for non-uniform block sizes and frame intervals

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)32 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)33 Push vs. Pull server

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)34 Bandwidth Negotiation Client (or application) provides feedback to server to adjust bandwidth E.g., –Windows Media Player –RealPlayer –Quicktime

CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)35 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-3013 & CS-502, Summer 2006 Multimedia topics (continued)36 Break