CPSC 457 Operating Systems

Slides:



Advertisements
Similar presentations
Chapter 12: File System Implementation
Advertisements

Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
04/14/2008CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 Chapter 13: I/O Systems I/O Hardware.
Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
I/O Systems CS 3100 I/O Hardware1. I/O Hardware Incredible variety of I/O devices Common concepts ◦Port ◦Bus (daisy chain or shared direct access) ◦Controller.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
I/O Systems CSCI 444/544 Operating Systems Fall 2008.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Copyright ©: Nahrstedt, Angrave, Abdelzaher
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
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.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
NETW 3005 I/O Systems. Reading For this lecture, you should have read Chapter 13 (Sections 1-4, 7). NETW3005 (Operating Systems) Lecture 10 - I/O Systems2.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 Chapter 13: I/O Systems I/O Hardware.
Silberschatz, Galvin and Gagne  Operating System Concepts I/O Hardware Incredible variety of I/O devices.
I/O Systems I/O Hardware Application I/O Interface
1 Module 12: I/O Systems n I/O hardware n Application I/O Interface n Kernel I/O Subsystem n Transforming I/O Requests to Hardware Operations n Performance.
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
Chapter 13: I/O Systems. 13.2/34 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
12/8/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King,
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 13: I/O Systems I/O Hardware Application I/O Interface.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Silberschatz, Galvin and Gagne  Operating System Concepts Six Step Process to Perform DMA Transfer.
XE33OSA Chapter 13: I/O Systems. 13.2XE33OSA Silberschatz, Galvin and Gagne ©2005 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
FILE SYSTEM IMPLEMENTATION 1. 2 File-System Structure File structure Logical storage unit Collection of related information File system resides on secondary.
Lecture 11 Deadlocks and Devices. Last Time CPSC Tyson Kendon Concurrency Some notes about Semaphores Spinlocks Classical Synchronization.
Introduction to Operating Systems Concepts
Input/Output (I/O) Important OS function – control I/O
Chapter 13: I/O Systems.
Module 3: Operating-System Structures
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 11: File System Implementation
Chapter 12: File System Implementation
Operating Systems (CS 340 D)
Input/Output.
Chapter 13: I/O Systems.
CSCI 315 Operating Systems Design
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
Selecting a Disk-Scheduling Algorithm
CS703 - Advanced Operating Systems
Chapter 2: Operating-System Structures
Operating Systems Lecture 1.
Introduction to Operating Systems
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
File System Implementation
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 2: Operating-System Structures
Department of Computer Science
Operating Systems Structure
Chapter 1: Introduction CSS503 Systems Programming
Chapter 13: I/O Systems.
Mr. M. D. Jamadar Assistant Professor
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

CPSC 457 Operating Systems Lecture 12 Devices and File Systems

Last Time Deadlocks Resource Allocation Detecting Deadlocks Resolving Deadlocks CPSC 457 - Tyson Kendon 2016

This Time Devices File Systems Hosts and Controllers I/O Drivers File System Interface Directory Structures File System Implementation File Meta Data File Allocation CPSC 457 - Tyson Kendon 2016

Devices CPSC 457 - Tyson Kendon 2016

Devices and Hardware Host the CPU / Memory and OS, ”the computer” Controller the electronics and logic that operate the device, port or bus CPSC 457 - Tyson Kendon 2016

Communication with Devices Registers Data – In / Out Control – Status (what is the device doing) - Control (what to do) CPSC 457 - Tyson Kendon 2016

Drivers Interface Define how a type of device should behave Driver Write the software to conform the device to the interface the OS expects CPSC 457 - Tyson Kendon 2016

Device Characteristics aspect variation example Data-transfer mode Character block Terminal disk Access method Sequential random Modem DVD Transfer schedule Synchronous asynchronous Tape keyboard sharing Dedicated shareable CPSC 457 - Tyson Kendon 2016

Device Characteristics (2) Device speed Latency Seek time Transfer rate Delay between ops Electronic? - memory Physical? - disk Mechanical? – tape-robot I/O direction Read-only Write-only read-write DVD Graphics controller disk CPSC 457 - Tyson Kendon 2016

Working with Controllers Registers Keep registers available to pass data can control between host and controller Memory Mapped I/O Map information from/for the controller directly into virtual memory CPSC 457 - Tyson Kendon 2016

Controlling Controllers Polling OS Loops and waits for the device to work Interrupts Device does its work and interrupts the host Direct Memory Access Device moves a lot of memory then interrupts CPSC 457 - Tyson Kendon 2016

Device Interactions Block Character Socket Asynchronous CPSC 457 - Tyson Kendon 2016

Devices and the Kernel Scheduling Buffering Caching Spooling Error Handling CPSC 457 - Tyson Kendon 2016

File System Interface CPSC 457 - Tyson Kendon 2016

File System Interface How do we think about files? How do we organize files? How do we work with files? What to we track about files CPSC 457 - Tyson Kendon 2016

Directories Logical Construct to organize information Link the logical to the physical Tree Structures – not graphs CPSC 457 - Tyson Kendon 2016

File System Implementation CPSC 457 - Tyson Kendon 2016

File System Structure Layered – abstract to specific Applications Logical File System File Organization Module Basic File System Disk Drivers CPSC 457 - Tyson Kendon 2016

File System Data – on Disk Boot Control Block (per volume) Volume Control Block (per volume) Directory Structure (per volume) File Control Block (per file) CPSC 457 - Tyson Kendon 2016

File System Data – in Memory Mount Table Directory Cache System-Wide Open File Table Per-Process Open File Tables Read/Write Buffers CPSC 457 - Tyson Kendon 2016

Actions on Files Creating a new file Opening a file Reading, writing, seeking in, a file Closing a file CPSC 457 - Tyson Kendon 2016

Virtual File System Unify File System Types in an Abstract Whole Provide a clean interface to the OS Manage details at the low level CPSC 457 - Tyson Kendon 2016

File System Allocation CPSC 457 - Tyson Kendon 2016

Contiguous Allocation Files are laid out in a sequence of neighbouring blocks Fast Limited free space available Need to know the size of the file CPSC 457 - Tyson Kendon 2016

Linked Allocation Provide reference to the next block in each block of the file – put blocks wherever in memory Don’t need to know the size Waste space on pointers Harder to seek to the middle of a file CPSC 457 - Tyson Kendon 2016

Indexed Allocation Keep a block of indexes to the blocks of the file Easier to seek to a point in the file Possibly wasteful of space CPSC 457 - Tyson Kendon 2016

File System Considerations Space Time Failure How do we Recover Consistency Checking Transactional Systems CPSC 457 - Tyson Kendon 2016

File Systems CPSC 457 - Tyson Kendon 2016

Next Time Disks How do we organize data on secondary storage to make sense and access it quickly Review Multiprocessor Environments CPSC 457 - Tyson Kendon 2016