Operating System Architecture

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Advertisements

Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
Chapter 10: File-System Interface
Chapter 11 File Systems and Directories Nell Dale John Lewis.
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.
1 File Management (a). 2 File-System Interface  File Concept  Access Methods  Directory Structure  File System Mounting  File Sharing  Protection.
11/13/01CS-550 Presentation - Overview of Microsoft disk operating system. 1 An Overview of Microsoft Disk Operating System.
File Management Systems
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (4) File Management & Input/Out Systems 10/14/2008 Yang Song (Prepared.
11/7/06 1 Hofstra University - CSC005 Chapter 11 File Systems and Directories.
Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
Chapter 11 Operating Systems
Chapter 12 File Management Systems
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Part two. 3.2 operating system architecture  Software have two categories  Application software  System software  Application software: consists of.
Operating system Part two Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Chapter 11 File Systems and Directories Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and.
Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
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.
Dr Damitha Karunaratna University of Colombo school of computing
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Most modern operating systems incorporate these five components.
Chapter 11 File Systems and Directories. 2 File Systems File: A named collection of related data. File system: The logical view that an operating system.
Describe the purpose of files, file systems, and directories Distinguish between text and binary files Identify various file types by their extensions.
Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
Lecture 8: 9/19/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
1 Sec (3.2) Operating System Architecture OS. 2 Software dividing into two categories: 1. Application software 2. System Software  Operating System 
CPS120: Introduction to Computer Science File Systems and Directories Nell Dale John Lewis.
Chapter 11 File Systems and Directories. 2 File Systems (Chapter 11.1) File: 1. A named collection of related data. 2.smallest amount of information that.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
CT101: Computing Systems Introduction to Operating Systems.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Introduction to Operating Systems Concepts
Memory Management.
Chapter Objectives In this chapter, you will learn:
Chapter 11: File System Implementation
Chapter 12 File Management
Chapter 2: System Structures
I/O Resource Management: Software
Operating System Structure
Operating System I/O System Monday, August 11, 2008.
KERNEL ARCHITECTURE.
Lecture 45 Syed Mansoor Sarwar
Shell & Kernel Concepts in Operating System
Operating System Architecture OS
File Systems and Directories
Chapter 2: System Structures
Computer-System Architecture
So far… Text RO …. printf() RW link printf Linking, loading
Main Memory Background Swapping Contiguous Allocation Paging
Overview Continuation from Monday (File system implementation)
OS Architecture.
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Lecture 3: Main Memory.
Secondary Storage Management Brian Bershad
Week 1: File Systems and Directories
Chapter 8: Memory Management strategies
CS149D Elements of Computer Science
Chapter 3: Operating Systems Computer Science: An Overview
Secondary Storage Management Hank Levy
Software - Operating Systems
Department of Computer Science
Page Main Memory.
Presentation transcript:

Operating System Architecture Lecture 7

Software hierarchy

Operating System components User interface Older systems: shell – text based Newer systems: GUI, e.g. Window system Kernel File manager - groups files into directories collection of device drivers - programs that let the OS communicate with the computer hardware (E.g. Graphic card, Sound card, Computer printer) Memory manager - coordinates the machine’s use of main memory. Scheduler and dispatcher scheduler determines which activities are to be considered for execution, and the dispatcher controls the allocation of time to these activities.

Kernel A kernel is the central part of an OS. It manages the tasks of the computer and the hardware A computer user never interacts directly with the kernel. It runs behind the scenes and cannot be seen, except for the text logs that it prints.

Kernel types Two types of kernels: Microkernel, which only contains basic functionality; (e.g. MINIX) Monolithic kernel, which contains many drivers. (e.g. Windows, MacOS, Linux and etc) Hybrid

Issues with kernels Reliability – for expl: micro kernels are more reliable since services run separate address space Performance – for expl: since services run sharing the same address space making communication between them easy monolithic kernels are more performant Portability- can be ported from one machine to another Layered and extensibility(can be extended easily)

Kernel: File manager maintains records of all the files stored in mass storage File location which users are allowed to access the various files, which portions of mass storage are available for new files or extensions to existing files. directory or folder directory path - A chain of directories within directories WIUT/Semester2/FIT

Kernel: Device drivers Device drivers communicate with the controllers (or directly with peripheral devices) to carry out operations on the peripheral devices attached to the machine. Each device driver is uniquely designed for its particular type of device (such as a printer, disk drive, or monitor) and translates generic requests into the more technical steps required by the device assigned to that driver.

Kernel: Memory manager In multiuser or multitasking environments many programs and blocks of data must reside in main memory concurrently. Memory manager must find and assign memory space for these needs and ensure that the actions of each program are restricted to the program’s allotted space. Moreover, as the needs of different activities come and go, the memory manager must keep track of those memory areas no longer occupied.

Issues with memory management Single Contiguous Memory Management entire application program is loaded into one large chunk of memory. Partition Memory Management fixed partitions- main memory is divided into a particular number of partitions. dynamic partitions- the partitions are created to fit the need of the programs. Paged Memory Management main memory is divided into small fixed-size blocks of storage called frames. A process is divided into pages

Kernel: scheduler and dispatcher scheduler - determines which activities are to be considered for execution, dispatcher - controls the allocation of time to these activities.

Coordinating the Machine’s Activities Process - The activity of executing a program under the control of the OS Process state - current status of the activity, OS manages these processes so that each process has the resources (peripheral devices, space in main memory, access to files, and access to a CPU) that it needs, that independent processes do not interfere with one another, and that processes that need to exchange information are able to do so.

Interrupts Each time the dispatcher awards a time slice to a process, it initiates a timer circuit that will indicate the end of the slice by generating a signal called an interrupt When the CPU receives an interrupt signal, it completes its current machine cycle, saves its position in the current process and begins executing a program, called an interrupt handler, which is stored at a predetermined location in main memory. This interrupt handler is a part of the dispatcher, and it describes how the dispatcher should respond to the interrupt signal.

Thus, the effect of the interrupt signal is to preempt the current process and transfer control back to the dispatcher.

File Systems File - a named collection of data, used for organizing secondary memory File system - the operating system’s logical view of the files it manages Directory - a named group of files File type - the specific kind of information contained in a file, such as a Java program or a Microsoft Word document File extension - Part of a file name that indicates the file type

File Systems You can name a file anything you want (as long as you use the characters that the operating system allows for file names). You could give any file a .gif extension, for instance, but that doesn’t make it a GIF image file. Changing the extension does not change the data in the file or its internal format. If you attempt to open a misnamed file in a program that expects a particular format, you get errors.

File operations Create a file. Delete a file. Open a file. Close a file. Read data from a file. Write data to a file. Reposition the current file pointer in a file. Append data to the end of a file. Truncate a file (delete its contents). Rename a file. Copy a file.

File Access Sequential file access - the technique in which data in a file is accessed in a linear fashion Direct file access - the technique in which data in a file is accessed directly, by specifying logical record numbers

File Protection In multiuser systems, file protection is of primary importance. That is, we don’t want one user to be able to access another user’s files unless the access is specifically allowed. It is the operating system’s responsibility to ensure valid file access. Different operating systems administer their file protection in different ways.

Directories A directory, in most operating systems, is represented as a file. The directory file contains data about the other files in the directory. For any given file, the directory contains the file name, the file type, the address on disk where the file is stored, and the current size of the file. The directory also contains information about the protections set up for the file. It may also contain information about when the file was created and when it was last modified.

Directories: path names Path - a text designation of the location of a file or subdirectory in a file system Absolute path - path that begins at the root and includes all successive subdirectories Relative path - path that begins at the current working directory Linux/Unix Windows /etc/samba.smb.conf /boot/grub/grub.conf C:\Program Files\Microsoft Office\Office12\VISSHE.DLL D:\MyFolder\FIT\Lecture7.pptx Linux/Unix Windows ../samba.smb.conf ../grub.conf ..\Office12\VISSHE.DLL ..\FIT\Lecture7.pptx

Windows directory tree

Unix directory tree

Disk Scheduling Disk scheduling - technique that the operating system uses to determine which requests to satisfy first is called Seek time is the time it takes for the heads to reach the appropriate cylinder. Latency is the additional time it takes the platter to rotate into the proper position so that the information can be read or written. Seek time is the more restrictive of these two, and therefore is the primary issue dealt with by the disk-scheduling algorithms.

Disk Scheduling

Disk-scheduling algorithms First-Come, First-Served Disk Scheduling (FCFS) one of the easiest to implement, though not usually the most efficient. we process the requests in the order they arrive, without regard to the current position of the heads. Shortest-Seek-Time-First Disk Scheduling (SSTF) moves the heads the minimum amount it can to satisfy any pending request. Starvation could be the issue - it is possible for some requests never to be serviced because requests closer to the read/write heads keep being issued. SCAN Disk Scheduling the read/write heads move in toward the spindle, then out toward the platter edge, then back toward the spindle, and so forth. Employs the same strategy as an elevator, sweeping from one end of the disk to the other.

Bibliography Dale, Computer Science Illuminated, Chapter 10, 11, end of the book exercises J. Brookshear, An Overview of Computer Science 11th ed (intro txt) - (Pearson, 2012) BBS Randy Wang, Operating Systems, System Calls, and Buffered I/O