1 Multimedia Storage Issues. NUS.SOC.CS5248 OOI WEI TSANG 2 Media vs. Documents large file size write once, read many deadlines!

Slides:



Advertisements
Similar presentations
Silberschatz, Galvin and Gagne Operating System Concepts Disk Scheduling Disk IO requests are for blocks, by number Block requests come in an.
Advertisements

CS 414 – Multimedia Systems Design Lecture 26 – Media Server (Part 2)
I/O Management and Disk Scheduling
Disk Access.
CS 6560: Operating Systems Design
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
Continuous Media 1 Differs significantly from textual and numeric data because of two fundamental characteristics: –Real-time storage and retrieval –High.
CSE506: Operating Systems Disk Scheduling. CSE506: Operating Systems Key to Disk Performance Don’t access the disk – Whenever possible Cache contents.
Lecture 36: Chapter 6 Today’s topic –RAID 1. RAID Redundant Array of Inexpensive (Independent) Disks –Use multiple smaller disks (c.f. one large disk)
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 3) Klara Nahrstedt Spring 2011.
Input/Output Management and Disk Scheduling
CS-3013 & CS-502, Summer 2006 Multimedia topics (continued)1 Multimedia Topics (continued) CS-3013 & CS-502 Operating Systems.
1 Storage (cont’d) Disk scheduling Reducing seek time (cont’d) Reducing rotational latency RAIDs.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
Based on the slides supporting the text
Chapter 12 – Disk Performance Optimization Outline 12.1 Introduction 12.2Evolution of Secondary Storage 12.3Characteristics of Moving-Head Disk Storage.
Disks.
Operating Systems Operating System Support for Continuous Media.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
12: IO Systems1 I/O SYSTEMS This Chapter is About Processor I/O Interfaces: Connections exist between processors, memory, and IO devices. The OS must manage.
Disks CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
04/21/2004CSCI 315 Operating Systems Design1 Disk Scheduling.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 12 – Disk Performance Optimization Outline 12.1 Introduction 12.2Evolution of Secondary Storage.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Disk and I/O Management
MM File Management Karrie Karahlaios and Brian P. Bailey Spring 2007.
1 Recitation 8 Disk & File System. 2 Disk Scheduling Disks are at least four orders of magnitude slower than main memory –The performance of disk I/O.
B. Prabhakaran1 Multimedia Storage & Retrieval Large sizes as well as real-time requirements of multimedia objects influence their storage and retrieval.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
Page 110/12/2015 CSE 30341: Operating Systems Principles Network-Attached Storage  Network-attached storage (NAS) is storage made available over a network.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 30 – Media Server (Part 6) Klara Nahrstedt Spring 2011.
Disks and Storage Systems
NETW 3005 Mass Storage (How discs work). Notice I was unaware just how much was missing in the printed notes. As a partial remedy for that, the lecture.
CS 6502 Operating Systems Dr. J.. Garrido Device Management (Lecture 7b) CS5002 Operating Systems Dr. Jose M. Garrido.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
NUS.SOC.CS5248 Ooi Wei Tsang 1 CPU Scheduling. NUS.SOC.CS5248 Ooi Wei Tsang 2 Scheduling Task vs I/O Request Task computation time unpredictable Task.
Chapter 12 – Mass Storage Structures (Pgs )
Cello A Disk Scheduling Framework for Next Generation Operating Systems – Prashant J. Shenoy and Harrick M. Vin Presented by Evan Clark September 8, 2003.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 30 – Media Server (Part 5) Klara Nahrstedt Spring 2009.
I/O Management and Disk Scheduling Chapter 11. Disk Performance Parameters To read or write, the disk head must be positioned at the desired track and.
1 Course Matters. NUS.SOC.CS5248 OOI WEI TSANG 2 Paper Review October 2003 MonTueWedThuFriSatSun Paper Reviews Due 20% off for each.
Storing and Serving Multimedia. What is a Media Server? A scalable storage manager Allocates multimedia data optimally among disk resources Performs memory.
1.  Disk Structure Disk Structure  Disk Scheduling Disk Scheduling  FCFS FCFS  SSTF SSTF  SCAN SCAN  C-SCAN C-SCAN  C-LOOK C-LOOK  Selecting a.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Storage and File structure COP 4720 Lecture 20 Lecture Notes.
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
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”
Disk Average Seek Time. Multi-platter Disk platter Disk read/write arm read/write head.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara Nahrstedt Spring 2009.
Part IV I/O System Chapter 12: Mass Storage Structure.
Magnetic Disks Have cylinders, sectors platters, tracks, heads virtual and real disk blocks (x cylinders, y heads, z sectors per track) Relatively slow,
CS 414 – Multimedia Systems Design Lecture 31 – Media Server (Part 5)
Disks and RAID.
Operating System I/O System Monday, August 11, 2008.
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Lecture 45 Syed Mansoor Sarwar
Chapter 14 Based on the slides supporting the text
Overview Continuation from Monday (File system implementation)
Persistence: hard disk drive
Disks and Storage Systems
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Presentation transcript:

1 Multimedia Storage Issues

NUS.SOC.CS5248 OOI WEI TSANG 2 Media vs. Documents large file size write once, read many deadlines!

3 OS Review: Disk

NUS.SOC.CS5248 OOI WEI TSANG 4 Disk head, spindle, track, sector, cylinder seek time, rotational latency

NUS.SOC.CS5248 OOI WEI TSANG 5 Disk Scheduler disk sched I/O Request read/write command

6 Disk Scheduling Algorithm

NUS.SOC.CS5248 OOI WEI TSANG 7 Best Effort Scheduler FCFS: First come first serve SSTF: Shortest seek time first SCAN: Serve all requests in one direction, then in the other direction C-SCAN: Serve all requests in one direction only, then “jump” back to the other end and repeat.

NUS.SOC.CS5248 OOI WEI TSANG 8 Other Schemes EDF: Earliest deadline first EDF-SCAN: Use SCAN to schedule request with same deadline. FD-SCAN: SCAN towards direction with earliest feasible deadline SSEDO: Rank request by deadline and use formula (seektime* rank ) SSEDV: Use formula (lifetime* + seektime*(1- )

9 Data Placement

NUS.SOC.CS5248 OOI WEI TSANG 10 Contiguous

NUS.SOC.CS5248 OOI WEI TSANG 11 Fragmented

NUS.SOC.CS5248 OOI WEI TSANG 12 Stripping (RAID-0)

NUS.SOC.CS5248 OOI WEI TSANG 13 Mirroring (RAID-1)

NUS.SOC.CS5248 OOI WEI TSANG 14 Parity (RAID-5)

NUS.SOC.CS5248 OOI WEI TSANG 15 Parity

NUS.SOC.CS5248 OOI WEI TSANG 16 Summary of Concerns High Throughput Fault Tolerant Load balancing

NUS.SOC.CS5248 OOI WEI TSANG 17 Design Parameters unit of striping (block size) degree of striping (num of disks)

NUS.SOC.CS5248 OOI WEI TSANG 18 Stripe Unit

NUS.SOC.CS5248 OOI WEI TSANG 19 Stripe Unit

NUS.SOC.CS5248 OOI WEI TSANG 20 Effects of Block Size Block Size service time

NUS.SOC.CS5248 OOI WEI TSANG 21 Problem Find block size such that the service time for the most heavily loaded disk is minimize

NUS.SOC.CS5248 OOI WEI TSANG 22 Analysis Model: A Plan service time of the busiest disk as a function of block size expected num of blocks accessed on the busiest disk expected num of blocks accessed on any disk

NUS.SOC.CS5248 OOI WEI TSANG 23 Assumptions Non-redundant array Analyze read operation only

NUS.SOC.CS5248 OOI WEI TSANG 24 Variables Declaration N d : Number of Disks N c : Number of Clients B : Block size N b (i,j): Number of blocks client i access from disk j N b (i,*): Total number of blocks client i access

NUS.SOC.CS5248 OOI WEI TSANG 25 Analysis Suppose i request m blocks

NUS.SOC.CS5248 OOI WEI TSANG 26 Reading 1 block Prob(N b (i,j)=1)

NUS.SOC.CS5248 OOI WEI TSANG 27 Reading k block Prob(N b (i,j)=k)

NUS.SOC.CS5248 OOI WEI TSANG 28 Total Num of Blocks from Disk j N b (*,j) =

NUS.SOC.CS5248 OOI WEI TSANG 29 Busiest Disk N max =

NUS.SOC.CS5248 OOI WEI TSANG 30 Access Time T = N max (t s + t r + Bt t ) Depends on: block size B disk characteristic t s,t r,t t server design N d workload characteristic N c, N(i,j) _

NUS.SOC.CS5248 OOI WEI TSANG 31 Model Verification Service Time Block Size

NUS.SOC.CS5248 OOI WEI TSANG 32 Imbalance and Overhead I = 1 – T avg /T max O = 1 – N max BT t /T max

NUS.SOC.CS5248 OOI WEI TSANG 33 Effects of Block Size Block Size Imbalance Overhead ~optimum

NUS.SOC.CS5248 OOI WEI TSANG 34 Effects of Clients Block Size Imbalance Overhead N c incr, I decr, opt B incr

NUS.SOC.CS5248 OOI WEI TSANG 35 Effects of Clients Block Size Nc

NUS.SOC.CS5248 OOI WEI TSANG 36 Effects of Num of Disks N d incr, N(i,j) decr, I incr, opt B decr Block Size NdNd

NUS.SOC.CS5248 OOI WEI TSANG 37 Choosing Block Size Given N c, assume rest is fixed find B that minimize T if T < duration of a round incr N c and try again

NUS.SOC.CS5248 OOI WEI TSANG 38 There is more.. redundant array finding optimum degree of striping

39 Cello: Disk Scheduler

NUS.SOC.CS5248 OOI WEI TSANG 40 Problem How to co-exist with other applications?

NUS.SOC.CS5248 OOI WEI TSANG 41 Classes of Applications Real-time hard/soft periodic/aperiodic Best-effort interactive troughput-intensive

NUS.SOC.CS5248 OOI WEI TSANG 42 Attempt 1 Priority-based scheduler Always schedule real-time tasks ahead of best-effort tasks

NUS.SOC.CS5248 OOI WEI TSANG 43 Attempt 2 Partition time slots into real-time and best-effort

NUS.SOC.CS5248 OOI WEI TSANG 44 Attempt 3 Assign weight to application class, based on their priority Service based on weight

NUS.SOC.CS5248 OOI WEI TSANG 45 Attempt 3: Cello Two-level scheduling

NUS.SOC.CS5248 OOI WEI TSANG 46 Class Independent Scheduler

NUS.SOC.CS5248 OOI WEI TSANG 47 Allocating Disk Bandwidth Allocate in proportion to time Allocate in proportion to bytes

NUS.SOC.CS5248 OOI WEI TSANG 48 Notations P : Interval of a round I : Total idle time so far in this round U i : Time allocated so far to class i w i : Weight for class i W : Total weight for all class

NUS.SOC.CS5248 OOI WEI TSANG 49 Proportionate Time- Allocation U i < P-I

NUS.SOC.CS5248 OOI WEI TSANG 50 Proportional Time Allocation U i < (P-I)w i /W

NUS.SOC.CS5248 OOI WEI TSANG 51 Example Weights 1:1:2 P = 100 I =

NUS.SOC.CS5248 OOI WEI TSANG 52 Pick a class i which is underutilized, i.e. U i < (P-I)w i /W

NUS.SOC.CS5248 OOI WEI TSANG 53 r next prev Class specific schedule will return a request to be inserted, plus to location in the scheduled queue for insertion. (r, prev, next)

NUS.SOC.CS5248 OOI WEI TSANG 54 Need to Make Sure.. Does not exceed share for class i U i + T < (P-I)w i /W service time for new request

NUS.SOC.CS5248 OOI WEI TSANG 55 Need to Make Sure.. Total service time does not exceed available time  U i + T + T’ next – T next < P-I

NUS.SOC.CS5248 OOI WEI TSANG 56 Update and Repeat next prev

NUS.SOC.CS5248 OOI WEI TSANG 57 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.CS5248 OOI WEI TSANG 58 Improving Utilization When 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.CS5248 OOI WEI TSANG 59 Free Time Utilization

NUS.SOC.CS5248 OOI WEI TSANG 60 Class Specific Scheduler How to pick (r, prev, next)?

NUS.SOC.CS5248 OOI WEI TSANG 61 Slack Time l i = Latest time you must begin servicing request i e i = Earliest time you may begin servicing request i d i = Deadline for request i s i = Slack time for i = l i - e i

NUS.SOC.CS5248 OOI WEI TSANG 62 Slack Time l i = min(d i, l i+1 ) – T i e i = e i-1 + T i-1 Special case when request is at the beginning of queue or end of queue.

NUS.SOC.CS5248 OOI WEI TSANG 63 Slack Time i i

NUS.SOC.CS5248 OOI WEI TSANG 64 Class 1: Interactive Best Effort next prev pick r at front of pending queue, insert into earliest position in scheduled queue without violating deadlines of others.

NUS.SOC.CS5248 OOI WEI TSANG 65 Class 2: High Throughput Best Effort next prev pick r at front of pending queue, insert into tail of scheduled queue. Order consecutive best effort request by SCAN order.

NUS.SOC.CS5248 OOI WEI TSANG 66 Class 3: Real Time Application next prev pick r in EDF order. Insert into scheduled queue such that it will meet its deadline and will not violate deadlines of others

NUS.SOC.CS5248 OOI WEI TSANG 67 Evaluations response time of best effort app # video SCAN Cello

NUS.SOC.CS5248 OOI WEI TSANG 68 Evaluations %bandwidth time 50% No video text app video app

NUS.SOC.CS5248 OOI WEI TSANG 69 Cello Summary OS disk scheduler Support multiple classes Protect classes from each other Work conserving Use two-level scheduling