CSC 453 Operating Systems

Similar documents
Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Chapter 3: Operating-System Structures

Module 3: Operating-System Structures. Common System Components

Module 3: Operating-System Structures

Operating-System Structures

UNIT 2. OPERATING SYSTEM STRUCTURES

Operating-System Structures

Chapter 3: Operating-System Structures

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Chapter 2: Operating-System Structures. Operating System Concepts 8 th Edition

Unit 2 : Computer and Operating System Structure

Chapter 3: Operating-System Structures

OPERATING SYSTEMS UNIT - 1

Operating System Review

Chapter 2 Operating-System Structures

Operating System Services

ELEC 377 Operating Systems. Week 1 Class 2

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals


Operating Systems. Antônio Augusto Fröhlich LISHA/UFSC. December 20, 2008

Chapter 1: Introduction

Introduction to Computer Systems and Operating Systems

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Operating Systems. studykorner.org

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

CS370 Operating Systems

Chapter 1: Introduction

OPERATING SYSTEM. Functions of Operating System:

Operating- System Structures

Lecture 1 Introduction (Chapter 1 of Textbook)

Chapter 2. Operating-System Structures

To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Chapter 1: Introduction. Chapter 1: Introduction

Introduction to Operating System

OPERATING SYSTEM OVERVIEW

CS370 Operating Systems

Introduction to Operating Systems (Part II)

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

Computer System Architecture. CMPT 300 Operating Systems I. Summer Segment 3: Computer System Architecture. Melissa O Neill

Operating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System

Operating System Overview. Operating System

Module 1. Introduction:

Chapter 1: Introduction

CS420: Operating Systems

OS structure. Process management. Major OS components. CSE 451: Operating Systems Spring Module 3 Operating System Components and Structure

Operating Systems. Lecture Course in Autumn Term 2015 University of Birmingham. Eike Ritter. September 22, 2015

Introduction. CS3026 Operating Systems Lecture 01

Process Description and Control. Chapter 3

7/20/2008. What Operating Systems Do Computer-System Organization

Course Details. Operating Systems with C/C++ Course Details. What is an Operating System?

Four Components of a Computer System

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

Process Description and Control. Major Requirements of an Operating System

Major Requirements of an Operating System Process Description and Control

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

Contents. Today's Topic: Introduction to Operating Systems

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009

Process Description and Control. Chapter 3

OS concepts and structure. q OS components & interconnects q Structuring OSs q Next time: Processes

Multiprogramming. Evolution of OS. Today. Comp 104: Operating Systems Concepts 28/01/2013. Processes Management Scheduling & Resource Allocation

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

Chapter 2: Operating-System Structures. Operating System Concepts Essentials 8 th Edition

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Chapter 2: Operating-System Structures

Operating Systems Overview. Chapter 2

CS370 Operating Systems

Chapter 2: Operating-System

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

Table of Contents 1. OPERATING SYSTEM OVERVIEW OPERATING SYSTEM TYPES OPERATING SYSTEM SERVICES Definition...

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

What Operating Systems Do An operating system is a program hardware that manages the computer provides a basis for application programs acts as an int

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

Major Requirements of an OS

Chapter 1: Introduction

Some popular Operating Systems include Linux, Unix, Windows, MS-DOS, Android, etc.

CS420: Operating Systems

Announcement. Exercise #2 will be out today. Due date is next Monday

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Process Description and Control

Computer System Overview

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

Andrew S. Tanenbaum, Operating Systems, Design and Implementation, (Second Edition), Prentice Hall.

Often, more information is required when designing system call Information varies according to OS and types of system call

Operating Systems CS3502 Spring 2018

CS30002: Operating Systems. Arobinda Gupta Spring 2017

EEE 435 Principles of Operating Systems

What are some common categories of system calls? What are common ways of structuring an OS? What are the principles behind OS design and

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Operating System - Overview

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

OS - Introduction Ezio Bartocci Institute for Computer Engineering

System Call. Preview. System Call. System Call. System Call 9/7/2018

Topics: Early systems and OS overview Skim Chapters 1-2 of SGG Read Chapter 1 of USP CS 3733 Operating Systems

Lecture 2 - Fundamental Concepts

Kernel Types Simple OS Examples System Calls. Operating Systems. Autumn CS4023

Transcription:

CSC 453 Operating Systems Lecture 3: Operating-System Structures Operating System Components Operating systems are large and complex - the only way to manage such a project is to divide it into smaller subsystems. Operating systems have to provide: - Process management - Disk Management - Memory management - Networking - File Management - Protection - I/O Management - User Interface Not all operating systems have the same structure.

Process Management A process is a program in execution. Examples include: Batch jobs Time-shared user programs System tasks (such as printer spoolers) If two users are each running the same program, that is two separate processes. Processes need resources (such as CPU time, memory, I/O devices) in order to run. Process Management Activities The operating system is responsible for: creating and deleting user and system processes suspending and resuming processes mechanisms for process synchronization mechanisms for process communication mechanisms for handling deadlocks

Memory Management All processes need memory to store the instructions that comprise the program as well as its data. To execute a program, the computer must be able to translate its addresses into absolute addresses. When a process terminates, its memory must be freed and reallocated. We assume that multiple processes will be in memory concurrently. Memory Management Activities The operating system is responsible for: keeping track of the parts of memory in use and by which process deciding which process will be loaded into memory as it becomes available allocating and freeing memory as necessary

File Management Files are a logical organization of data. A file can be defined as a collection of related data defined by its creator. The operating system maps files onto the various input/output and secondary storage devices that the computer system uses. File Management Activities The operating system is responsible for: creating and deleting files and directories supporting primitives for manipulating files and directories mapping files onto I/O and storage devices backing up files onto non-volatile storage devices.

I/O System Management The operating system protects the user from having to deal with the idiosyncrasies of the computer s various I/O devices. The I/O subsystem includes: memory management for buffers cache and spoolers. A general device driver interface Device-specific drivers Secondary Storage Management Secondary storage is needed to hold all the computer s software and data because it can t all fit in memory at the same time computer memory is volatile. The operating system is responsible for: free-space management storage allocation disk scheduling

Networking A distributed system has a collection of processors that do not share memory, peripheral devices or a clock. These processors need to communicate to be able to coordinate their work. Network access, facilitated by the operating system, allows the sharing of various resources. Protection System A multi-user, multitasking system must protect its processes resources from the activities of other processes. These resources include: memory files I/O devices Protection means providing a control mechanism for the resources of a computer system

Command-Interpreter The command interpreter is the most visible part of the operating system. Commands have traditionally been given control card or command line. More recently, command-line interpreters have been replaced and supplemented by graphical-user interfaces. Services of the Operating System The operating system provides a range of services for programs and their users, including program execution I/O operations file-system manipulation communications error detection

Administrative Functions of the Operating System There are also services that exist for the benefit of system administration and not for user programs: resource allocation accounting protection System Calls Systems calls are the way in which processes request services from the operating system. These are generally written in assembly language. Systems calls can also be written in some higher-level languages, such C, BLISS, BCPL, and PERL. Input/output statements in higher-level languages are compiled into procedures that make extensive use of system calls.

Process Control System Calls An operating system will include system calls for creating and terminating processes loading and executing processes ending and aborting processing getting and setting process attributes sending a signal or waiting for a signal UNIX Program Execution kernel process A process B tcsh process C process D

MS-DOS Program Execution Kernel Command Processor Kernel Command Processor Process Free Memory Free Memory At Startup Running A Program MS-DOS System With TSR Kernel Command Processor Process Free Memory TSR

File Manipulation System Calls An operating system will include system calls for: opening and closing files read and writing files repositioning the file pointer getting and setting file attributes creating and deleting files Device Management System Calls An operating system will include system calls for: requesting and releasing devices reading, writing and repositioning the device These system calls will be analogous to those for files

Information Maintenance System Calls Information maintenance calls include information such as: date and time number of current users current operating system version number amount of free disk space Communications There are two common models for communications: message-passing model shared memory model

Message-Passing Model kernel process A M kernel process A M process B process B Shared Memory Model kernel process A shared memory process B

Communications System Calls An operating system will include system calls for: creating and deleting communication channels sending and receiving messages transferring status information attaching and detaching remote devices System Programs Systems programs do some of the systemsrelated work for users and serve as an additional interface layer between the user and the hardware.

What Do System Programs Do? System programs: perform file manipulation provide status information perform file modification support programming languages load and execute programs perform communications System Structure Given the complexity of an operating system, a structured approach is badly needed. There are five different ways in which the internal structure of an operating system may be structured: Simple Structure Monolithic Structure Layered Structure Virtual Machines Client-Server Model

Simple Structure Application Program Resident System Program MS-DOS Device Drivers ROM BIOS device drivers Limited Structure users shells compilers & interpreters systems libraries signals terminal handling character I/O terminal drivers system-call interface to kernel file system swapping block I/O disk & tape drivers kernel interface to kernel CPU scheduling page replacement demand paging virtual memory terminal controllers terminals device controllers disks and tapes memory controllers physical memory

What Are Monolithic Systems? Monolithic systems could be called the big mess, because there is no real structure to the operating system s kernel. Each procedure has its own parameters and results, but any procedure can call any other procedure. Such systems may actually have some structure, provided by having the operating system place parameter is welldefined areas such as registers or the stack, and then executing a supervisor call or kernel call. Monolithic Systems and Systems Calls User Program 1 1 kerrnel call User Program 2 Dispatch Table 3 4 Service procedure 2

Structure In Monolithic Systems Main procedure Service procedure Utility procedures Layered Structure - THE Layer 5 4 3 2 1 0 Function The operator User programs Input/output management Operator - process communication Memory and drum management Processor allocation and multiprogramming

Virtual Machine Virtual 370s CMS I/O instructions here Trap here CMS VM/370 CMS System calls here Trap here 370 Bare Hardware Operating System Structure: Client- Server Model User mode Kernel mode Client Client Process Server Term. Server kernel... File Server Client process obtains service by sending request to server process Mem. Server

System Design Parameters Design will depend very much on hardware and type of system desire: multi-user vs. single user batch vs. interactive distributive vs. standalone real-time vs. general purpose Defining System Design Goals Requirements are divided into user goals and systems goals. User goals usually include convenience, ease of use, speed and reliability. System goals usually include being easy to design, implement and maintain; flexibility; reliability and efficiency. These are all too vague to be useful without greater specificity.

Mechanisms vs. Policies Mechanisms determine how to do something. Using a timer to provide CPU protection is an example of a mechanism. Policies determines what will be done. The size of a time slice is an example of a policy decision. Mechanisms and Policies Separating mechanisms and policies gives the design greater flexibility. General mechanisms are good in that changes in policy do not require design changes. Microkernel operating systems use a set of basic building-block to implement mechanisms that are completely policy-free. The Apple MacIntosh has a tight connection between mechanism and policy to give a look and feel that is completely consistent within the system.

Implementation Languages Most operating systems are currently implemented in higher-languages. Higher-level languages allows for faster, more efficient and better-designed code that is easier to port. Disadvantages purportedly include reduced speed, greater storage requirements. System Generation The operating system is typically distributed on tape or disk and has to be configured for a particular system. Configuration specifications include: Type of CPU(s) Amount of Memory Available Devices (Type and other characteristics) Desired options (such as maximum number of processes)