Clusters, Sectors, and Files

Slides:



Advertisements
Similar presentations
DAT2343 File Storage and Access © Alan T. Pinck / Algonquin College; 2003.
Advertisements

CS 346 – April 4 Mass storage –Disk formatting –Managing swap space –RAID Commitment –Please finish chapter 12.
Lesson 9 Types of Storage Devices.
Types Of Storage Device
Part IV: Memory Management
SEMINAR ON FILE SLACK AND DISK SLACK
Allocating Memory.
Chapter 3.2 : Virtual Memory
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
VIRTUAL MEMORY. Virtual memory technique is used to extents the size of physical memory When a program does not completely fit into the main memory, it.
Bits and Data Storage. Basic Hardware Units of a Computer.
PC Maintenance: Preparing for A+ Certification Chapter 10: Introduction to Disk Storage.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
The disk surface is divided into tracks. into tracks. 1.
External Storage Primary Storage : Main Memory (RAM). Secondary Storage: Peripheral Devices –Disk Drives –Tape Drives Secondary storage is CHEAP. Secondary.
Storage and Indexes Introduction to Databases Computer Science 557 Instructor: Joe Bockhorst University of Wisconsin - Milwaukee.
Damian Gordon. HARD DISK (MAIN MEMORY) (SECONDARY MEMORY) 2 CACHE 1.
Chapter 8 External Storage. Primary vs. Secondary Storage Primary storage: Main memory (RAM) Secondary Storage: Peripheral devices  Disk drives  Tape.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
FAT File Allocation Table
2/17 How Disk Storage Works Roll call. Video: disk storage. Step-by-step lecture.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Chapter 7 Volume versus Partition. Cylinder, Head, and Sector (CHS) Hard or fixed disks store information on a revolving platter of metal or glass coated.
Virtual Memory Pranav Shah CS147 - Sin Min Lee. Concept of Virtual Memory Purpose of Virtual Memory - to use hard disk as an extension of RAM. Personal.
Chapter 8 File Systems FAT 12/16/32. Defragmentation Defrag a hard drive – Control Panel  System and Security  Administration tools  Defrag hard drive.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
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.
Memory Management Chapter 5 Advanced Operating System.
File Systems : Hierarchical File System (HFS, for Mac OS) Prepared by : Mohammad Azzuri bin Zaidi UFH
Lecture 3 Secondary Storage and System Software I
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
COSC2410: LAB 19 INTRODUCTION TO MEMORY/CACHE DIRECT MAPPING 1.
File System Implementation
Memory Management One of the most important OS jobs.
Lecture 11 Virtual Memory
CE 454 Computer Architecture
Chapter 2 Memory and process management
Virtual Memory User memory model so far:
CS703 - Advanced Operating Systems
Computer Graphics Index Buffers
Computer Science 210 Computer Organization
Chapter 11: File System Implementation
Introduction to Computers
Drive formatting Jake + Jacob.
Lecture 11: DMBS Internals
Data Representation Numbers
Chapter 11: File System Implementation
O.S Lecture 13 Virtual Memory.
Main memory and mass storage
Forensic Concept of Data
Database Management Systems (CS 564)
Chapter 11: File System Implementation
CS399 New Beginnings Jonathan Walpole.
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Cache Memory.
Lecture 15 Reading: Bacon 7.6, 7.7
CSE451 Memory Management Introduction Autumn 2002
RDBMS Chapter 4.
Contents Memory types & memory hierarchy Virtual memory (VM)
Lesson 9 Types of Storage Devices.
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Indexing 4/11/2019.
Chapter 11: File System Implementation
File system : Disk Space Management
Lecture 20: Representing Data Elements
Memory Management & Virtual Memory
Page Main Memory.
Presentation transcript:

Clusters, Sectors, and Files A very brief, totally incomplete, and at some times over-simplified introduction Chuck Cusack Some images from Wikipedia and a few other sources

Example: In the City City Block House Rooms

Hard Drives Three ways of thinking about them Physically Conceptually Logically

Hard Drives: Conceptually File System Folders Files

Hard Drives: Physically Medium type Data

Hard Drives: Logically Clusters Sectors Bits 1 …

Example: Revisited City—Hard Drive Block—Cluster Plot of land—Sector House occupies one or more plots Rooms—Bits

Disk Sector Facts (more or less) Typically, disks can be addressed as the sector level, starting with sector 0. A sector can only contain data from one file. A file may be contained in multiple sectors. If the sector size is 512 bytes and a file has 200 bytes, 312 bytes will be unused (wasted). If a disk has 1024 sectors, it can hold at most 1024 files, assuming each is no larger than one sector.

Disk Cluster Facts (more or less) File systems (more on those later) are based on clusters of sectors. A cluster can only contain data from one file. A file may be contained in multiple clusters. If the cluster size is 512 bytes and a file has 200 bytes, 312 bytes will be unused (wasted). If a disk has 1024 clusters, it can hold at most 1024 files, assuming each is no larger than one cluster. Typically, we care about clusters rather than sectors— abstraction!

Cluster Size Does it matter what the size of a cluster is? There are two competing things to consider: The cluster size affects the number of addresses available The cluster size (along with the disk size) affects the number of bits needed for an address Ideally we want to have no limit on the number of files we can store on our disk. Additionally there are benefits (which we won’t discuss in detail) of having shorter addresses.

Cluster Questions What are some of the advantages/disadvantages of small clusters? More files Less wasted space Longer addresses What are some of the advantages/disadvantages of large clusters? Shorter addresses Fewer files can be stored More wasted space

Addressing: Back to the City If I want directions to an address, is “473” enough information? Clearly more information is needed—for instance the street name. If I ask where “473 College Ave” is, I can find it—as long as I know the city. Here think of the city as a disk drive—knowing we are in Holland is like knowing we are referring to the C: drive, for instance.

Addressing: Streets and Numbers Mapping our city analogy to disks slightly differently: A plot of land is like a cluster We will ignore sectors (What concept allows us to do this?) A house is like a file A Disk Drive is a like a city with the following rules All streets are the same length All plots are the same size At most one house per plot A house may take up more than one plot If a house takes up more than one plot, the addresses are “merged” (i.e. some addresses are skipped)

Cluster/Sector Example 16  16 = 256 = 28 clusters (The fact that the grid is 16 by 16 bears no resemblance to reality) 256  8 = 2048 = 211 sectors 20484096 = 8388608 = 223 bytes = 8 MB How many addresses are there? What is the smallest amount of space assignable to a file? How many files can be placed on the drive? What is largest file size possible on the drive? 8 sectors per cluster 4096 bits per sector

Addressing Example I have an 8 GB hard drive with sector size 4096 bytes. How many sectors are there? How many addresses are there (internally)? I format the disk with clusters of size 65536 bytes. How many clusters are there? How many addresses are there (w.r.t. the file system)? How many files can I have? How long are the addresses?

Files Example We can ignore sectors (why?) Might take up part of a cluster But the rest is wasted Might take up multiple clusters Might be split up

Other things The examples here were specific to hard drives Many of the concepts transfer to other forms of mass storage (or secondary storage) Some of the concepts can be translated to memory, although there are some major differences Very loosely speaking (and is some ways not very accurate): Sector  Memory Cell Cluster  Block (Page?) If you take the Operating Systems class, you may learn a lot more about memory.