Ceng 334 - Operating Systems 1-1 Chapter 1: Introduction What is the aim of the subject? Why are OSes important? What is an OS? A bit of history Some basic.

Slides:



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

Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc
Introduction CSCI 444/544 Operating Systems Fall 2008.
CS 345 Computer System Overview
Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Winter 2005 CMPE 151: Network Administration Lecture 2.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Course Overview Introduction Computer System Structures
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
Understanding Operating Systems 1 Overview Introduction Operating System Components Machine Hardware Types of Operating Systems Brief History of Operating.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Operating Systems - Introduction S H Srinivasan
Operating Systems.
Figure 1.1 Interaction between applications and the operating system.
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.
Chapter 1 Introduction 1.1 What is an operating system
1 What is an operating system? CSC330Patricia Van Hise.
1 The development of modern computer systems Early electronic computers Mainframes Time sharing Microcomputers Networked computing.
1 Chapter 1: Introduction What is the aim of the subject? What is the aim of the subject? Why are OSes important? Why are OSes important? What is an OS?
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.
G53OPS Operating Systems Graham Kendall Operating Systems.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
 What is OS? What is OS?  What OS does? What OS does?  Structure of Operating System: Structure of Operating System:  Evolution of OS Evolution of.
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
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.
Operating Systems Principles Lecture 1: Introduction 主講人:虞台文.
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 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.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
CIS250 OPERATING SYSTEMS Chapter One Introduction.
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.
1 Operating System (CS – 772) Instructor: Nasir Minhas Assistant Professor UIIT PMAS – UAAR
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 an operating system? Tool to make programmer's job easy Resource allocator – Must be fair; not partial to any process – Must discriminate between.
L ECTURE -6 Topics: Introduction to Operating system. Functions of an Operating system. Classification of Operating systems.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved OPERATING SYSTEMS DESIGN.
CompSci 143A1 1. Introduction 1.1 The Role of Operating Systems - Bridge the “Semantic Gap” between Hardware and Application - Three Views of Operating.
10/2/20161 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King,
Introduction to Operating Systems Concepts
Operating System Overview
Evolution of Operating Systems
Operating Systems Georgios Varsamopoulos
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Operating Systems CSE451 Winter 2000
Lecture 3: Basic OS Concepts
Lecture 6: Multiprogramming and Context Switching
Operating Systems: A Modern Perspective, Chapter 3
Operating System Introduction
Operating Systems Principles Lecture 1: Introduction
Presentation transcript:

Ceng Operating Systems 1-1 Chapter 1: Introduction What is the aim of the subject? Why are OSes important? What is an OS? A bit of history Some basic OS concepts How does an OS work? OS Structures

Ceng Operating Systems 1-2 The Aim of the Subject WILL NOT TEACH YOU HOW TO USE AN OPERATING SYSTEM. It will examine the way in which an OS works the algorithms and data structures inside an OS the problems, solutions and trade offs in designing an OS TO ACHIEVE AN UNDERSTANDING OF HOW AN OPERATING SYSTEM WORKS.

Ceng Operating Systems 1-3 Computer System Components Application Software : Bank automation system, airline reservations, payroll etc. System Software : OS, data base, compilers, editors etc.

Ceng Operating Systems 1-4 What is SYSTEM SOFTWARE? System software provides the environment and the tools to create the application software (sort of virtual machine) It is also the interface between the hardware and the applications

Ceng Operating Systems 1-5 Why is the OS Important? The operating system is the foundation upon which all computing work is performed. Knowledge of the internals of an OS is essential to achieve efficiency in –building software applications –deciding upon a computing platform

Ceng Operating Systems 1-6 What is an Operating System? A big, complex program (sometimes many) It has two main purposes in life –An interface between the user and the hardware (provides a virtual machine) –Provide efficient, safe management of computing resources

Ceng Operating Systems 1-7 Life without an OS Every programmer would –have to know the hardware –be able to access the hardware Every program –would contain code to do the same thing –probably do something wrong

Ceng Operating Systems 1-8 Where does the OS Fit? Hardware CPU & Memory I/O Devices Operating System System Calls Users and User Programs

Ceng Operating Systems 1-9 History : First Generation ( ) Vacuum tubes No operating system Programming is done by wiring a plug board Applications are mostly numerical calculations (trajectory computations, computation of tables such as sine, cosine etc.)

Ceng Operating Systems 1-10 History: Second Generation ( ) Transistors Commercially produced computers Very expensive and very slow computers compared with your old PC at home Batch operation (collect jobs, run in one go, print all outputs)

Ceng Operating Systems 1-11 Spooling (Simultaneous Peripheral Operation On-line) off-line spooling on-line spooling Off-line spooling : replace slow I/O devices with I/O dedicated computers so that the main system sees these machines as its I/O devices

Ceng Operating Systems 1-12 Early Batch Systems bring cards to 1401 read cards to tape put tape on 7094 which does computing put tape on 1401 which prints output

Ceng Operating Systems 1-13 A Deck of Cards (Program)

Ceng Operating Systems 1-14 Applications are mostly scientific and engineering calculations (eg., solution of partial differential equations) High level languages such as FORTRAN and COBOL

Ceng Operating Systems 1-15 History: Third Generation ( ) Integrated circuits (small scale) packed as chips I/O processors (channels) which can work in parallel with CPU - Multiprogramming

Ceng Operating Systems 1-16 Multiprogramming system - three jobs in memory

Ceng Operating Systems 1-17 On-line spooling (using channels) Time-sharing (TTY terminals and VDU’s) Multics OS - original UNIX Minicomputers - Cheaper than mainframes but with limited hardware (eg. DEC PDPx)

Ceng Operating Systems 1-18 History: Fourth Generation ( ) Large scale integration Personal computers CP/M, MS DOS, Unix operating systems Networks

Ceng Operating Systems 1-19 Now! Client/Server computation Clients : PCs, workstations running under Windows and UNIX operating systems Servers : systems that run under UNIX and Windows NT Internet and intranet networking (WWW)

Ceng Operating Systems 1-20 Important Points OS provides –a simpler, more powerful interface –higher level services OS services only accessed via system calls Users and programs can’t directly access the hardware Set of System Calls (APIs) is what programs think the operating system is.

Ceng Operating Systems 1-21 Some OS Concepts Kernel –The main OS program. Contains code for most services. Always in primary memory Device Drivers –Programs that provide a simple, consistent interface to I/O devices –Typically part of the kernel

Ceng Operating Systems 1-22 Some OS Concepts Program –A static file of machine code on a disk Process –A program in execution. –The collection of OS data structures and resources owned by a program while it is running.

Ceng Operating Systems 1-23 Producing an Executable Source CodeObject File Compile Libraries and other Object files Link Executable

Ceng Operating Systems 1-24 #include #include "ourhdr.h" int main(int argc, char *argv[]) { DIR *dp; struct dirent *dirp; if (argc != 2) err_quit("a single argument (the directory name) is required"); if ( (dp = opendir(argv[1])) == NULL) err_sys("can't open %s", argv[1]); while ( (dirp = readdir(dp)) != NULL) printf("%s\n", dirp->d_name); closedir(dp); exit(0); } Functions supplied by system libraries. These functions will contain a trap instruction. A Simple Program to print a directory

Ceng Operating Systems 1-25 RAM User Program #1 User Program #2 trap 002 Kernel System/Kernel Mode User Mode 1. Program performs trap 2. OS determines service number 3. Service is located and executed. 4. Control returns to user program. 4 Based on a diagram from “Modern Operating Systems” by Andrew Tanenbaum.

Ceng Operating Systems 1-26 Steps in Making a System Call There are 11 steps in making the system call : read (fd, buffer, nbytes)

Ceng Operating Systems 1-27 Some System Calls For Process Management

Ceng Operating Systems 1-28 Some System Calls For File Management

Ceng Operating Systems 1-29 Some System Calls For Directory Management

Ceng Operating Systems 1-30 Some System Calls For Miscellaneous Tasks

Ceng Operating Systems 1-31 A System Call Example 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 */ }

Ceng Operating Systems 1-32 OS Structures Monolithic systems Hierarchy of layers Virtual machines Micro-kernel (client/server) model

Ceng Operating Systems 1-33 Monolithic System OS has no structure but is a collection of procedures with well defined calling interfaces Program - OS interface is via supervisor calls (SVC) Interrupt Handler Service routine SVC Program

Ceng Operating Systems 1-34 Simple structuring model for a monolithic system

Ceng Operating Systems 1-35 Monolithic System (Cont.) OS code is a binded object program and its source code may be logically divided into OS main program System call service routines Utility procedures which help service routines

Ceng Operating Systems 1-36 Layered System Structure of “THE” OS (a batch OS)

Ceng Operating Systems 1-37 Layered System (Cont.) 0. Process switching, multi programming, CPU scheduling 1. Memory and swap space (disk) management (“segment controller”) 2. Message interpretation, job control (JCL) functions 3. I/O management (virtual peripherals) 4. User programs 5. Operator

Ceng Operating Systems 1-38 Layered System (Cont.) Synchronisation between layers : Hardware and software (semaphores) interrupts Each layer provides some sort of a “virtual machine”

Ceng Operating Systems 1-39 Virtual Machines Physical Hardware Virtual Machine OS1 OS2 OS3 OS4 User Programs VM provides “n” duplicates of physical hardware using software. So different Oses can work in the same machine at the same time

Ceng Operating Systems 1-40 What is wrong so far? OS is one large program that provides all the required services. Anytime you add a new device you must – get a device driver for the device – recompile the kernel with the new device driver – reboot the machine so the new kernel will be used

Ceng Operating Systems 1-41 Micro-Kernel (Client/Server) Model OS is a minimal core known as Kernel.

Ceng Operating Systems 1-42 The kernel contains the minimum of function –memory management –basic CPU management –inter-process communication (messages) –I/O support Other functionality provided by user level processes

Ceng Operating Systems 1-43 Characteristics of Kernel Makes use of message passing Easy to replace server processes Easier to write and port OS Design is perfect for distributed systems Less performance