CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.

Slides:



Advertisements
Similar presentations
Secondary Storage Devices: Magnetic Disks
Advertisements

Csci 2111: Data and File Structures Week2, Lecture 1 & 2
Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
OPERATING SYSTEMS CS3530 Summer 2014 OPERATING SYSTEMS CS3530 Summer 2014 Input/Output System Chapter 9.
CSCE 212 Chapter 8 Storage, Networks, and Other Peripherals Instructor: Jason D. Bakos.
1 Storing Data: Disks and Files Yanlei Diao UMass Amherst Feb 15, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 Chapter 6 Storage and Multimedia: The Facts and More.
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
SECTIONS 13.1 – 13.3 Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin SECONDARY STORAGE MANAGEMENT.
1 Outline File Systems Implementation How disks work How to organize data (files) on disks Data structures Placement of files on disk.
CPSC-608 Database Systems Fall 2009 Instructor: Jianer Chen Office: HRBB 309B Phone: Notes #5.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
CPSC-608 Database Systems Fall 2010 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #5.
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
CENG 351 Fall Secondary Storage Devices: Magnetic Disks.
SECTIONS 13.1 – 13.3 Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin SECONDARY STORAGE MANAGEMENT.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
DISK STORAGE INDEX STRUCTURES FOR FILES Lecture 12.
1 Secondary Storage Devices. 2 Content ►Secondary storage devices ►Organization of disks ►Organizing tracks by sector ►Organizing tracks by blocks ►Non-data.
1 Introduction to Computers Day 4. 2 Storage device A functional unit into which data can be –placed –retained(stored) –retrieved(accessed)
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 5 – Storage Organization.
Chapter 8 File Processing and External Sorting. Primary vs. Secondary Storage Primary storage: Main memory (RAM) Secondary Storage: Peripheral devices.
CS4432: Database Systems II Data Storage (Better Block Organization) 1.
Hard Drives Non-Volatile Storage. Hard Drives Hard Drives (HD) The primary storage device in a computer system.
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.
1 6 Further System Fundamentals (HL) 6.2 Magnetic Disk Storage.
Disk Storage Copyright © 2004 Pearson Education, Inc.
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.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
Disks Chapter 5 Thursday, April 5, Today’s Schedule Input/Output – Disks (Chapter 5.4)  Magnetic vs. Optical Disks  RAID levels and functions.
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
External Storage Primary Storage : Main Memory (RAM). Secondary Storage: Peripheral Devices –Disk Drives –Tape Drives Secondary storage is CHEAP. Secondary.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
Chapter 13 Disk Storage, Basic File Structures, and Hashing. Copyright © 2004 Pearson Education, Inc.
Chapter 8 External Storage. Primary vs. Secondary Storage Primary storage: Main memory (RAM) Secondary Storage: Peripheral devices  Disk drives  Tape.
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.
Memory and Storage. Computer Memory Processor registers – Temporary storage locations within the CPU – Examples Instruction register – holds the instruction.
Database Systems Disk Management Concepts. WHY DO DISKS NEED MANAGING? logical information  physical representation bigger databases, larger records,
Auxiliary Memory Magnetic Disk:
CPSC-608 Database Systems Fall 2015 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #5.
Chapter 12: Mass-Storage Systems
CS 101 – Sept. 28 Main vs. secondary memory Examples of secondary storage –Disk (direct access) Various types Disk geometry –Flash memory (random access)
Section 13.2 – Secondary storage management (Former Student’s Note)
Chapter 9 I/O System. 2 Input/Output System I/O Major objectives are: Take an application I/O request and send it to the physical device. Then, take whatever.
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.
Part IV I/O System Chapter 12: Mass Storage Structure.
Lecture Topics: 11/22 HW 7 File systems –block allocation Unix and NT –disk scheduling –file caches –RAID.
Lecture 3 Secondary Storage and System Software I
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.
CS422 Principles of Database Systems Disk Access Chengyu Sun California State University, Los Angeles.
File organization Secondary Storage Devices Lec#7 Presenter: Dr Emad Nabil.
File Organization Record Storage and Primary File Organization
Computer System Structures Storage
Secondary Storage Devices
Chapter 2: Computer-System Structures
Computer Science 210 Computer Organization
Backing Store.
9/12/2018.
Disks and Files DBMS stores information on (“hard”) disks.
Device Management Damian Gordon.
Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin
Persistence: hard disk drive
Mass-Storage Systems.
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.
Chapter 11: Mass-Storage Systems
Presentation transcript:

CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time. Improving disk access performance.

CPSC 231 Secondary storage (D.H.)2 Secondary Storage Management Secondary storage devices: have much longer access time than main memory have access times that vary from one access to another (some accesses are relatively fast and other accesses are slower on the same device) have a lot of more storage than main memory have storage that is non-volatile

CPSC 231 Secondary storage (D.H.)3 Disks Types of commonly used disks hard disks floppy disks Iomega ZIP disks Jaz disks

CPSC 231 Secondary storage (D.H.)4 The Organization of Disks Data is stored on the surface of one or more platters. Disk storage units are: tracks and cylinders sectors Sectors Tracks

CPSC 231 Secondary storage (D.H.)5 Disk Storage Capacity The amount of data that can be held on a disk depends on how densely bits can be stored on the disk surface The capacity of the disk is a function of: the number of cylinders the number of tracks per cylinder the capacity of a track Track capacity =number of sectors per track  bytes per sector Cylinder capacity=number of tracks per cylinder  track capacity Drive capacity = number of cylinders  cylinder capacity

Calculations Calculate the drive capacity if: Sector capacity = 1024 bytes. Number of sectors per track = 179 Number of tracks per cylinder = 80 Number of cylinders = 4062 CPSC 231 Secondary storage (D.H.)6

Answer Track capacity = 179 X 1024 = Bytes Cylinder capacity = 80 X = Bytes. Drive capacity = 2 X 4062 X = Bytes = 111 GB CPSC 231 Secondary storage (D.H.)7

8 How is the Data Read from or Written to a Disk? The operating system sends control signals to the disk via a disk driver to read or to write data from a given sector of a given cylinder. The disk is rotating to position the needed sector under the read/write head (rotational delay) The read/write head is moving to the needed cylinder (seek time).

CPSC 231 Secondary storage (D.H.)9 Specification of Disk Drives Capacity: e.g. 2 GB Minimum (track to track) seek time: e.g. 1 msec Average seek time : e.g. 12 msec (milliseconds) Maximum seek time: e.g. 22 msec Spindle speed: e.g rpm (rotations per minute) Average rotational delay: e.g. 6 msec Mximum transfer rate: e.g.2796 bytes/msec=2730K/sec Bytes per sector: e.g. 512 Sectors per track: e.g. 63 Tracks per cylinder: e.g. 16 Cylinders: 4092

CPSC 231 Secondary storage (D.H.)10 Organizing Data by Sectors Consecutive physical sectors sometimes are not consecutive logically this is called sector interleaving In the early 1990s, controller speeds improved so that disks can now offer non- interleaving (also known as 1:1 interleaving)

CPSC 231 Secondary storage (D.H.)11 Clusters A cluster is a fixed number of consecutive (logical) disk sectors. Some operating systems view each file as a series of clusters. Clusters are designed to improve performance since all sectors in one cluster can be accessed without an additional seek.

CPSC 231 Secondary storage (D.H.)12 Extents Extents of a file are those parts of the file which are stored in contiguous clusters. It is very beneficial to store the whole file in one extent (seek time is minimized).

CPSC 231 Secondary storage (D.H.)13 Fragmentation Fragmentation is the wasted disk space due to the fact that the smallest organizational unit of a disk is one sector. If a sector size is 512 bytes than even if we need to store only one byte, we have to allocate to it one whole sector. Thus 511 bytes are wasted.

CPSC 231 Secondary storage (D.H.)14 Blocks Some disk allow for storing data in user defined blocks instead of sectors. When the data on a disk is organized in blocks, this usually means that the amount of data transferred in a single I/O operation can vary. Blocks can be either variable or fixed length. Block organization can be more efficient than sector organization but it is much more complex.

CPSC 231 Secondary storage (D.H.)15 Non-data Overhead Non-data overhead includes at the beginning of each sector: sector address track address sector usability

CPSC 231 Secondary storage (D.H.)16 The Cost of Disk Access Seek time the time required to move the r/w head to the correct cylinder Rotational delay the time required to rotate the disk so that the correct sector is positioned under the r/w head Transfer time the time required to transfer the data: number of bytes transferred Transfer time =  rotation time number of bytes on a track

Calculations Calculate the transfer time for a disk if: Number of bytes transferred = 256 Bytes Track capacity = 1 MB Rotation time = 5.7 msec. CPSC 231 Secondary storage (D.H.)17

Answer Transfer time = 256 / (1024 X 1024) X 5.7 = 256 / X 5.7 = msec. CPSC 231 Secondary storage (D.H.)18

CPSC 231 Secondary storage (D.H.)19 Disks as Bottlenecks Disk speeds lag far behind CPU main memory local network Computer programs spend most of time awaiting data from the disk

CPSC 231 Secondary storage (D.H.)20 Improving Disk Performance Disk striping splitting the parts of a single file on several drives RAID Redundant Array of Inexpensive Disks RAM disk Disk caching Buffering