CSC 306 Assignment 4: A Floppy Disk Dumper

Size: px
Start display at page:

Download "CSC 306 Assignment 4: A Floppy Disk Dumper"

Transcription

1 CSC 306 Assignment 4: A Floppy Disk Dumper Project due date: 11:59pm CST, 11/18/10 Statement Windows and Linux systems allow a programmer to open the floppy disk and read/write its contents as if it were a sequential file. In this project you will exploit this capability to experiment with raw I/O operations. Outline You need to do your solution in the Windows platform. The Virtual Floppy Disk software allows you to create a virtual floppy disk that operates exactly like a real floppy disk as far as the OS is concerned ( _floppy_disk_imaging_and_virtualization_part_ii.html ). Part I: Write the following functions in a file called disk.c: Disk PhysicalDisk(char letter): Creates the Physical Disk Abstraction for the particular disk (identified by the letter input parameter, A or B). o Step 1: Find the device (read as file) that has to be opened and open it for reading. On Windows the corresponding files one has to open are \\\\.\\A: for floppy drive A and \\\\.\\B: for floppy drive B (Note: Escape all backslashes to suit C string literals). o Step 2: Get the geometry of the floppy disk There are two options here (Hard but Sure Way) Read the boot record (first sector logical sector 0) and get the geometry information by reading the values there. (Easy but learn ioctl ) Read the device s parameters by using the DeviceIOControl() function in Windows which will populate a DISK_GEOMETRY (address of such a structure passed as parameter) struct with all the details about the disk. o Step 3: Get the geometry results of steps 1 and 2 and put them in the Disk structure and return. The Disk structure contains the device handle and details about the disk gathered from the system or directly from the boot sector. typedef struct disk_type *Disk; struct disk_type { HANDLE floppydisk; /* Handle: returned from CreateFile() */ DISK_GEOMETRY geometry; /* Find this struct description in <winioctl.h> */ } Void sectordump(disk thedisk, unsigned logicalsectornumber): Dumps the contents of the requested logical sector onto the screen. Note that logical sectors are sequentially numbered from 0 onwards. Logical sector 0 corresponds to the physical sector at surface 0, track 0, sector 1 on the disk. This incidentally is the boot sector aka boot record. The next logical sector (#1) contains the File Allocation Table (called FAT1). There is a

2 copy of this for backup purposes on logical sector #10 (Called FAT2). How do you read the sector s contents? Just like reading a file, however the logicalsectornumber passed as parameter must be converted to the correct offset to read from. This can be achieved by multiplying the logicalsectornumber with the bytes/sector obtained and stored in the Disk structure from calling PhysicalDisk() function above. Look at geometry fields for what the bytes/sector details is called in Windows. The output of the sectordump() function must be formatted to show 16 bytes of the dump per line. Optional function: BOOL sectorread(disk thedisk, unsigned logicalsectornumber, char *buffer): This is an optional function to divide your work in sectordump into two parts the reading and the formatting+printing. The sectorread() function does the reading so sectordump() calls it and then formats and prints the returned buffer. Part II: Write a driver program (driver.c) to drive the code written in disk.c. The driver will be run with three arguments: Argument 1: letter for the floppy drive (A/B) Argument 2: first sector the contents of which need to be dumped Argument 3: last sector the contents of which need to be dumped Here is an example run and output: Run: driver b 0 2 Output: Opening diskette in drive name: \\.\B: Drive B Media Type 3.5, 1.44MB, 512 Bytes/Sector Cylinders 80, Tracks/cylinder 2, Sectors/track 18 Logical Sector: #0 (Boot Sector): 0: eb 3c e : 2 e b f : cc e5 d5 31 4e 4f 20 4e 41 30: 4d : : : : : : a0: b0:

3 e0: a0: f0: aa Logical Sector: #1 (FAT1): 0: f0 ff ff a0 0 b 10: c0 0 d e0 0 f : a0 1 1b c0 1 1d e0 1 1f : a0 2 2b 40: c0 2 2d e0 2 2f : a0 3 3b c0 3 3d e0 3 3f : a0 4 4b 70: c0 4 4d e0 4 4f : a0 5 5b c0 5 5d e0 5 5f : a0 6 6b a0: c0 6 6d e0 6 6f b0: a0 7 7b c0 7 7d f0 ff e0:

4 1a0: Logical Sector: #2 0: : : : : : : : : : a0: b0: e0: a0: Your project solution on Windows may be written in C or C++ using VC++ or any other IDE of your choice. If you use existing code skeletons from the internet, be sure to cite it appropriately. Grading Criteria:

5 The grader will use the following criteria: 20 Reads and parses arguments of command line 40 Displays the disk geometry correctly 15 Opens the correct device/file 25 Gets the geometry/details of the disk 40 Dumps the sectors as specified 20 Reads the sector contents correctly (on sector boundaries) 15 Formats and prints sector as specified 5 Identifies boot sector and FAT1, FAT2 correctly Submission: Submit a single zip file containing all the files that make up your project. No executables, only sources (.cpp,.h). Send as an attachment to preetam.ghosh@usm.edu

bytes per disk block (a block is usually called sector in the disk drive literature), sectors in each track, read/write heads, and cylinders (tracks).

bytes per disk block (a block is usually called sector in the disk drive literature), sectors in each track, read/write heads, and cylinders (tracks). Understanding FAT 12 You need to address many details to solve this problem. The exercise is broken down into parts to reduce the overall complexity of the problem: Part A: Construct the command to list

More information

Visualization Of Hard Disk Geometry And Master Boot Record

Visualization Of Hard Disk Geometry And Master Boot Record Visualization Of Hard Disk Geometry And Master Boot Record 1 Kamaruddin Malik Mohamad, 2 Mustafa Mat Deris Fakulti Sains Komputer dan Temnologi Maklumat, Universiti Tun Hussein Onn Malaysia (UTHM), 86400

More information

Project 3: An Introduction to File Systems. COP4610 Florida State University

Project 3: An Introduction to File Systems. COP4610 Florida State University Project 3: An Introduction to File Systems COP4610 Florida State University 1 Introduction The goal of project 3 is to understand basic file system design and implementation file system testing data serialization/de-serialization

More information

,879 B FAT #1 FAT #2 root directory data. Figure 1: Disk layout for a 1.44 Mb DOS diskette. B is the boot sector.

,879 B FAT #1 FAT #2 root directory data. Figure 1: Disk layout for a 1.44 Mb DOS diskette. B is the boot sector. Homework 11 Spring 2012 File Systems: Part 2 MAT 4970 April 18, 2012 Background To complete this assignment, you need to know how directories and files are stored on a 1.44 Mb diskette, formatted for DOS/Windows.

More information

Understanding FAT12. Introduction to Computer Forensics. Kessler/Schirling

Understanding FAT12. Introduction to Computer Forensics. Kessler/Schirling Understanding FAT12 Introduction to Computer Forensics Kessler/Schirling Fall 2002 EXP 248 Project #3 You have a floppy disk image file Examine floppy to find an address and a password, and verify MD5

More information

The FAT File System. 1. FAT Overview. 2. Boot Sector, FAT, Root Directory, and Files The FAT F 䤀耄 le System

The FAT File System. 1. FAT Overview. 2. Boot Sector, FAT, Root Directory, and Files The FAT F 䤀耄 le System CIS 24 Home http://www.c jump.com/cis24/cis24syllabus.htm The FAT File System 1. FAT Overview 2. Boot Sector, FAT, Root Directory, and Files 3. FAT File System Layout 4. FAT Clusters and Sectors 5. FAT,

More information

Week 10 Project 3: An Introduction to File Systems. Classes COP4610 / CGS5765 Florida State University

Week 10 Project 3: An Introduction to File Systems. Classes COP4610 / CGS5765 Florida State University Week 10 Project 3: An Introduction to File Systems Classes COP4610 / CGS5765 Florida State University 1 Introduction The goal of project 3 is to understand basic file system design and implementation file

More information

Guide to Computer Forensics and Investigations Fourth Edition. Chapter 6 Working with Windows and DOS Systems

Guide to Computer Forensics and Investigations Fourth Edition. Chapter 6 Working with Windows and DOS Systems Guide to Computer Forensics and Investigations Fourth Edition Chapter 6 Working with Windows and DOS Systems Understanding Disk Drives Disk drives are made up of one or more platters coated with magnetic

More information

1. What is the difference between primary storage and secondary storage?

1. What is the difference between primary storage and secondary storage? 1. What is the difference between primary storage and secondary storage? Primary Storage is - Limited - Volatile - Expensive - Fast (May be accessed directly from the CPU) - Retrieving a single character

More information

Project 3: An Introduction to File Systems. COP 4610 / CGS 5765 Principles of Operating Systems

Project 3: An Introduction to File Systems. COP 4610 / CGS 5765 Principles of Operating Systems Project 3: An Introduction to File Systems COP 4610 / CGS 5765 Principles of Operating Systems Introduction Project 3 learning objectives File system design and implementation File system testing Data

More information

Computer Systems. Assembly Language for x86 Processors 6th Edition, Kip Irvine

Computer Systems. Assembly Language for x86 Processors 6th Edition, Kip Irvine Computer Systems Assembly Language for x86 Processors 6th Edition, Kip Irvine Chapter 15: Disk Fundamentals Yonsei University Department of Computer Science Jaekyung Kim(kimjk@cs.yonsei.ac.kr) (c) Pearson

More information

A+ Guide to Managing and Maintaining your PC, 6e. Chapter 8 Hard Drives

A+ Guide to Managing and Maintaining your PC, 6e. Chapter 8 Hard Drives A+ Guide to Managing and Maintaining your PC, 6e Chapter 8 Hard Drives Introduction Hard drive: most important secondary storage device Hard drive technologies have evolved rapidly Hard drive capacities

More information

A+ Guide to Hardware, 4e. Chapter 7 Hard Drives

A+ Guide to Hardware, 4e. Chapter 7 Hard Drives A+ Guide to Hardware, 4e Chapter 7 Hard Drives Objectives Learn how the organization of data on floppy drives and hard drives is similar Learn about hard drive technologies Learn how a computer communicates

More information

Hong Kong Polytechnic University Department of Electronic and Information Engineering. Experiment On DOS File system

Hong Kong Polytechnic University Department of Electronic and Information Engineering. Experiment On DOS File system DOSFS/CC/v1 Hong Kong Polytechnic University Department of Electronic and Information Engineering Experiment On DOS File system Objectives : To study how an OS manages its file system in a floppy disk.

More information

Input & Output 1: File systems

Input & Output 1: File systems Input & Output 1: File systems What are files? A sequence of (usually) fixed sized blocks stored on a device. A device is often refered to as a volume. A large device might be split into several volumes,

More information

WINDISK: A File and disk Editor

WINDISK: A File and disk Editor s WINDISK: A File and disk Editor Table of content Introduction Loading a file Saving the edited file DBCS files DBCS language selection SBCS files Disk geometry Print view Printer Setup Save view to file

More information

Disks, Memories & Buffer Management

Disks, Memories & Buffer Management Disks, Memories & Buffer Management The two offices of memory are collection and distribution. - Samuel Johnson CS3223 - Storage 1 What does a DBMS Store? Relations Actual data Indexes Data structures

More information

Lesson 09: SD Card Interface

Lesson 09: SD Card Interface Lesson 09: SD Card Interface 1. Introduction A Secure Data (SD) card is a data storage device that can be used as massive storage in an embedded system. We will introduce a method to access data on a SD

More information

makes floppy bootable o next comes root directory file information ATTRIB command used to modify name

makes floppy bootable o next comes root directory file information ATTRIB command used to modify name File Systems File system o Designed for storing and managing files on disk media o Build logical system on top of physical disk organization Tasks o Partition and format disks to store and retrieve information

More information

BLOCK DEVICES. Philipp Dollst

BLOCK DEVICES. Philipp Dollst BLOCK DEVICES Philipp Dollst BASICS A block driver provides access to devices that transfer randomly accessible data in fixed-size blocks disk drives, primarily. The Linux kernel sees block devices a being

More information

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. File-System Structure File structure Logical storage unit Collection of related information File

More information

Da-Wei Chang CSIE.NCKU. Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University

Da-Wei Chang CSIE.NCKU. Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University Chapter 11 Implementing File System Da-Wei Chang CSIE.NCKU Source: Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University Outline File-System Structure

More information

6.096 Introduction to C++ January (IAP) 2009

6.096 Introduction to C++ January (IAP) 2009 MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Welcome to 6.096 Lecture

More information

OPERATING SYSTEMS ASSIGNMENT 3 MEMORY MANAGEMENT

OPERATING SYSTEMS ASSIGNMENT 3 MEMORY MANAGEMENT OPERATING SYSTEMS ASSIGNMENT 3 MEMORY MANAGEMENT Introduction Memory management and memory abstraction is one of the most important features of any operating system. In this assignment we will examine

More information

Operating Systems 2014 Assignment 4: File Systems

Operating Systems 2014 Assignment 4: File Systems Operating Systems 2014 Assignment 4: File Systems Deadline: Sunday, May 25 before 23:59 hours. 1 Introduction A disk can be accessed as an array of disk blocks, often each block is 512 bytes in length.

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Allocation Methods Free-Space Management

More information

Project 4: File System Implementation 1

Project 4: File System Implementation 1 Project 4: File System Implementation 1 Submit a gzipped tarball of your code to CourseWeb. Due: Friday, December 7, 2018 @11:59pm Late: Sunday, December 9, 2018 @11:59pm with 10% reduction per late day

More information

Operating Systems 2015 Assignment 4: File Systems

Operating Systems 2015 Assignment 4: File Systems Operating Systems 2015 Assignment 4: File Systems Deadline: Tuesday, May 26 before 23:59 hours. 1 Introduction A disk can be accessed as an array of disk blocks, often each block is 512 bytes in length.

More information

SWXD3-WE 4.29 GB 3.5-Inch 16-bit DiskDrive SBB

SWXD3-WE 4.29 GB 3.5-Inch 16-bit DiskDrive SBB SWXD3-WE 4.29 GB 3.5-Inch 16-bit DiskDrive SBB Thank you for purchasing our SWXD3-WE StorageWorks Building Block (SBB), designed and manufactured by Digital Equipment Corporation. This 4.29-GB, 3.5-inch

More information

Here is a C function that will print a selected block of bytes from such a memory block, using an array-based view of the necessary logic:

Here is a C function that will print a selected block of bytes from such a memory block, using an array-based view of the necessary logic: Pointer Manipulations Pointer Casts and Data Accesses Viewing Memory The contents of a block of memory may be viewed as a collection of hex nybbles indicating the contents of the byte in the memory region;

More information

Pointer Accesses to Memory and Bitwise Manipulation

Pointer Accesses to Memory and Bitwise Manipulation C Programming Pointer Accesses to Memory and Bitwise Manipulation This assignment consists of two parts, the second extending the solution to the first. Q1 [80%] Accessing Data in Memory Here is a hexdump

More information

Lecture 29. Friday, March 23 CS 470 Operating Systems - Lecture 29 1

Lecture 29. Friday, March 23 CS 470 Operating Systems - Lecture 29 1 Lecture 29 Reminder: Homework 7 is due on Monday at class time for Exam 2 review; no late work accepted. Reminder: Exam 2 is on Wednesday. Exam 2 review sheet is posted. Questions? Friday, March 23 CS

More information

RAID Option ROM. Product Implementation Guide. Version 1.8 Date: 08/19/2009. Copyright 2009, Promise Technology, Inc. All Rights Reserved

RAID Option ROM. Product Implementation Guide. Version 1.8 Date: 08/19/2009. Copyright 2009, Promise Technology, Inc. All Rights Reserved RAID Option ROM Product Implementation Guide Version 1.8 Date: 08/19/2009 Copyright 2009, Promise Technology, Inc. All Rights Reserved Revision History Version Date Author Notes 1.8 2009/08/19 Adam Hsu

More information

CSc Introduction to Computing

CSc Introduction to Computing CSc 10200 Introduction to Computing Lecture 2 Edgardo Molina Fall 2011 - City College of New York Thursday, September 1, 2011 Introduction to C++ Modular program: A program consisting of interrelated segments

More information

we are here I/O & Storage Layers Recall: C Low level I/O Recall: C Low Level Operations CS162 Operating Systems and Systems Programming Lecture 18

we are here I/O & Storage Layers Recall: C Low level I/O Recall: C Low Level Operations CS162 Operating Systems and Systems Programming Lecture 18 I/O & Storage Layers CS162 Operating Systems and Systems Programming Lecture 18 Systems April 2 nd, 2018 Profs. Anthony D. Joseph & Jonathan Ragan-Kelley http://cs162.eecs.berkeley.edu Application / Service

More information

Pointer Accesses to Memory and Bitwise Manipulation

Pointer Accesses to Memory and Bitwise Manipulation C Programming Pointer Accesses to Memory and Bitwise Manipulation This assignment consists of two parts, the second extending the solution to the first. Q1 [80%] Accessing Data in Memory Here is a hexdump

More information

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University File System Case Studies Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics The Original UNIX File System FFS Ext2 FAT 2 UNIX FS (1)

More information

Operating Systems. Objective

Operating Systems. Objective Operating Systems Project #1: Introduction & Booting Project #1: Introduction & Booting Objective Background Tools Getting Started Booting bochs The Bootloader Assembling the Bootloader Disk Images A Hello

More information

6.24 Estimate the average time (in ms) to access a sector on the following disk:

6.24 Estimate the average time (in ms) to access a sector on the following disk: Homework Problems 631 There is a large body of literature on building and using disk storage Many storage researchers look for ways to aggregate individual disks into larger, more robust, and more secure

More information

we are here Page 1 Recall: How do we Hide I/O Latency? I/O & Storage Layers Recall: C Low level I/O

we are here Page 1 Recall: How do we Hide I/O Latency? I/O & Storage Layers Recall: C Low level I/O CS162 Operating Systems and Systems Programming Lecture 18 Systems October 30 th, 2017 Prof. Anthony D. Joseph http://cs162.eecs.berkeley.edu Recall: How do we Hide I/O Latency? Blocking Interface: Wait

More information

File Systems Part 1. Operating Systems In Depth XIV 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

File Systems Part 1. Operating Systems In Depth XIV 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. File Systems Part 1 Operating Systems In Depth XIV 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. Files Memory Disk Disk Operating Systems In Depth XIV 2 Copyright 2018 Thomas W. Doeppner. All

More information

Review Questions on Computer Basics

Review Questions on Computer Basics Review Questions on Computer Basics 1. Distinguish between and define (see glossary in Maxfield and Brown s Bebop Bytes Back for the definition of terms not found in Andrews A Guide to Managing and Maintaining

More information

Linux storage system basics

Linux storage system basics Linux storage system basics Storage device A computer runs programs that are loaded in memory The program is loaded from a storage device The result of an execution is stored to a storage device Storage

More information

OPERATING SYSTEM. Chapter 12: File System Implementation

OPERATING SYSTEM. Chapter 12: File System Implementation OPERATING SYSTEM Chapter 12: File System Implementation Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management

More information

seg # page # offset

seg # page # offset Operating Systems Sample Final Exam - SOLUTIONS Name (10 pts) 1. Suppose a memory allocator has a freelist with blocks of sizes as shown: 64 24 96 4096 Using a first-fit strategy, draw what happens to

More information

CS 140 Project 4 File Systems Review Session

CS 140 Project 4 File Systems Review Session CS 140 Project 4 File Systems Review Session Prachetaa Due Friday March, 14 Administrivia Course withdrawal deadline today (Feb 28 th ) 5 pm Project 3 due today (Feb 28 th ) Review section for Finals on

More information

File System Implementation. Sunu Wibirama

File System Implementation. Sunu Wibirama File System Implementation Sunu Wibirama File-System Structure Outline File-System Implementation Directory Implementation Allocation Methods Free-Space Management Discussion File System Structure File

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,

More information

1. Overview This project will help you understand address spaces and virtual memory management.

1. Overview This project will help you understand address spaces and virtual memory management. Project 2--Memory Worth: 12 points Assigned: Due: 1. Overview This project will help you understand address spaces and virtual memory management. In this project, you will implement an external pager,

More information

DEPT OF ISE, NIT,RAICHUR Page 1

DEPT OF ISE, NIT,RAICHUR Page 1 1. Explain briefly the short history of file structure design. (4 M) (Dec/Jan 2016), (June/July 2015). Earlier, the file access was sequential, and the cost of access grew in direct proportion to the size

More information

File System (Internals) Dave Eckhardt

File System (Internals) Dave Eckhardt File System (Internals) Dave Eckhardt de0u@andrew.cmu.edu 1 Synchronization P2 grading questions Send us mail, expect to hear from your grader Today Chapter 12 (not: Log-structured, NFS) 2 Outline File

More information

Chapter 11: Implementing File Systems

Chapter 11: Implementing File Systems Chapter 11: Implementing File Systems Operating System Concepts 99h Edition DM510-14 Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory Implementation Allocation

More information

CSC443 Winter 2018 Assignment 1. Part I: Disk access characteristics

CSC443 Winter 2018 Assignment 1. Part I: Disk access characteristics CSC443 Winter 2018 Assignment 1 Due: Sunday Feb 11, 2018 at 11:59 PM Part I: Disk access characteristics In this assignment, we investigate the data access characteristics of secondary storage devices.

More information

CS 4284 Systems Capstone

CS 4284 Systems Capstone CS 4284 Systems Capstone Disks & File Systems Godmar Back Disks & Filesystems Disk Schematics Source: Micro House PC Hardware Library Volume I: Hard Drives 3 Tracks, Sectors, Cylinders 4 Hard Disk Example

More information

Chapter 11: Implementing File

Chapter 11: Implementing File Chapter 11: Implementing File Systems Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

Linux SMR Support Status

Linux SMR Support Status Linux SMR Support Status Damien Le Moal Vault Linux Storage and Filesystems Conference - 2017 March 23rd, 2017 Outline Standards and Kernel Support Status Kernel Details - What was needed Block stack File

More information

Initial Bootloader. On power-up, when a computer is turned on, the following operations are performed:

Initial Bootloader. On power-up, when a computer is turned on, the following operations are performed: Initial Bootloader Introduction On power-up, when a computer is turned on, the following operations are performed: 1. The computer performs a power on self test (POST) to ensure that it meets the necessary

More information

Chapter 11: Implementing File Systems. Operating System Concepts 9 9h Edition

Chapter 11: Implementing File Systems. Operating System Concepts 9 9h Edition Chapter 11: Implementing File Systems Operating System Concepts 9 9h Edition Silberschatz, Galvin and Gagne 2013 Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory

More information

Midterm Exam #2 Solutions April 20, 2016 CS162 Operating Systems

Midterm Exam #2 Solutions April 20, 2016 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2016 Anthony D. Joseph Midterm Exam #2 Solutions April 20, 2016 CS162 Operating Systems Your Name: SID AND

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

CS 1550 Project 3: File Systems Directories Due: Sunday, July 22, 2012, 11:59pm Completed Due: Sunday, July 29, 2012, 11:59pm

CS 1550 Project 3: File Systems Directories Due: Sunday, July 22, 2012, 11:59pm Completed Due: Sunday, July 29, 2012, 11:59pm CS 1550 Project 3: File Systems Directories Due: Sunday, July 22, 2012, 11:59pm Completed Due: Sunday, July 29, 2012, 11:59pm Description FUSE (http://fuse.sourceforge.net/) is a Linux kernel extension

More information

Segmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS)

Segmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Review Segmentation Segmentation Implementation Advantage of Segmentation Protection Sharing Segmentation with Paging Segmentation with Paging Segmentation with Paging Reason for the segmentation with

More information

Programming in C++ 4. The lexical basis of C++

Programming in C++ 4. The lexical basis of C++ Programming in C++ 4. The lexical basis of C++! Characters and tokens! Permissible characters! Comments & white spaces! Identifiers! Keywords! Constants! Operators! Summary 1 Characters and tokens A C++

More information

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19 Data Storage Geoffrey Brown Bryce Himebaugh Indiana University August 9, 2016 Geoffrey Brown, Bryce Himebaugh 2015 August 9, 2016 1 / 19 Outline Bits, Bytes, Words Word Size Byte Addressable Memory Byte

More information

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices Introduction Operating Systems Input/Output Devices (Ch12.1-12.3, 12.7; 13.1-13.3, 13.7) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple

More information

HARD DRIVE, FLOPPY DRIVE HOW DOES IT ALL FIT?

HARD DRIVE, FLOPPY DRIVE HOW DOES IT ALL FIT? HOW DOES IT ALL FIT? We need to spend a little time looking at how the data is organized on a floppydisk. Picture in your mind how the platter spins around under the write head, and how that write head

More information

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department

King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department CPCS202, 1 st Term 2016 (Fall 2015) Program 5: FCIT Grade Management System Assigned: Thursday, December

More information

File Management. Information Structure 11/5/2013. Why Programmers Need Files

File Management. Information Structure 11/5/2013. Why Programmers Need Files File Mgr Device Mgr Memory Mgr Process Mgr File Mgr Device Mgr Memory Mgr Process Mgr 11/5/2013 Slide 13-1 Slide 13-2 File Management 13 Fig 13-2: The External View of the File Manager Slide 13-3 Why Programmers

More information

Chapter 10: File System Implementation

Chapter 10: File System Implementation Chapter 10: File System Implementation Chapter 10: File System Implementation File-System Structure" File-System Implementation " Directory Implementation" Allocation Methods" Free-Space Management " Efficiency

More information

Machine Language and System Programming

Machine Language and System Programming زبان ماشين وبرنامه نويسی سيستم Machine Language and System Programming جلسه دوازدھم دانشگاه صنعتی ھمدان پاييز 1389 Objectives Explain the purpose and structure of file systems Describe Microsoft file structures

More information

File Systems. What do we need to know?

File Systems. What do we need to know? File Systems Chapter 4 1 What do we need to know? How are files viewed on different OS s? What is a file system from the programmer s viewpoint? You mostly know this, but we ll review the main points.

More information

CSCE Introduction to Computer Systems Spring 2019

CSCE Introduction to Computer Systems Spring 2019 CSCE 313-200 Introduction to Computer Systems Spring 2019 File System IV Dmitri Loguinov Texas A&M University April 9, 2019 1 Chapter 12: Roadmap 12.1 Overview 12.2 File organization 12.3 Directories 12.4

More information

OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD.

OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD. OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD. File System Implementation FILES. DIRECTORIES (FOLDERS). FILE SYSTEM PROTECTION. B I B L I O G R A P H Y 1. S I L B E R S C H AT Z, G A L V I N, A N

More information

Chapter 12: File System Implementation. Operating System Concepts 9 th Edition

Chapter 12: File System Implementation. Operating System Concepts 9 th Edition Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods

More information

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices Introduction Operating Systems Input/Output Devices (Ch12.1-12.3, 12.7; 13.1-13.3, 13.7) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple

More information

ENGR 3950U / CSCI 3020U (Operating Systems) Simulated UNIX File System Project Instructor: Dr. Kamran Sartipi

ENGR 3950U / CSCI 3020U (Operating Systems) Simulated UNIX File System Project Instructor: Dr. Kamran Sartipi ENGR 3950U / CSCI 3020U (Operating Systems) Simulated UNIX File System Project Instructor: Dr. Kamran Sartipi Your project is to implement a simple file system using C language. The final version of your

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Input/Output Systems part 1 (ch13) Shudong Chen 1 Objectives Discuss the principles of I/O hardware and its complexity Explore the structure of an operating system s I/O subsystem

More information

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University File System Case Studies Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics The Original UNIX File System FFS Ext2 FAT 2 UNIX FS (1)

More information

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this

More information

Introduction to Computer Systems. Exam 1. February 22, Model Solution fp

Introduction to Computer Systems. Exam 1. February 22, Model Solution fp 15-213 Introduction to Computer Systems Exam 1 February 22, 2005 Name: Andrew User ID: Recitation Section: Model Solution fp This is an open-book exam. Notes are permitted, but not computers. Write your

More information

CS510 Operating System Foundations. Jonathan Walpole

CS510 Operating System Foundations. Jonathan Walpole CS510 Operating System Foundations Jonathan Walpole File System Performance File System Performance Memory mapped files - Avoid system call overhead Buffer cache - Avoid disk I/O overhead Careful data

More information

The Device Driver Interface. Input/Output Devices. System Call Interface. Device Management Organization

The Device Driver Interface. Input/Output Devices. System Call Interface. Device Management Organization Input/Output s Slide 5-1 The Driver Interface Slide 5-2 write(); Interface Output Terminal Terminal Printer Printer Disk Disk Input or Terminal Terminal Printer Printer Disk Disk Management Organization

More information

libquadflash API 1 General Operations

libquadflash API 1 General Operations libquadflash API IN THIS DOCUMENT General Operations Boot Partition s Data Partition s The libquadflash library provides functions for reading and writing data to Quad-SPI flash devices that use the xcore

More information

1- Which of the following tasks is the operating system NOT responsible for? d) Coordinates communication between software applications and the CPU

1- Which of the following tasks is the operating system NOT responsible for? d) Coordinates communication between software applications and the CPU 1- Which of the following tasks is the operating system NOT responsible for? a) Management, scheduling, and coordination of tasks b) File compression c) Manages the computer's hardware d) Coordinates communication

More information

Physical and Logical structure. Thursday, December 02, 2004

Physical and Logical structure. Thursday, December 02, 2004 Logical_and_physical Page 1 Physical and Logical structure Thursday, December 02, 2004 2:32 PM Logical and Physical structure Physical structure of a disk: tracks, sectors, cylinders. Logical structure

More information

Data rate - The data rate is the number of bytes per second that the drive can deliver to the CPU.

Data rate - The data rate is the number of bytes per second that the drive can deliver to the CPU. A+ Guide to Hardware, 4e Chapter 7 Hard Drives Learning from Floppy Drives Floppy drives are an obsolescent technology Replacements: CD drives and USB flash memory Good reasons for studying floppy drive

More information

Week 12: File System Implementation

Week 12: File System Implementation Week 12: File System Implementation Sherif Khattab http://www.cs.pitt.edu/~skhattab/cs1550 (slides are from Silberschatz, Galvin and Gagne 2013) Outline File-System Structure File-System Implementation

More information

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco CS 326 Operating Systems C Programming Greg Benson Department of Computer Science University of San Francisco Why C? Fast (good optimizing compilers) Not too high-level (Java, Python, Lisp) Not too low-level

More information

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. (done)

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. (done) Introduction Operating Systems Input/Output Devices (Ch 13.3, 13.5; 14.1-14.3) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple to use

More information

Structures, Unions Alignment, Padding, Bit Fields Access, Initialization Compound Literals Opaque Structures Summary. Structures

Structures, Unions Alignment, Padding, Bit Fields Access, Initialization Compound Literals Opaque Structures Summary. Structures Structures Proseminar C Grundlagen und Konzepte Michael Kuhn Research Group Scientific Computing Department of Informatics Faculty of Mathematics, Informatics und Natural Sciences University of Hamburg

More information

File Systems Management and Examples

File Systems Management and Examples File Systems Management and Examples Today! Efficiency, performance, recovery! Examples Next! Distributed systems Disk space management! Once decided to store a file as sequence of blocks What s the size

More information

b. How many bits are there in the physical address?

b. How many bits are there in the physical address? Memory Management 1) Consider a logical address space of 64 (or 26) pages of 1,024 (or 210) bytes each, mapped onto a physical memory of 32 (or 25) frames. a. How many bits are there in the logical address?

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

File System: Interface and Implmentation

File System: Interface and Implmentation File System: Interface and Implmentation Two Parts Filesystem Interface Interface the user sees Organization of the files as seen by the user Operations defined on files Properties that can be read/modified

More information

Pointer Accesses to Memory and Bitwise Manipulation

Pointer Accesses to Memory and Bitwise Manipulation C Programming Pointer Accesses to Memory and Bitwise Manipulation This assignment consists of implementing a function that can be executed in two modes, controlled by a switch specified by a parameter

More information

Introduction to Computer Systems. Exam 1. February 22, This is an open-book exam. Notes are permitted, but not computers.

Introduction to Computer Systems. Exam 1. February 22, This is an open-book exam. Notes are permitted, but not computers. 15-213 Introduction to Computer Systems Exam 1 February 22, 2005 Name: Andrew User ID: Recitation Section: This is an open-book exam. Notes are permitted, but not computers. Write your answer legibly in

More information

A Frame Work for Virtual USB Devices under Linux Environment

A Frame Work for Virtual USB Devices under Linux Environment International Journal of Computer Science and Telecommunications [Volume 1, Issue 1, November 2010] 13 ISSN 2047-3338 A Frame Work for Virtual USB Devices under Linux Environment M. A. Naeem 1 and Rizwan

More information

CSE451 Winter 2012 Project #4 Out: February 8, 2012 Due: March 5, 2011 by 11:59 PM (late assignments will lose ½ grade point per day)

CSE451 Winter 2012 Project #4 Out: February 8, 2012 Due: March 5, 2011 by 11:59 PM (late assignments will lose ½ grade point per day) CSE451 Winter 2012 Project #4 Out: February 8, 2012 Due: March 5, 2011 by 11:59 PM (late assignments will lose ½ grade point per day) Objectives This project introduces you to the Windows FAT file system.

More information

Operating Systems. Project #2: System Calls

Operating Systems. Project #2: System Calls Operating Systems Project #2: System Calls Project #2: System Calls Objective Background Getting Started Using BIOS Routines Printing to the Screen via the BIOS (Interrupt 0x10) Reading from the Keyboard

More information