May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 1 Still More Multiprogramming Issues File Systems ECEN5043 Software Engineering.

Slides:



Advertisements
Similar presentations
More on File Management
Advertisements

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 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 11: File System Implementation
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
File System Implementation
File System Implementation
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
File Systems Topics –File –Directory –File System Implementation Reference: Chapter 5: File Systems Operating Systems Design and Implementation (Second.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
1 Operating Systems Chapter 7-File-System File Concept Access Methods Directory Structure Protection File-System Structure Allocation Methods Free-Space.
Memory Management 2010.
Memory Management, File Systems, I/O How Multiprogramming Issues Mesh ECEN 5043 Software Engineering of Multiprogram Systems University of Colorado, Boulder.
1 File Management Chapter File Management File management system consists of system utility programs that run as privileged applications Input to.
1 Friday, July 07, 2006 “Vision without action is a daydream, Action without a vision is a nightmare.” - Japanese Proverb.
Common System Components
Computer Organization and Architecture
Chapter 12 File Management Systems
File System Implementation
PRASHANTHI NARAYAN NETTEM.
04/07/2010CSCI 315 Operating Systems Design1 File System Implementation.
File Management Chapter 12.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
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.
Networked File System CS Introduction to Operating Systems.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
CS 346 – Chapter 12 File systems –Structure –Information to maintain –How to access a file –Directory implementation –Disk allocation methods  efficient.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
DCE (distributed computing environment) DCE (distributed computing environment)
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
Page 110/19/2015 CSE 30341: Operating Systems Principles Chapter 10: File-System Interface  Objectives:  To explain the function of file systems  To.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
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.
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
File System Implementation
Module 4.0: File Systems File is a contiguous logical address space.
Some basic concepts and information on file systems Portions taken and modified from books by ANDREW S. TANENBAUM.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 11-2: File System Implementation Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
12.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 12: File System Implementation Chapter 12: File System Implementation.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 11: File System Implementation Chapter.
CS450/550 FileSystems.1 Adapted from MOS2E UC. Colorado Springs CS450/550 Operating Systems Lecture 6 File Systems Palden Lama Department of Computer.
CS 346 – Chapter 11 File system –Files –Access –Directories –Mounting –Sharing –Protection.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
Why Do We Need Files? Must store large amounts of data. Information stored must survive the termination of the process using it - that is, be persistent.
I MPLEMENTING FILES. Contiguous Allocation:  The simplest allocation scheme is to store each file as a contiguous run of disk blocks (a 50-KB file would.
Lecture 10 Page 1 CS 111 Summer 2013 File Systems Control Structures A file is a named collection of information Primary roles of file system: – To store.
File Systems cs550 Operating Systems David Monismith.
Chapter 6 File Systems. Essential requirements 1. Store very large amount of information 2. Must survive the termination of processes persistent 3. Concurrent.
Operating Systems 1 K. Salah Module 4.0: File Systems  File is a contiguous logical address space (of related records)  Access Methods  Directory Structure.
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
W4118 Operating Systems Instructor: Junfeng Yang.
File-System Management
Chapter 11: File System Implementation
Chapter 2: System Structures
File System Implementation
File Systems Kanwar Gill July 7, 2015.
Overview: File system implementation (cont)
Chapter 2: Operating-System Structures
Operating Systems Lecture 1.
CSE 542: Operating Systems
Chapter 2: Operating-System Structures
Presentation transcript:

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 1 Still More Multiprogramming Issues File Systems ECEN5043 Software Engineering of Multiprogram Systems University of Colorado

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 2 Overview File Systems Multimedia-type Complications (multimedia in the sense of > 1 continuous media) Not your father’s text file format Process scheduler demands Extremely high data rates Smooth real-time play High storage needs -- (de)compression & amount

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 3 Files -- Why we need them Running process can store/retrieve limited info within its own (virtual) address space When the process terminates, the info is lost When a computer crash kills a process, the info goes Multiple programs/processes need to share info “simultaneously” Shared data must persist away

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 4 In other words, files: store a very large amount of information allow data to survive the program’s termination allow concurrent access by multiple programs

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 5 Analogy Client – server relationship is the concurrent programming analog of the relationship between the subroutine caller and the subroutine itself. Server is typically accessing a file Each client request is an independent unit Multiple requests may be handled concurrently

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 6 Client/server kinds of interactions occur within operating systems object-oriented systems networks databases etc. Common example: There is a file server module that provides operations on a file. When a client process wants to access the file, it calls the operation in the appropriate file server module

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 7 Shared-memory system File server typically implemented by a collection of subroutines and data structures that represent files (file descriptors) Interaction between a client process and a file would typically be implemented by subroutine calls. IF file is shared, important that it be written to by at most one client process at a time Shared file can safely be read concurrently

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 8 Same machine or not Clients are processes whether on same machine as server or not Shared-memory: server is implemented by collection of subroutines Subroutines programmed using mutual exclusion and condition synchronization to protect critical sections and ensure execution in appropriate orders On distributed-memory environment, server is implemented by one or more processes, often a multithreaded program, one thread per client.

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 9 Communication Semaphores or monitors Message passing, remote procedure calls, rendezvous

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 10 Operating system concerns How the files are: Structured Named Accessed Used Protected Implemented May memory-map file (by pages) -- system’s tables make the disk file the backing store for a designated memory region.

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 11 Additional file concerns Robustness inspection checklist Verify appropriate usage of Create / Open / Rename Seek / read Write / Append Close / Delete Get / Set attributes

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 12 What are concerns for multi-program systems? (reference previous two slides) What information would be important to have in a requirements spec or a design spec for a program that will be part of a multi-program system?

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 13 Multiprogramming directory surprises If execution environment is simple with simple directory, care must be taken to ensure unique file names, especially when user- selected If process changes its working directory to simplify file pathname references... what? Lots of variability in system call behavior for managing directories -- if called from within programs in a multi-program system... what?

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 14 (Blurred) Sepa- ration of concerns Users (programmers) How files are named What operations are allowed What the directory tree looks like Other interface issues Implementers (of o.s.) How files and directories are stored How disk space is managed Efficiency and reliability

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 15 Programmed Aspirin – reduces inflammation from irritation When writing software to be portable to different kinds of operating environments, how can you minimize the pain associated with differences in files, directories, etc.? Similarly, multiprogram access to shared files? If using language support for safety in accessing shared files, what is good practice?

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 16 Follow the yellow brick road... In a simple environment (no or little o.s.) Contiguous storage allocation is simple need address of the first block and the number of blocks in the file book presumes disk -- might be an in-memory “file”, might be executable in ROM in embedded system, etc. fragmentation issue -- compaction not realistic option on the fly great for CD-ROMs, DVDs, other write-once media Linked list allocation is ok with File Allocation Table for small files -- not as simple Remember text has details re index-nodes method

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 17 Shared (linked) files A multiprogram system design may consider “shared files” A shared file appears simultaneously in different directories belonging to different “users” Must solve If X appends to the file, new blocks must be visible to Y With links, files have >1 path name -- same file is found via various path “walks”

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 18 Fundamental principle of disk space management re block size What can you conclude about performance and space utilization?

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 19 Can you apply that to other performance vs. management issues?

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 20 Why worse for multiprogram systems? File system reliability -- storage reliability backups & restores -- will a restored file be where all programs expect to find it? techniques that minimize backup time tend to make recovery more complicated file system consistency -- what the text says is “elementary” compared to sophisticated storage management systems

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 21 Cache flow tag index byte# tags Example of 2-way associative cache main memory 16

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues Cache flow tags Example of 2-way associative cache main memory 16 6A250 1K

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 23 Impacts If two programs are accessing the same data in memory, what impact will the presence of a cache have? What if you have a late enhancement to create a report which includes the execution over a large trio of arrays: SumArray[ i ] = ArrayOne[ i ] + ArrayTwo[ i ] Would you be better off with three files?

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 24 Layers of complexity Typically in microprocessor world on-chip cache off-chip cache main memory secondary memory (disk) Both caches might work exactly the same -- check the caches sequentially. Main memory, however, may be managed with a paging algorithm...

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 25 On the one hand... If any essential byte in the cache is modified, it is written to disk immediately If any data byte in the cache is modified, it should be written almost as quickly UNIX -- soon (every 30 seconds) MS-DOS -- immediately Discuss the impact on performance. What are other issues to consider?

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 26 If caches are like little pages... What would be an equivalent to the Transition Lookaside Buffer for a cache? Block read ahead Assume file is sequential Reset the sequential bit if a “seek” is performed These are techniques that could help performance improvement if needed in a more primitive environment that did not already support this

May 13, 2002 ECEN5043 University of Colorado, Still more multiprogramming issues 27 CP/M ran well in 16 KB of RAM... Our purpose is generally not to understand how to write operating systems for large environments But rather, to understand issues addressed by operating systems as examples of multiprogram systems how solutions lead to new issues the simpler solutions in case they are needed in simpler environments without an adequate o.s. CP/M -- a rich source of simple solutions