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”

Slides:



Advertisements
Similar presentations
CS 414 – Multimedia Systems Design Lecture 26 – Media Server (Part 2)
Advertisements

I/O Management and Disk Scheduling
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.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 35 – Media Server (Part 4) Klara Nahrstedt Spring 2012.
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)
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.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
1 Lecture 26: Storage Systems Topics: Storage Systems (Chapter 6), other innovations Final exam stats:  Highest: 95  Mean: 70, Median: 73  Toughest.
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
04/21/2004CSCI 315 Operating Systems Design1 Disk Scheduling.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
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.
Redundant Array of Independent Disks
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
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.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
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.
1 Multimedia Storage Issues. NUS.SOC.CS5248 OOI WEI TSANG 2 Media vs. Documents large file size write once, read many deadlines!
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
1Fall 2008, Chapter 12 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
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.
Lecture 3 Page 1 CS 111 Online Disk Drives An especially important and complex form of I/O device Still the primary method of providing stable storage.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 30 – Media Server (Part 5) Klara Nahrstedt Spring 2009.
1 Course Matters. NUS.SOC.CS5248 OOI WEI TSANG 2 Paper Review October 2003 MonTueWedThuFriSatSun Paper Reviews Due 20% off for each.
“A cost-based admission control algorithm for digital library multimedia systems storing heterogeneous objects” – I.R. Chen & N. Verma – The Computer Journal.
Storing and Serving Multimedia. What is a Media Server? A scalable storage manager Allocates multimedia data optimally among disk resources Performs memory.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
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.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 31 – Media Server (Part 1) Klara Nahrstedt Spring 2012.
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.
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.
M ASS S TORAGE S TRUCTURES Lecture: Operating System Concepts Lecturer: Pooja Sharma Computer Science Department, Punjabi University, Patiala.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara Nahrstedt Spring 2009.
Scheduling.
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
Data Orgnization Frequently accessed data on the same storage device?
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:

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”

NUS.SOC.CS5248 Ooi Wei Tsang 3 Multimedia Storage Issues

NUS.SOC.CS5248 Ooi Wei Tsang 4 Media vs. Documents

NUS.SOC.CS5248 Ooi Wei Tsang 5 Media vs. Documents large file size write once, read many sequential access periodic access deadlines

NUS.SOC.CS5248 Ooi Wei Tsang 6 Average Service Time?

NUS.SOC.CS5248 Ooi Wei Tsang 7 OS Review: Disk

NUS.SOC.CS5248 Ooi Wei Tsang 8 Disk head, spindle, track, sector, cylinder

NUS.SOC.CS5248 Ooi Wei Tsang 9 Latency components seek time, rotational time and transfer time

NUS.SOC.CS5248 Ooi Wei Tsang 10 Disk Scheduler disk sched I/O Request read/write command

NUS.SOC.CS5248 Ooi Wei Tsang 11 OS Review: Disk Scheduling Algorithm

NUS.SOC.CS5248 Ooi Wei Tsang 12 FCFS

NUS.SOC.CS5248 Ooi Wei Tsang 13 SSTF

NUS.SOC.CS5248 Ooi Wei Tsang 14 SCAN (Elevator)

NUS.SOC.CS5248 Ooi Wei Tsang 15 C-SCAN

NUS.SOC.CS5248 Ooi Wei Tsang 16 EDF

NUS.SOC.CS5248 Ooi Wei Tsang 17 EDF-SCAN

NUS.SOC.CS5248 Ooi Wei Tsang 18 Other Schemes FD-SCAN SSEDO SSEDV

NUS.SOC.CS5248 Ooi Wei Tsang 19 Data Placement

NUS.SOC.CS5248 Ooi Wei Tsang 20 Contiguous

NUS.SOC.CS5248 Ooi Wei Tsang 21 Fragmented

NUS.SOC.CS5248 Ooi Wei Tsang 22 Striping (RAID-0)

NUS.SOC.CS5248 Ooi Wei Tsang 23 Mirroring (RAID-1)

NUS.SOC.CS5248 Ooi Wei Tsang 24 Parity (RAID-5)

NUS.SOC.CS5248 Ooi Wei Tsang 25 Parity

NUS.SOC.CS5248 Ooi Wei Tsang 26 Summary of Concerns High Throughput Fault Tolerant Load balancing

NUS.SOC.CS5248 Ooi Wei Tsang 27 This Lecture Consider striping only (RAID-0)

NUS.SOC.CS5248 Ooi Wei Tsang 28 Efficient Striping Techniques for Multimedia File Servers P. Shenoy, H. Vin NOSSDAV 97

NUS.SOC.CS5248 Ooi Wei Tsang 29 Design Parameters unit of striping (block size) degree of striping (num of disks)

NUS.SOC.CS5248 Ooi Wei Tsang 30 Stripe Unit

NUS.SOC.CS5248 Ooi Wei Tsang 31 Model Disk serves clients in rounds Time to read media from disk should be smaller than round time Concern: minimize service time of most heavily loaded disk

NUS.SOC.CS5248 Ooi Wei Tsang 32 Effects of Block Size Block Size service time

NUS.SOC.CS5248 Ooi Wei Tsang 33 Problem Find block size such that the service time for the most heavily loaded disk is minimize

NUS.SOC.CS5248 Ooi Wei Tsang 34 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 35 Assumptions Non-redundant array VBR Analyze read operation only

NUS.SOC.CS5248 Ooi Wei Tsang 36 Variables Declaration N d : Number of Disks N c : Number of Clients B: Block size

NUS.SOC.CS5248 Ooi Wei Tsang 37 Variables Declaration N b (i,j): Number of blocks client i access from disk j P a (i,m): Probability of i access m blocks in a round

NUS.SOC.CS5248 Ooi Wei Tsang 38 Analysis Suppose i request m blocks

NUS.SOC.CS5248 Ooi Wei Tsang 39 Reading 1 block Prob(N b (i,j)=1) 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 P a (i,m): Probability of i access m blocks in a round

NUS.SOC.CS5248 Ooi Wei Tsang 40 Reading k block Prob(N b (i,j)=k) 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 P a (i,m): Probability of i access m blocks in a round

NUS.SOC.CS5248 Ooi Wei Tsang 41 Blocks Read From a Disk N b (*,j) = 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 P a (i,m): Probability of i access m blocks in a round

NUS.SOC.CS5248 Ooi Wei Tsang 42 Busiest Disk N max = 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 P a (i,m): Probability of i access m blocks in a round

NUS.SOC.CS5248 Ooi Wei Tsang 43 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 b (i,j) _ 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 P a (i,m): Probability of i access m blocks in a round

NUS.SOC.CS5248 Ooi Wei Tsang 44 Model Verification

NUS.SOC.CS5248 Ooi Wei Tsang 45 Imbalance and Overhead

NUS.SOC.CS5248 Ooi Wei Tsang 46 Effects of Block Size

NUS.SOC.CS5248 Ooi Wei Tsang 47 Effects of Clients

NUS.SOC.CS5248 Ooi Wei Tsang 48 Effects of Num of Disks

NUS.SOC.CS5248 Ooi Wei Tsang 49 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 50 There is more.. redundant array finding optimum degree of striping

NUS.SOC.CS5248 Ooi Wei Tsang 51 Cello: A Disk Scheduling Framework for Next Generation Operating Systems P. Shenoy, H. Vin SIGMETRICS 98

NUS.SOC.CS5248 Ooi Wei Tsang 52 Problem How to co-exist with other applications?

NUS.SOC.CS5248 Ooi Wei Tsang 53 Classes of Applications Real-time hard/soft periodic/aperiodic Best-effort interactive troughput-intensive

NUS.SOC.CS5248 Ooi Wei Tsang 54 Attempt 1 Priority-based scheduler Always schedule real-time tasks ahead of best-effort tasks

NUS.SOC.CS5248 Ooi Wei Tsang 55 Attempt 2 Partition time slots into real-time and best-effort

NUS.SOC.CS5248 Ooi Wei Tsang 56 Attempt 3 Assign weight to application class, based on their priority Service based on weight

NUS.SOC.CS5248 Ooi Wei Tsang 57 Attempt 3: Cello Two-level scheduling

NUS.SOC.CS5248 Ooi Wei Tsang 58 Class Independent Scheduler

NUS.SOC.CS5248 Ooi Wei Tsang 59 Allocating Disk Bandwidth Allocate in proportion to time Allocate in proportion to bytes

NUS.SOC.CS5248 Ooi Wei Tsang 60 Proportionate Time-Allocation

NUS.SOC.CS5248 Ooi Wei Tsang 61 Variables P: Interval of a period I: Idle time so far U i : Allocated time for class i w i : Weightage of class i

NUS.SOC.CS5248 Ooi Wei Tsang 62 Proportional Time Allocation

NUS.SOC.CS5248 Ooi Wei Tsang 63 Example Weights 1:1:2 P = 100 I =

NUS.SOC.CS5248 Ooi Wei Tsang 64

NUS.SOC.CS5248 Ooi Wei Tsang 65 r next prev

NUS.SOC.CS5248 Ooi Wei Tsang 66 Need to Make Sure.. Does not exceed share for class i

NUS.SOC.CS5248 Ooi Wei Tsang 67 Need to Make Sure.. Total service time does not exceed available time

NUS.SOC.CS5248 Ooi Wei Tsang 68 Update and Repeat next prev

NUS.SOC.CS5248 Ooi Wei Tsang 69 Being Work Conserving Work conserving: “don’t work only if no work to do”

NUS.SOC.CS5248 Ooi Wei Tsang 70 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 71 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 72 Free Time Utilization

NUS.SOC.CS5248 Ooi Wei Tsang 73 Class Specific Scheduler How to pick (r, prev, next)? Must not affect tasks in queue Idea: Compute slack time

NUS.SOC.CS5248 Ooi Wei Tsang 74 Slack Time l i Latest time must begin servicing request i e i Earliest time may begin servicing request i d i Deadline for request i s i Slack time for i = l i – e i t i Time to service request i

NUS.SOC.CS5248 Ooi Wei Tsang 75 Slack Time i i

NUS.SOC.CS5248 Ooi Wei Tsang 76 Class 1: Interactive Best Effort next prev

NUS.SOC.CS5248 Ooi Wei Tsang 77 Class 2: High Throughput Best Effort next prev

NUS.SOC.CS5248 Ooi Wei Tsang 78 Class 3: Real Time Application next prev

NUS.SOC.CS5248 Ooi Wei Tsang 79 Evaluations response time # video

NUS.SOC.CS5248 Ooi Wei Tsang 80 Evaluations %time time

NUS.SOC.CS5248 Ooi Wei Tsang 81 Cello Summary OS disk scheduler Support multiple classes Protect classes from each other Work conserving Use two-level scheduling