Disk Basics CS 537 - Introduction to Operating Systems.

Slides:



Advertisements
Similar presentations
IT253: Computer Organization
Advertisements

Storing Data: Disks and Files: Chapter 9
CS 277 – Spring 2002Notes 21 CS 277: Database System Implementation Notes 02: Hardware Arthur Keller.
Storage. The Memory Hierarchy fastest, but small under a microsecond, random access, perhaps 2Gb Typically magnetic disks, magneto­ optical (erasable),
CS4432: Database Systems II Data Storage - Lecture 2 (Sections 13.1 – 13.3) Elke A. Rundensteiner.
13.2 Disks Mechanics of Disks Presented by Chao-Hsin Shih Feb 21, 2011.
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
CS4432: Database Systems II Lecture 2 Timothy Sutherland.
Device Management.
12/3/2004EE 42 fall 2004 lecture 391 Lecture #39: Magnetic memory storage Last lecture: –Dynamic Ram –E 2 memory This lecture: –Future memory technologies.
1 CS222: Principles of Database Management Fall 2010 Professor Chen Li Department of Computer Science University of California, Irvine Notes 01.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Operating Systems COMP 4850/CISG 5550 Disks, Part II Dr. James Money.
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
Disk and I/O Management
CS4432: Database Systems II Data Storage (Better Block Organization) 1.
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
Lecture 11: DMBS Internals
1 6 Further System Fundamentals (HL) 6.2 Magnetic Disk Storage.
CS 111 – Aug – 1.3 –Information arranged in memory –Types of memory –Disk properties Commitment for next day: –Read pp , In other.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable Used to communicate with the user Printers Video display terminals.
Chapter 111 Chapter 11: Hardware (Slides by Hector Garcia-Molina,
Database Management Systems,Shri Prasad Sawant. 1 Storing Data: Disks and Files Unit 1 Mr.Prasad Sawant.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
Chapter 8 External Storage. Primary vs. Secondary Storage Primary storage: Main memory (RAM) Secondary Storage: Peripheral devices  Disk drives  Tape.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
CS4432: Database Systems II Data Storage 1. Storage in DBMSs DBMSs manage large amounts of data How does a DBMS store and manage large amounts of data?
Storing Data Dina Said 1 1.
CS 101 – Sept. 28 Main vs. secondary memory Examples of secondary storage –Disk (direct access) Various types Disk geometry –Flash memory (random access)
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
Disk Average Seek Time. Multi-platter Disk platter Disk read/write arm read/write head.
Section 13.2 – Secondary storage management. Index 13.2 Disks Mechanics of Disks The Disk Controller Disk Access Characteristics.
Magnetic Disk Rotational latency Example Find the average rotational latency if the disk rotates at 20,000 rpm.
Programmer’s View of Files Logical view of files: –An a array of bytes. –A file pointer marks the current position. Three fundamental operations: –Read.
COSC 6340: Disks 1 Disks and Files DBMS stores information on (“hard”) disks. This has major implications for DBMS design! » READ: transfer data from disk.
CPS216: Advanced Database Systems Notes 03: Data Access from Disks Shivnath Babu.
1 Lecture 16: Data Storage Wednesday, November 6, 2006.
1 Components of the Virtual Memory System  Arrows indicate what happens on a lw virtual address data physical address TLB page table memory cache disk.
Data Storage and Querying in Various Storage Devices.
File organization Secondary Storage Devices Lec#7 Presenter: Dr Emad Nabil.
Computer Storage. What is Primary Storage? ● Primary storage is computer memory that is directly accessible to the CPU of a computer without the use of.
1 Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
Chapter 10: Mass-Storage Systems
Chapter 2: Computer-System Structures
Storage and Disks.
Lecture 16: Data Storage Wednesday, November 6, 2006.
Database Management Systems (CS 564)
Computer Science 210 Computer Organization
Hard Drives.
Disks and Files DBMS stores information on (“hard”) disks.
Lecture 11: DMBS Internals
Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: illusion of having more physical memory program relocation protection.
Overview of Mass Storage Structure
Operating Systems (CS 340 D)
CS 140 Lecture Notes: Technology and Operating Systems
CS 140 Lecture Notes: Technology and Operating Systems
CSE 451: Operating Systems Autumn 2003 Lecture 12 Secondary Storage
Secondary Storage Management Brian Bershad
Persistence: hard disk drive
Chapter 11 I/O Management and Disk Scheduling
CSE 451: Operating Systems Winter 2003 Lecture 12 Secondary Storage
Parameters of Disks The most important disk parameter is the time required to locate an arbitrary disk block, given its block address, and then to transfer.
Secondary Storage Management Hank Levy
CSE451 File System Introduction and Disk Drivers Autumn 2002
Chapter 11: Mass-Storage Systems
Lecture 10: Magnetic Disks
CPS216: Advanced Database Systems Notes 04: Data Access from Disks
Introduction to Operating Systems
Presentation transcript:

Disk Basics CS Introduction to Operating Systems

Hard Drive Technology  platter track cylinder track sectors read head read arm

Hard Drive Technology Modern Statistics –capacity: 20.5 GB –sector size: 512 bytes –speed: 7200 RPM –platters: 3 –heads: 6 –cylinders: 17,688 –media transfer rate: 35 MB/sec –interface transfer rate: MB/sec –cost: $127.00

Hard Drive Terminology Seek Latency –time to move the read head to correct cylinder avg = 9.0 ms track-to-track = 2.2 ms full-track = 15 ms Rotational Latency –time for disk to rotate to needed sector avg = 4.17 ms Transfer Latency –time to actually read and send the data  50  s for 1 KB of data

Disk Access Cannot access any random byte on a disk –this would be called random access (RAM) However, don’t have to access them sequentially –have to go through all data to get to desired data (tape drive) Disks must be accessed per sector –each sector is 512 bytes –this is called direct access

Reading from Disk To read a single byte from disk –provide address of sector cylinder, head, sector number –seek to location of data on disk –read entire sector into memory (512 bytes) –index into memory to grab the necessary byte

Writing to Disk To write a single byte out to disk –read entire sector into memory –modify the necessary byte in memory –seek back to disk location –write the entire sector back to disk Notice 2 times avg. latency required to write a single block

Disk Performance Disk is a mechanical device –extremely SLOW!! Can use DMA and context switching to hide latency –this will only help so much Want to interact with physical disk as little as possible Reading and writing a single byte is a bad idea

Prefetching Blocks If the user wants data in sector 23, odds are they will eventually want data in sector 24 –this assumes intelligent placement of data on disk to start with - more on this later Amortize the latencies by reading in sector 23 and sector 24 –when user does actually want sector 24, already in memory Most disks are read in a page at a time –4 KB of data (8 sectors)

Disk Buffering If byte 55 of sector 26 is modified, high probability byte 56 of sector 27 will also be modified Usually wait awhile to write back a sector that is currently in memory –hopefully wait until all data that will be modified is modified –again, allows amortization of latencies over a large number of writes