Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved. 0-13-142938-8 OPERATING SYSTEMS DESIGN.

Slides:



Advertisements
Similar presentations
OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
Advertisements

Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved OPERATING SYSTEMS DESIGN.
CS 345 Computer System Overview
Enrique Blanco García © 2004 Introduction to the UNIX environment Enrique Blanco Cover from the book Modern operating systems. A. Tanenbaum.
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Processes Figure 1-5.
1 Processes Professor Jennifer Rexford
1 Processes and Pipes COS 217 Professor Jennifer Rexford.
Processes CSCI 444/544 Operating Systems Fall 2008.
Chapter 1 Introduction
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Chapter 1 Introduction 1.1 What is an operating system
Introduction to Kernel
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
A. Frank - P. Weisberg Operating Systems Evolution of Operating Systems.
Chapter 1 Introduction 1.1 What is an operating system
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
1 What is an operating system? CSC330Patricia Van Hise.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
CS 6560 Operating System Design Lecture 1. Overview 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4.
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL Yan hao (Wilson) Wu University of the Western.
CS 149: Operating Systems January 29 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Threads, Thread management & Resource Management.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
Chapter 1 Introduction 1.1 What is an operating system
ITEC 502 컴퓨터 시스템 및 실습 Chapter 1: Introduction. ITEC 502 컴퓨터 시스템 및 실습 Chapter 1: Introduction Mi-Jung Choi DPNM Lab. Dept. of CSE,
1 Instructor :Erdal Kose Office hours: Tuesday 9:00-9:30 pm. Mail box : 2109 Ingersoll Hall (Erdal ) Web site :
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
1 Introduction. 2 A computer system consists of –hardware –system programs –application programs.
MODERN OPERATING SYSTEMS Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
1 Pertemuan 3 Konsep Sistem Operasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
INFORMATION SYSTEM-SOFTWARE Topic: OPERATING SYSTEM CONCEPTS.
Copyright ©: University of Illinois CS 241 Staff1 Operating Systems Orientation.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
CIS250 OPERATING SYSTEMS Chapter One Introduction.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
MODERN OPERATING SYSTEMS Chapter 1 Introduction
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Operating System Overview Tarek Abdelzaher Lawrence Angrave Vikram Adve.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
操作系统原理 OPERATING SYSTEM Chapter 1 Introduction 概 述.
What is a Process ? A program in execution.
What is an operating system? Tool to make programmer's job easy Resource allocator – Must be fair; not partial to any process – Must discriminate between.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 0: Historical Overview.
OS HISTORY Module 1.3 Richard Newman University of Florida.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved OPERATING SYSTEMS DESIGN.
Operating System Overview
Lecture 3: Basic OS Concepts
Evolution of Operating Systems
Avani R.Vasant V.V.P. Engineering College
System Calls Richard Newman University of Florida.
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Lecture 3: Basic OS Concepts
Operating System Introduction
CSE 153 Design of Operating Systems Winter 2019
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
The UNIX Time Sharing System
Presentation transcript:

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL Chapter 1 Introduction

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved The Modern Computer System Figure 1.1 A computer system consists of hardware, system programs, and application programs.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved What Is an Operating System? Two basic functions of the OS: Extended machine or virtual machine –Easier to program than the underlying hardware Resource manager Shares resources in time and space User interface to OS is what we see, But really it is just another program….

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Operating System Generations (Tannenbaum – H/W) Generation 1 (1945 – 55) Vacuum tubes and plugboards Generation 2 (1955 – 65) Transistors and batch systems Generation 3 (1965 – 80) ICs and multiprogramming Generation 4 (1980 – Present) Personal computers (My gen 5 – multicore systems + pervasive computing)

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Program is in plugboard!!! Remmington Rand 409 (Univac)

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved card sorter (L) reader/punch (C), computer (R) IBM 650

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved front panel (L) drum (B), tubes (TL) IBM 650

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved IBM 650 announced1953, sold until1962 Vacuum Tube (IBM 650)

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Sperry-Univac AN-UYK/20 Program from toggle switches on front panel Note 64K of core memory (bottom half)

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Operating System Generations (Silberschatz and others – S/W) Generation 1 (50’s on) Resident Monitor – user = operator Single application program at a time Generation 2 (late 50’s – 60’s) Batch systems – user not operator, JCL 2a – uniprogrammed batch 2b – multiprogrammed batch Generation 3 (1960’s on) Timesharing systems Generation 4 (1980 – Present) Personal computers – user = operator Did they improved productivity?

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Operating System Generations (Silberschatz and others – S/W) Generation 5 (1980 – present) Network Operating Systems Remote commands, interoperability key Generation 6 (late 80’s – present) Distributed Operating Systems Transparency key – homogenous systems Generation 7 (1990’s on) Cooperative Autonomous Systems – independent systems – integration key Resource discovery, negotiation, etc. e.g., Service Oriented Architectures

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Resident Monitor Users reserved time on machine (hour scale) If not done when time up, too bad – try again later Useful to have a user interface and RM to allow you to –Read program and data in from card reader, tape drive, etc.; –Run program –Print results Also had utility programs –Compiler –Linker –Loader –Editor Also had libraries Sets of convenient procedures reused often –Math functions –Print formatting –I/O access

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Early Batch System (1) Figure 1-2. An early batch system. (a) Programmers bring cards to (b)1401 reads batch of jobs onto tape.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Early Batch System (2) Figure 1-2. An early batch system. (c) Operator carries input tape to (d) 7094 does computing.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Early Batch System (3) Figure 1-2. An early batch system. (e) Operator carries output tape to (f) 1401 prints output.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Early Batch System (4) Figure 1-3. Structure of a typical FMS job.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Uniprogrammed Batch System Uniprogramming – single process runs at a time Protect OS/RM using fence register & test vs. address User Program Operating System/RM Fence register

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Uniprogrammed Batch System While there is another job Read control card for next job Load job Run job Job 1 time Job 2Job N OS …

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Uniprogrammed Batch System I/O-bound jobs underutilize CPU Even CPU-bound jobs use little CPU when doing I/O Desirable to overlap CPU use of one job with I/O of other job(s) time activity CPU I/O CPU I/O CPU-bound job I/O-bound job CPU burstI/O burst

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Multiprogramming Figure 1-4. A multiprogramming system with three jobs in memory.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Multiprogrammed Batch System time activity CPU-2 I/O-2 CPU-3 I/O-3 CPU-1 I/O-1 OS Has CPU Waiting for CPU or event Doing I/O (3 channels)

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Processes Figure 1-5. A process tree. Process A created two child processes, B and C. Process B created three child processes, D, E, and F. How to create a child process? Where does the first process come from?

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved File Systems (1) Figure 1-6. A file system for a university department.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved File Systems (2) Figure 1-7. (a)Before mounting, the files on drive 0 are not accessible. (b)After mounting, they are part of the file hierarchy.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved File Systems (3) Figure 1-8. Two processes connected by a pipe. What is a pipe, anyway? Not that kind of pipe! A pipe is a character stream – one process can write to it, the other one reads from it.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls (1) Figure 1-9. The MINIX system calls. pid is process ID; statloc and status return exit status; name is filename; argv is argument list; envp is environment pointer. Process Management

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls (2) Signals Figure 1-9. The MINIX system calls. sig is signal number, act and oldact are procedures, how says what to do, old allows old signal mask to be remembered.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls (3) File Management Figure 1-9. The MINIX system calls. fd is a file descriptor; mode determines access mode; nbytes is a byte count; buf holds status info.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls (4) Directory & File System Mgmt. Figure 1-9. The MINIX system calls. s is return status; namex, dirname, and special are file/directory names; mode is protection mode.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls (5) Protection Figure 1-9. The MINIX system calls. name is file/directory name; mode is protection mode, complmode is its inverse; uid and owner are user ID; gid and group are group ID.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls (6) Time Management Figure 1-9. The MINIX system calls. tp and timep are pointers to time variable; file is filename.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved The fork Call in the Shell Figure A stripped-down shell. Throughout this book, TRUE is assumed to be defined as 1.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Processes Figure Processes have three segments: text, data, and stack. In this example, all three are in one address space, but separate instruction and data space is also supported. Instructions Persistent variables, constants Activation frames with non-persistent variables Stack and data grow and shrink

Return from first procedure Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Processes A process grows the stack as procedures/methods are called, shrinks it as they return. Instructions Persistent variables, constants Activation frames with non-persistent variables Stack and data grow and shrink A process uses up space in data segment as objects are allocated, must increase space if none left. Allocate a variable Allocate another var Free a variable Call a procedure Call another procedure Return from second procedure Free stack space Used stack space Free heap space Used heap space

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls for File Management (1) Figure The structure used to return information for the stat and fstat system calls. In the actual code, symbolic names are used for some of the types.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved I/O Redirection In the shell: $ cat - silly.txt The '<' character redirects input to come from a file The '|' characters indicate pipes The '>' character redirects the output to a file cat with the '-' option reads from stdin, and by default it writes to stdout. Both grep and sort read from stdin and write to stdout (cin and cout in C++) Pipes allow linking a sequence of operations together without having to make temporary files between each step

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls for File Management (2) Figure First part of a skeleton for setting up a two-process pipeline. … NB: need two file descriptors – read (0) and write (1)

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls for File Management (3) Figure Last part of a skeleton for setting up a two-process pipeline. … Now when process1 writes to STDOUT, it appends to pipe And when process2 reads from STDIN, it dequeues from pipe Frees slot 0 in PFT Copies read end of pipe to slot 0 in PFT

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls for Directory Management (1) Figure (a) Two directories before linking /usr/jim/memo to ast’s directory. (b) The same directories after linking. link(“/usr/jim/memo”,”/usr/ast/note”); i-node number file name

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved System Calls for Directory Management (2) Figure (a) File system before the mount. (b) File system after the mount. mount(“/dev/cdrom0”,”/mnt”,0);

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Operating System Structure Figure The 11 steps in making the system call read(fd, buffer, nbytes).

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Basic Structure for Operating System 1.A main program that invokes the requested service procedure 2.A set of service procedures that carry out the system calls 3.A set of utility procedures that help the service procedures

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Layered Systems (1) Figure A simple structuring model for a monolithic system.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Layered Systems (2) Figure Structure of the THE operating system.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Virtual Machines Figure The structure of VM/370 with CMS.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Client-Server Model (1) Figure The client-server model.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Client-Server Model (2) Figure The client-server model in a distributed system.

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Client-Server Model (3) Client-server synchronous communication Server Client time wait for reply request reply wait for request

Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Summary 1.OS definition(s) and functions 2.OS history, functionalities 3.OS components 4.System calls 5.OS Architectures