1 / 41

Multimedia File Systems

Multimedia File Systems. Content. Brief review of processor scheduling Traditional and Multimedia Files File Scheduling Methods. Review: Process scheduling. Two methods Earliest deadline first Rate monotonic Assumptions Tasks are periodic Tasks are independent

jgamez
Download Presentation

Multimedia File Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multimedia File Systems

  2. Content • Brief review of processor scheduling • Traditional and Multimedia Files • File Scheduling Methods

  3. Review: Process scheduling Two methods • Earliest deadline first • Rate monotonic Assumptions • Tasks are periodic • Tasks are independent • Aperiodic tasks have indefinite deadline • Tasks have constant execution times

  4. Review: Process scheduling • CPU utilization in deadline oriented scheduling is greater than that of rate monotonic • If more than one task in the system we have seen that it is more likely to have more context switches with rate monotonic algorithm. • The upper bound of the processor utilization is determined by the critical instant. • Schedulability depends on • Number of tasks • Processing time of tasks • Period of tasks

  5. File Systems • File systems provide access and control functions for the storage and retrieval of files. Traditional file systems • provide a comfortable interface for the user • Throughput, latency and efficient use of storage media are the main considerations

  6. File Systems In MM systems in addition to these • digitized audio and video with their related real time read and write demands • The current speeds of disks used in the storage of multimedia objects impose severe limitations on the retrieval rates of these objects. Therefore in order to increase overall performance, I/O is a primary candidate for optimization.

  7. File Structure Sequential • file descriptor .. sequence of bytes.. EOF • direct access - fast • disadvantage – file creation, deletion and size modification is difficuit • fragmentation as result of updates (copying is needed to extend the file)

  8. File Structure Non-sequential storage • use linked blocks (FAT in MS-DOS) • file descriptor contains number of blocks, pointer to the first block and a pointer to the last block • major disadvantage is problems with random access

  9. File Structure • Store block information in mapping tables UNIX-i-node Directory Structure Files are organized in directories in a way that allows easy, fast, and contiguous data access from applications.

  10. Disk Management Disk access is slow and costly • To reduce access time - block caching (locality of reference) • To reduce disk arm movement (seek time) - blocks likely to be accessed in sequence are placed on one cylinder • Mapping tables can be placed in the middle of disks rather than at the beginning • The use of the same cylinder for the storage of the mapping tables and referred blocks improves performance. • Taking rotational positioning (latency) into account consecutive blocks can be interleaved

  11. Fig 9-11

  12. Disk Scheduling • For strictly sequential files there is no problem of scheduling • The actual time to read or write a block is determined by • the seek time (movement of read/write head) • the latency time (rotational delay) • the actual data transfer time

  13. Scheduling algorithms • First-Come-First-Served (FCFS) • Shortest Seek Time First • SCAN • C-SCAN

  14. First-Come-First-Served (FCFS) • Fair • Not optimal with respect to head movement, because it does not consider the head movement of the other request • thus, high average seek time

  15. Shortest Seek Time First • Among the requests the one with the shortest seek time from the current position selected. • Request targets in the middle of the disk will get immediate service • Requests at the inner and outer most tracks may starve.

  16. SCAN • takes the direction of the current head movement into account • Provides good seek time • Edge tracks get better service than in SSTF • Middle tracks still get better service than edge tracks

  17. C-SCN • The head moves in one direction like SCAN • One idle head movement from one edge to the other between the two consecutive scans.

  18. Multimedia File Systems • Traditional file system are not designed for multimedia applications. • They do not consider real time requirements • New policies and strategies are needed for storage and retrieval of MM data. Problem: • We seek to provide real-time behavior for a set of mm session originating from a single storage device.

  19. Multimedia File Systems Continuous media data are different from discrete data in: • real time characteristics • retrieval, computation and presentation before a deadline with little jitter • additional buffers needed • file size • multiple data streams • Must consider the tight relations between different streams arriving from different sources

  20. Multimedia File Systems Ways to support continuous media in file systems • special disk scheduling and buffering algorithms. (the organization of files on disks remain as is) • organization of audio and video files on disk is optimized for their use in MM applications.

  21. Storage Devices Based on how information is stored • Rewritable magnetic and optic disks • WORM, CD-ROM Method of recording • Magnetic – seek time 10 ms, varying density, constant rotation speed (constant angular velocity) • Optical seek time al least 200 ms, constant linear velocity (varying rotational speed) storage density is the same on the whole disk.

  22. Storage Devices Blu-rayDisc (BD) • optical disc format jointly developed by the Blu-ray Disc Association (including Apple, Dell, Hitachi, HP, JVC, LG, Mitsubishi, Panasonic, Pioneer, Philips, Samsung, Sharp, Sony, TDK and Thomson). • The format was developed to enable recording, rewriting and playback of high-definition video (HD), as well as storing large amounts of data. The format offers more than five times the storage capacity of traditional DVDs and can hold up to 25GB on a single-layer disc and 50GB on a dual-layer disc.. • http://www.pclabs.com.tr/2006/03/30/blu-ray-disc-bd-nedir/2/

  23. File Structure and Placement on Disk The main goal of file organization • in conventional systems • efficient use of storage capacity • Allow arbitrary deletion and extension • in multimedia systems • providing constant and timely retrieval of data • internal and external fragmentation • Internal when blocks of data are not fully utilized • External- if a file is deleted a gap occurs when files are contiguously stored.

  24. File Structure and Placement on Disk Goals of multimedia can be achieved through • providing enough buffer • employment of disk scheduling algorithms optimized for real time storage and retrieval • Disk organization • Scattered blocks decreased external fragmentation reusable blocks • Improving transfer rate Disk arrays with 100 and more parallel heads, the projected seek and latency times of less than 10 ms and block size of 4 Kbytes at transfer rate of 0.32 Gbits/s

  25. Approaches to Disk Layout • Continuous blocks • continuous media streams mostly fit for WORM nature and streams recorded at the same time are likely to be played at the same time. • continuous media data are stored in large blocks contiguously on disks  • contiguous files retrieved together are grouped together on the disk • advantage is seek time and buffer size is decreased disadvantage is external fragmentation • Copying overhead during insertion and deletion

  26. Approaches to Disk Layout To avoid external fragmentation and insertion overhead, constrained block allocation is provided. • The size of the blocks (M) and the size of the gaps (G) between them can be derived from the requirement of continuity • Assume data transfer rate rdt is the same as the disk rotation rate sectors/s • continuity requirement is met if the gap is skipped and the block is read within the playback limits

  27. Approaches to Disk Layout • Since there are two variables M and G, storage pattern is not unique. Read ahead and buffering should be provided. If the disk is not empty enough disk storage pattern may not fit strictly to continuity requirements. • Scattered storage make use of special disk space allocation mechanism to allow fast and efficient access • Central merging method- add each new block to the center of two previously stored blocks. This leads to successive creation of two equal new gaps.

  28. Disk Scheduling Algorithms • The goal of disk scheduling in MM systems is to meet the deadlines of all time critical tasks and to keep the buffer requirements low. • As many streams as possible should be served concurrently but aperiodic requests should also be schedulable without delaying their service indefinitely • The scheduling algorithm must find a balance between time constraints and efficiency

  29. Earliest Deadline First • Cost of preemption and scheduling of another task is high – poor throughput excessive seek time

  30. SCAN-EDF • Seek optimization of SCAN and real time guarantees of EDF are combined • Request with earliest deadline is served first • Among streams with the earliest deadline the one in the same direction as the head is served • Optimization applies to requests with the same deadline. Efficiency depends how often common deadlines can be found.

  31. SCAN - EDF • With requests that have varying data rate, periodic fill policy is proposed to let all the requests have the same deadline. • All requests have release times that are multiples of p. Hence all requests have deadlines that are multiples of p • All requests are served in cycles • each request gets a service time proportional to its required data rate • the cycle time is equal to the sum of the service times of all requests • deadline of all requests is the end of the cycle time.

  32. SCAN -EDF Implementation Let Di = deadline of task i Ni = track number of i deadline can be modified to be Di + f(Ni) where f(Ni) = Ni/Nmax (Nmax is the max number of tracks on the disk) Di + f(Ni) £ Dj + f(Nj) holds for all Di£ Dj

  33. SCAN -EDF SCAN-EDF disk scheduling with Nmax = 100 and f(Ni) = Ni / Nmax

  34. SCAN -EDF • If we consider the actual position of the head as N

  35. SCAN -EDF (a) for all blocks located between N and Nmax, the perturbation of the deadline is

  36. SCAN -EDF

  37. Group Sweeping Schedule (GSS) • Requests are serviced in cycles in round robin manner • To reduce arm movement set of n streams is divided into g groups • If the SCAN scheduling strategy is applied to all streams of a cycle without any grouping, the play out of a stream can not be started until the end of the cycle of it’s first retrieval. • SCAN requires buffers for all streams • in GSS the buffers can be reused • joint deadline mechanism is applied for deadline

  38. Group Sweeping Scheduling as a Disk Access Strategy Groups are served in fixed order. Individual streams within a group are served according to SCAN Groups are formed according to similar deadlines Joint deadline is the earliest in the group The order of service within a group is not fixed

  39. Mixed Strategy • Based on • Shortest seek (greedy) • Balanced strategy • The goal of the scheduling algorithm is • to maximize transfer efficiency by minimizing seek time and latency (shortest seek) • To serve process requirements with a limited buffer space Balanced strategy chooses the process which has the least buffered data

  40. Mixed Strategy Filling status of buffers indicate when to switch form SSTF to “Balanced” and vice versa Urgency criterion: Urgency =  1 / (fulness i) All streams i Fulness i = small Urgency = high balanced strategy should be used

More Related