COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

More on File Management
Operating system services Program execution I/O operations File-system manipulation Communications Error detection Resource allocation Accounting Protection.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
File System Interface CSCI 444/544 Operating Systems Fall 2008.
File Management Systems
Files. System Calls for File System Accessing files –Open, read, write, lseek, close Creating files –Create, mknod.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (4) File Management & Input/Out Systems 10/14/2008 Yang Song (Prepared.
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Lecture 17 FS APIs and vsfs. File and File Name What is a File? Array of bytes. Ranges of bytes can be read/written. File system consists of many files,
Silberschatz, Galvin and Gagne  Operating System Concepts Common OS Components Process Management Memory Management File Management I/O System.
1 Course Outline Processes & Threads CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Networks, Protection and Security.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Computer Architecture Lecture 08 Fasih ur Rehman.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
COT 5611 Operating Systems Design Principles Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 1:00-2:00 PM.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
COP 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
File System Review bottomupcs.com J. Kubiatowicz, UC Berkeley.
1 Chap8 Distributed File Systems  Background knowledge  8.1Introduction –8.1.1 Characteristics of File systems –8.1.2 Distributed file system requirements.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
1 File Systems: Consistency Issues. 2 File Systems: Consistency Issues File systems maintains many data structures  Free list/bit vector  Directories.
UNIX Files File organization and a few primitives.
DISTRIBUTED FILE SYSTEMS Pages - all 1. Topics  Introduction  File Service Architecture  DFS: Case Studies  Case Study: Sun NFS  Case Study: The.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Files & File system. A Possible File System Layout Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
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.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 2 How Hardware and Software Work Together.
Linux File system Implementations
1 Advanced Operating Systems - Fall 2009 Lecture 2 – January 12, 2009 Dan C. Marinescu Office: HEC 439 B.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
COP 4600 Operating Systems Fall 2010 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:30-4:30 PM.
Chapter 11: File System Implementation
Input/Output 1 1.
COP 4600 Operating Systems Fall 2010
COT 5611 Operating Systems Design Principles Spring 2014
COT 5611 Operating Systems Design Principles Spring 2012
COT 4600 Operating Systems Spring 2011
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
COT 4600 Operating Systems Spring 2011
Directory Structure A collection of nodes containing information about all files Directory Files F 1 F 2 F 3 F 4 F n Both the directory structure and the.
CGS 3763 Operating Systems Concepts Spring 2013
COT 4600 Operating Systems Fall 2010
Distributed File Systems
Introduction to Operating Systems
COT 4600 Operating Systems Fall 2010
Lecture 11: Flash Memory and File System Abstraction
COT 5611 Operating Systems Design Principles Spring 2010
COT 5611 Operating Systems Design Principles Spring 2014
Introduction to Operating Systems
Presentation transcript:

COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00 – 6:00 PM

Last time: Binding and indirection Generic naming model  Name mapping algorithms  Comparing names; name discovery Practical design of naming scheme  Contexts  Name overloading Today: Computer system organization; operating systems The hardware layer  Bus sharing  Optimization, DMA The software layer – the file abstraction Case studies  UNIX File System  URLs Next time  Modularity Lecture 9 – Thursday, February 10, 2011 Lecture 92

Computer System Organization Operating Systems (OS)  software used to  Control the allocation of resources (hardware and software)  Support user applications  Sandwiched between the hardware layer and the application layer OS-bypass: the OS does not hide completely the hardware from applications. It only hides dangerous functions such as  I/O operations  Management function Names  modularization Lecture 93

Figure 2.16 from the textbook 4

The hardware layer Modules representing each of the three abstractions (memory, interpreter, communication link) are interconnected by a bus. The bus  a broadcast communication channel, each module hears every transmission.  Control lines  Data lines  Address lines Each module  is identified by a unique address  has a bus interface Modules other than processors need a controller. Lecture 95

Figure 2.17 from the textbook 6

Bus sharing and optimization Communication  broadcast Arbitration protocol  decide which module has the control of the bus. Supported by hardware:  a bus arbiter circuit  distributed among interfaces – each module has a priority  daisy chaining Split-transaction  a module uses the arbitration protocol to acquire control of the bus Optimization:  hide the latency of I/O devices Channels  dedicated processors capable to execute a channel program (IBM) DMA (Direct Memory Access)  Support transparent access to files: Memory Mapped I/O Lecture 97

Optimization Direct Memory Access (DMA):  supports direct communication between processor and memory; the processor provides the disk address of a block in memory where data is to be read into or written from.  hides the disk latency; it allows the processor to execute a process while data is transferred Memory Mapped I/O:  LOAD and STORE instructions access the registers and buffers of an I/O module bus addresses are assigned to control registers and buffers of the I/O module the processor maps bus addresses to its own address space (registers)  Supports software functions such as UNIX mmap which map an entire file. Swap area: disk image of the virtual memory of a process. Lecture 98

DMA Transfer 9 Lecture 99

B. The software layer: the file abstraction File: memory abstraction used by the application and OS layers  linear array of bits/bytes  properties: durable  information will not be changed in time has a name  allows access to individual bits/bytes  has a cursor which defines the current position in the file. The OS provides an API (Application Programming Interface) supporting a range of file manipulation operations. A user must first OPEN a file before accessing it and CLOSE it after it has finished with it. This strategy:  allows different access rights (READ, WRITE, READ-WRITE)  coordinate concurrent access to the file Some file systems  use OPEN and CLOSE to enforce before-or-after atomicity  support all-or-nothing atomicity  e.g., ensure that if the system crashes before a CLOSE either all or none of WRITEs are carried out Lecture 910

Open and Read operations 11 Lecture 911

Unix and Unix File System Developed in early 1970s at Bell Labs for PDP computers made by Digital Lineage  MULTICS developed at MIT in 1960s Versions:  Berkeley Unix (BSD)  GNU/Linux  Darwin – part of MAC OS Unix file system – hierarchical data organization: blocks  files  directories  file systems  the objects: files – linear arrays of blocks of data; each file has a cursor giving the current position directories – collections of files; tree structure metadata - useful information about the file, not contained in the file (e.g., owner, access modes, last modified date, length, etc.)  supports: creation, deletion, renaming of files and directories reading data from and writing data to a file reading and writing metadata describing a file Lecture 912

API for the Unix File System OPEN(name, flags, model)  connect to a file Open an existing file called name, or Create a new file with permissions set to mode if flags is set. Set the file pointer (cursor) to 0. Return the file descriptor (fd). CLOSE(fd)  disconnect from a file Delete file descriptor fd. READ(fd, buf,n)  read from file Read n bytes from file fd into buf; start at the current cursor position and update the file cursor (cursor = cursor + n). WRITE(fd, buf,n)  write to file Write n bytes to the file fd from buf; start at the current cursor position and update the file cursor (cursor = cursor + n). SEEK(fd, offset,whence)  move cursor of file Set the cursor position of file fd to offset from the position specified by whence (beginning, end, current position) Lecture 913

API for the Unix File System (cont’d) FSYNC(fd)  make all changes to file fd durable. STAT(name)  read metadata CHMOD, CHOWN  change access mode/ownership RENAME(from_name,to_name)  change file name LINK(name, link_name)  create a hard link UNLINK(name)  remove name from directory SYMLINK(name, link_name)  create a symbolic link MKDIR(name)  create directory name RMDIR(name)  delete directory name CHDIR(name)  change current directory to name CHROOT  Change the default root directory name MOUNT(name,device)  mount the file system name onto device UNMOUNT(name)  unmount file system name Lecture 914