1 Course Outline Processes & Threads CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Networks, Protection and Security.

Slides:



Advertisements
Similar presentations
Chapter 12: File System Implementation
Advertisements

More on File Management
Chapter 12 File Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
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.
Chapter 10: File-System Interface
File Management. Persistent storage Shared device Why Programmers Need Files HTML Editor HTML Editor … … Web Browser Web Browser Structured information.
File Management Chapter 12. File Management A file is a named entity used to save results from a program or provide data to a program. Access control.
Chapter 10: File-System Interface
File System Interface CSCI 444/544 Operating Systems Fall 2008.
Long-term Information Storage
Dr. Kalpakis CMSC 421, Operating Systems. Fall File-System Interface.
1 File Management (a). 2 File-System Interface  File Concept  Access Methods  Directory Structure  File System Mounting  File Sharing  Protection.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
04/05/2010CSCI 315 Operating Systems Design1 Virtual Memory Wrap-up; File System Interface.
File Systems. 2 Storing Information Applications can store it in the process address space Why is it a bad idea? –Size is limited to size of virtual address.
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.
1 File Management in Representative Operating Systems.
1 File Management Chapter File Management File management system consists of system utility programs that run as privileged applications Input to.
10.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 10: File-System Objectives To discuss file-system design tradeoffs, including.
1 Friday, July 07, 2006 “Vision without action is a daydream, Action without a vision is a nightmare.” - Japanese Proverb.
Chapter 12 File Management Systems
File Management Chapter 12.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Chapter 10 File System Interface
File Systems (1). Readings r Silbershatz et al: 10.1,10.2,
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
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.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 10-1: File Systems Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Chapter pages1 File Management Chapter 12.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Silberschatz, Galvin and Gagne  Operating System Concepts File Concept Contiguous logical address space Smallest user allocation Non-volatile.
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
File System Interface. File Concept Access Methods Directory Structure File-System Mounting File Sharing (skip)‏ File Protection.
Page 110/19/2015 CSE 30341: Operating Systems Principles Chapter 10: File-System Interface  Objectives:  To explain the function of file systems  To.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
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 Management Chapter File Management n File management system consists of system utility programs that run as privileged applications n Concerned.
Module 4.0: File Systems File is a contiguous logical address space.
Disk & File System Management Disk Allocation Free Space Management Directory Structure Naming Disk Scheduling Protection CSE 331 Operating Systems Design.
CE Operating Systems Lecture 17 File systems – interface and implementation.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 10: File-System Interface File Concept.
Slide 13-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter File Management.
File Systems. 2 What is a file? A repository for data Is long lasting (until explicitly deleted).
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10 & 11: File-System Interface and Implementation.
It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Operating Systems 1 K. Salah Module 4.0: File Systems  File is a contiguous logical address space (of related records)  Access Methods  Directory Structure.
File Systems - Part I CS Introduction to Operating Systems.
File Management Chapter File Management File management system consists of system utility programs that run as privileged applications Input to.
1 Lecture 15: File System Interface  file system interface reasons for delegating storage management to OS file definition and operations on a file file.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems File System Interface.
W4118 Operating Systems Instructor: Junfeng Yang.
COMP 3500 Introduction to Operating Systems Directory Structures Block Management Dr. Xiao Qin Auburn University
Chapter 11: File System Implementation
FileSystems.
COMP 3500 Introduction to Operating Systems File Management
Chapter 11: File-System Interface
EECE.4810/EECE.5730 Operating Systems
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Chapter 10: File-System Interface
Department of Computer Science
Lecture 4: File-System Interface
Introduction to Operating Systems
Presentation transcript:

1 Course Outline Processes & Threads CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Networks, Protection and Security

2 Files: OS Abstraction Files: another OS-provided abstraction over hardware resources OS AbstractionHardware Resource Processes Threads CPU Address spaceMemory FilesDisk

3 File System Abstraction Device-independent interface open(), close(), link(), read(), write(), rename() Device-level interface Manage disk in terms of sectors, tracks, & blocks seek(), readblock(), writeblock() OS converts these to operations on raw hardware (disk)

4 User Expectations on Data Persistence Data lives across jobs, power outages, crashes Speed Quick access to data Size Ability to store lots of data Sharing/protection Users can share or restrict access to data when appropriate Ease of use User can easily find, examine & modify data

5 Hardware/OS Support for Data Persistence: disks: non-volatile memory Speed: random/quick access devices Size: disk capacity growing fast Persistence: redundancy & fault-tolerance Sharing/protection: UNIX privileges Ease of use: Names associated with data (files) Hierarchical directories Transparent mapping of devices hardware operating system

6 Files Named collection of related information recorded on secondary storage Logical unit of storage on a device Can contain programs (source, binary) or data e.g., helloworld.cpp, resume.doc Can be structured or unstructured IBM mainframe OS: series of records (structured) UNIX: file = stream of bytes (unstructured) Files have attributes: name, type, location, size, protection, creation time...

7 User Interface to File System Data operations: create(), delete() open(), close() read(), write(), seek() Naming operations: get & set attributes (ownership, protection) hard link, soft links, rename

8 OS File-Related Data Structures Open file table – shared by all processes with open file open count file attributes (ownership, protection, etc.) location(s) of file on disk pointers to location(s) of file in memory Per-process file table – one for each file Pointer to entry in open file table Current position in file (offset) Mode in which process accesses file (r, w, r/w...) Pointers to file buffer

9 File Operations: Opening Files fd = open(name, mode) Check if file is already open by another process If not: Find file Copy file descriptor into system-wide open file table Check protection of file against requested mode If not OK, abort Increment open count Create entry in process’s file table pointing to entry in system-wide table Initialize current file pointer to start of file

10 File Operations: Closing Files close (fd) Remove entry for file in process’s file table Decrement open count in system-wide file table If open count == 0: Remove entry from system-wide file table

11 File Operations: Reading File Random access: read(fd, from, size, buf) OS reads “size” bytes from file position “from” into “buf” for (i = from; i < from + size; i++) buf[i – from] = file[i]; Sequential access: read(fd, size, buf) OS reads “size” bytes from current file position “from” into “buf”; increments file position for (i = 0; i < size; i++) buf[i] = file[fp + i]; fp += size;

12 Other File Operations write Similar to read, but copies from buffer to file seek Just updates fp memory mapping file map portion of virtual address space to file read/writes to that memory = OS reads/writes from corresponding location in file avoids need for explicit reads/writes

13 File Access Methods Common file access patterns from programmer’s perspective Sequential: data processed in order Most programs use this method Example: compiler reading source file Keyed: address block based on key table Example: database search, hash table, dictionary Common file access patterns from OS perspective Sequential: pointer to next byte; update on read/write Random: address any block directly given offset in file

14 Naming & Directories Need method of retrieving files from disk! OS uses numbers (inodes) for files People prefer names... OS provides directory to map names to file descriptors

15 Structure of Directories One level directory One namespace for entire disk, every name unique Directory contains (name, index) pairs Used by Apple, CP/M, DOS 1.0, first MacOS Two level directories Separate directories for each user Tree-structured directories Used by all modern operating systems Allows user to create their own subdirectories

16 Directory Operations Search for file: locate entry Create file: adds directory listing Delete file: removes directory listing List directory: list all files (ls) Traverse file system

17 Referential Naming Hard links (UNIX: ln command) Allows multiple links to single file Example: “ln A B”: initially: A -> file # 100 after: A, B -> file # 100 OS maintains reference counts Deletes file only after last link to it is deleted

18 Referential Naming Soft (symbolic) links (UNIX: ln -s) Makes symbolic pointer from one file to another “ln -s A B”: Initially, A -> file #100 After, A -> file #100, B -> A Removing B does not affect A Removing A: dangling pointer Problem: Circular links can cause infinite loops E.g., list all files in directory & its subdirectories

19 Protection OS must allow users to control access to files Grant or deny access to file operations depending on protection information Access lists and groups (Windows) Access list for each file with user name and access type Lists can become large & tedious to maintain Access control bits (UNIX) Three categories of user (owner, group, world) Three types of access privileges (read, write, execute) One bit per operation ( = rwxr-x----)

20 Summary File systems provide Naming Protection Persistence Fast access Next time: file system implementation