Operating Systems CS 571

Similar documents
CS450/550 Operating Systems

Computer System Overview

Chapter 1 Introduction

Operating Systems, Fall

Master level: Operating systems, distributed systems, networking,

Operating Systems ( )

Operating Systems ( )

Operating Systems ( )

Operating Systems ( )

Operating System Review

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

CMPS 111: Introduction to Operating Systems

Instruction Cycle. Computer-System Architecture. Computer-System Operation. Common Functions of Interrupts. Chapter 2: Computer-System Structures

Module 2: Computer-System Structures. Computer-System Architecture

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

Unix API Books. Linux Kernel Books. Assignments and Exams. Grading for CSC 256. Operating Systems 8/31/2018. CSC 256/456 Fall

Computer-System Structures

Lecture 2 - Fundamental Concepts

Computer-System Architecture

Computer-System Architecture. Common Functions of Interrupts. Computer-System Operation. Interrupt Handling. Chapter 2: Computer-System Structures

Process Description and Control. Chapter 3

CS399 New Beginnings. Jonathan Walpole

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Reserves time on a paper sign-up sheet. Programmer runs his own program. Relays or vacuum tube hardware. Plug board or punch card input.

CS 333 Introduction to Operating Systems Class 2 OS-Related Hardware & Software The Process Concept

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

ESE 333 Real-Time Operating Systems 2 What is an operating system? Two views: 1. Top-down view: Extended machine ffl Covers the details of the hardwar

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

Operating Systems Course Overview

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Common Computer-System and OS Structures

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo

CSC 256/456: Operating Systems. Introduction. John Criswell! University of Rochester

CSC Operating Systems Fall Lecture - I Introduction. Tevfik Ko!ar. Louisiana State University. August 25 th, Contact Information

Operating Systems. Hadi Salimi Computer Engineering Department Iran University of Science and Technology Tehran, Iran

Chapter 3: Processes. Operating System Concepts 8th Edition,

Introduction. Operating Systems. Introduction. Introduction. Introduction

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Introduction and Overview

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Architectural Support for Operating Systems. Jinkyu Jeong ( Computer Systems Laboratory Sungkyunkwan University

Lecture 1 Introduction (Chapter 1 of Textbook)

Four Components of a Computer System

Operating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1

Chapter 3: Process Concept

Chapter 3: Process Concept

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

Unit 2 : Computer and Operating System Structure

OPERATING SYSTEMS UNIT - 1

Introduction OS

Chapter 3: Process Concept

Useful information. Introduction. Outline of the course. Background. References

Process a program in execution; process execution must progress in sequential fashion. Operating Systems

Processes and More. CSCI 315 Operating Systems Design Department of Computer Science

CSC 2405: Computer Systems II

CPS 310 first midterm exam, 2/26/2014

IT 540 Operating Systems ECE519 Advanced Operating Systems

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

Processes. Process Concept

Process Description and Control. Chapter 3

Introduction SOFTWARE TECHNOLOGIES FOR BIOENGINEERING OS

ELEC 377 Operating Systems. Week 1 Class 2

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

Process Description and Control

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?

CS 333 Introduction to Operating Systems. Class 2 OS-Related Hardware & Software The Process Concept

Major Requirements of an OS

Operating System Labs. Yuanbin Wu

Operating Systems (ECS 150) Spring 2011

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

Introduction to OS. Introduction MOS Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

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

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

CS 333 Introduction to Operating Systems. Class 1 - Introduction to OS-related Hardware and Software

Process Description and Control. Major Requirements of an Operating System

Major Requirements of an Operating System Process Description and Control

OPERATING SYSTEM OVERVIEW

Process Description and Control. Chapter 3

Architectural Support for Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Killing Zombies, Working, Sleeping, and Spawning Children

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

Process Description and Control

Chapter 2: Computer-System Structures. Hmm this looks like a Computer System?

Uniprocessor Computer Architecture Example: Cray T3E

About Me. Office Hours: Tu 4-5, W 1-2, or by appointment Office: 346A IST Bldg

Introduction. CS3026 Operating Systems Lecture 01

W4118: OS Overview. Junfeng Yang

Principles of Operating Systems CS 446/646

CS510 Operating System Foundations. Jonathan Walpole

Misc. Third Generation Batch Multiprogramming. Fourth Generation Time Sharing. Last Time Evolution of OSs

OPERATING SYSTEMS OVERVIEW. Operating Systems 2015 Spring by Euiseong Seo

csci3411: Operating Systems

OS Assignment I. The result is a smaller kernel. Microkernels provide minimal process and memory management, in addition to a communication facility.

Preview. The Thread Model Motivation of Threads Benefits of Threads Implementation of Thread

Course Content. 07-Feb-17 Faculty of Computer Science & Engineering 1 BK TP.HCM

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

Diagram of Process State Process Control Block (PCB)

Module 4: Processes. Process Concept Process Scheduling Operation on Processes Cooperating Processes Interprocess Communication

Transcription:

Operating Systems CS 571 Prof. Sanjeev Setia Fall 2003 1 Prerequisites Overview Computer Architecture (CS 365) Data structures and programming (CS 310) (C++/C/Java progamming) Textbooks Modern Operating Systems (Tannenbaum) Distributed Systems Concepts and Design (Coulouris, Dollimore, Kindberg) 2 1

2 Overview cont d Grading One midterm exam (25%), Final Exam (25%) Assignments (50%) Four Programming Assignments Concurrent Programming (2 weeks) Interprocess Communication Socket programming (2 weeks) RMI/RPC (2 weeks) Distributed File System (4 weeks) First three to be done individually, fourth may be done in groups of two Late submission penalty 10% per day Use your own Linux/Unix machine or use SUN workstations in the IT&E lab Plagiarism => Severe penalties (fail the class, expelled from program) 3 Class Web Page Logistics http://www.cs.gmu.edu/~setia/cs571/ Slides, Handouts, Old Exams, Useful Links Slides Slides made available by authors of textbooks used as a template http://www.cs.vu.nl/~ast/books/mos2/ http://www.cdk3.net/ 4

Office Hrs Logistics Monday, 2 4 pm, Room 347, S&T II setia@cs.gmu.edu TA Y. Kim Office Hrs: TBA Office: TBA Computer Accounts (IT&E or your own machine at home/work) 5 Chapter 1 Introduction 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5 Operating system concepts 1.6 System calls 1.7 Operating system structure 6 3

Introduction A computer system consists of hardware system programs application programs 7 What is an Operating System It is an extended machine Hides the messy details of actions which must be performed to use the hardware Presents user with a virtual machine, easier to use It is a resource manager Each program gets time with the resource Each program gets space on the resource 8 4

5 History of Operating Systems (1) Early batch system bring cards to 1401 read cards to tape put tape on 7094 which does computing put tape on 1401 which prints output 9 History of Operating Systems (2) First generation 1945-1955 vacuum tubes, plug boards Second generation 1955-1965 transistors, batch systems Third generation 1965 1980 ICs and multiprogramming Fourth generation 1980 present personal computers Fifth generation?? 2000 present Handheld and embedded devices 10

6 History of Operating Systems (3) Structure of a typical FMS job 2 nd generation 11 History of Operating Systems (4) Multiprogramming system three jobs in memory 3 rd generation 12

The Operating System Zoo Mainframe operating systems Server operating systems Multiprocessor operating systems Personal computer operating systems Real-time operating systems Embedded operating systems Smart card operating systems 13 Migration of Operating-System Concepts and Features 14 7

8 Computer Hardware Review (1) Monitor Bus Components of a simple personal computer 15 Computer Hardware Review CPU architecture (a) A three-stage pipeline (b) A superscalar CPU 16

Computer Hardware Review CPU architecture CPU has several general-purpose and special-purpose registers Special purpose registers PC (program counter) SP (stack pointer) PSW (processor status word) Reflects status of CPU, i.e., user/kernel mode, interrupt mask, etc. 17 Computer Hardware Review Storage Hierarchy Typical storage hierarchy numbers shown are rough approximations 18 9

10 Computer Hardware Review - Disk Drives Structure of a disk drive 19 Computer Hardware Review - Memory Protection One base-limit pair and two base-limit pairs 20

Computer Hardware Review Interrupts (a) (b) (a) Steps in starting an I/O device and getting interrupt (b) How the CPU is interrupted 21 Interrupt Handling The operating system preserves the state of the CPU by storing registers and the program counter. Determines which type of interrupt has occurred: Usually a vectored interrupt system Separate segments of code (interrupt handlers) determine what action should be taken for each type of interrupt 22 11

12 Interrupt Time Line For a Single Process Doing Output 23 Computer Hardware Review - Direct Memory Access (DMA) Used for high-speed I/O devices able to transmit information at close to memory speeds. Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention. Only one interrupt is generated per block, rather than the one interrupt per byte. 24

Computer Hardware Review - Dual-Mode Operation Sharing system resources requires operating system to ensure that an incorrect program cannot cause other programs to execute incorrectly. Provide hardware support to differentiate between at least two modes of operations. 1. User mode execution done on behalf of a user. 2. Monitor mode (also kernel mode or system mode) execution done on behalf of operating system. 25 Dual-Mode Operation (Cont.) Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1). When an interrupt or fault occurs hardware switches to monitor mode. Interrupt/fault monitor user set user mode Privileged instructions can be issued only in monitor mode. 26 13

Computer Hardware Review Structure of a large Pentium system 27 Operating System Concepts (1) A process tree A created two child processes, B and C B created three child processes, D, E, and F 28 14

15 Operating System Concepts (2) File system for a university department 29 Operating System Concepts (3) Before mounting, files on floppy are inaccessible After mounting floppy on b, files on floppy are part of file hierarchy 30

16 Operating System Concepts (4) Two processes connected by a pipe 31 Operating System Functions Process management Inter-process communication Memory management File management I/O and Storage system management Power management in newer systems Networking Security & Protection User Interface Can be part of the OS (e.g. Windows) or outside the OS (Unix) 32

Operating System Interface System commands ls, ps, cat (UNIX), dir, type (Windows) System calls API for invoking operating system services read(), write(), fork() 33 Command-Interpreter System Many commands are given to the operating system by control statements which deal with: process creation and management I/O handling secondary-storage management main-memory management file-system access protection networking 34 17

18 Steps in Making a System Call There are 11 steps in making the system call read (fd, buffer, nbytes) 35 Some System Calls For Process Management 36

19 Some System Calls For File Management 37 Some System Calls For Directory Management 38

20 Some System Calls For Miscellaneous Tasks 39 System Calls (1) A stripped down shell: while (TRUE) { /* repeat forever */ type_prompt( ); /* display prompt */ read_command (command, parameters) /* input from terminal */ if (fork()!= 0) { /* fork off child process */ /* Parent code */ waitpid( -1, &status, 0); /* wait for child to exit */ } else { /* Child code */ execve (command, parameters, 0); /* execute command */ } } 40

21 System Calls (2) Processes have three segments: text, data, stack 41 System Calls (3) (a) Two directories before linking /usr/jim/memo to ast's directory (b) The same directories after linking 42

System Calls (4) (a) File system before the mount (b) File system after the mount 43 System Calls (5) Some Win32 API calls 44 22

23 Operating System Structure (1) Simple structuring model for a monolithic system 45 Operating System Structure (2) Structure of the THE operating system 46

24 Operating System Structure (3) Structure of VM/370 with CMS 47 Operating System Structure (4) The client-server model 48

25 Operating System Structure (5) The client-server model in a distributed system 49