Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.

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.
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved Processes Figure 1-5.
Winter 2005 CMPE 151: Network Administration Lecture 2.
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
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,
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.
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.
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 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?
Principles of Operating System 2014
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.
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,
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: History, Hardware & Concepts Ch Tuesday, January 16, 2007.
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.
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.
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.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
1 Operating Systems: Principles and Practice Cpr E 308.
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved OPERATING SYSTEMS DESIGN.
Copyright ©: University of Illinois CS 241 Staff1 Operating Systems Orientation.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
MODERN OPERATING SYSTEMS Chapter 1 Introduction
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Operating System Overview Tarek Abdelzaher Lawrence Angrave Vikram Adve.
操作系统原理 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.
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.
Operating Systems: History, Hardware & Concepts Ch 1.4 & 1.5 Thursday, January 18, 2007.
OS HISTORY Module 1.3 Richard Newman University of Florida.
Graph Theory and Complex Networks - Introduction - Cüneyt F. Bazlamaçcı, PhD Middle East Technical University Electrical and Electronic Engineering Department.
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.
Introduction to Operating Systems Concepts
Operating System Overview
Lecture 3: Basic OS Concepts
Avani R.Vasant V.V.P. Engineering College
System Calls Richard Newman University of Florida.
Lecture 2: Hardware Review
OS Basics Module 1.2 Richard Newman University of Florida.
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Introduction to Operating Systems
Introduction to Operating Systems
Lecture 2: Hardware Review
Lecture 3: Basic OS Concepts
Introduction to Operating Systems
Operating System Introduction
Operating System Introduction
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
Presentation transcript:

Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system concepts  System calls  Operating system structure Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

What Is An Operating System A modern computer consists of: One or more processors Main memory Disks Printers Various input/output devices Managing all these components requires a layer of software – the operating system Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

What Is An Operating System Figure 1-1. Where the operating system fits in. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

What Is An Operating System

5 What is an Operating System It is an extended machine  Hides the messy details which must be performed  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

The Operating System as an Extended Machine Figure 1-2. Operating systems turn ugly hardware into beautiful abstractions. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

The Operating System as a Resource Manager Allow multiple programs to run at the same time Manage and protect memory, I/O devices, and other resources Includes multiplexing (sharing) resources in two different ways: In time In space Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

History of Operating Systems Generations: (1945–55) Vacuum Tubes (1955–65) Transistors and Batch Systems (1965–1980) ICs and Multiprogramming (1980–Present) Personal Computers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Transistors and Batch Systems (1) Figure 1-3. An early batch system. (a) Programmers bring cards to (b)1401 reads batch of jobs onto tape. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Transistors and Batch Systems (2) Figure 1-3. (c) Operator carries input tape to (d) 7094 does computing. (e) Operator carries output tape to (f) 1401 prints output. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Transistors and Batch Systems (4) Figure 1-4. Structure of a typical FMS job. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 1-5. A multiprogramming system with three jobs in memory. ICs and Multiprogramming Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Computer Hardware Review Figure 1-6. Some of the components of a simple personal computer. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

CPU Pipelining Figure 1-7. (a) A three-stage pipeline. (b) A superscalar CPU. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 1-8. (a) A quad-core chip with a shared L2 cache. (b) A quad-core chip with separate L2 caches. Multithreaded and Multicore Chips Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 1-9. A typical memory hierarchy. The numbers are very rough approximations. Memory (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Questions when dealing with cache: When to put a new item into the cache. Which cache line to put the new item in. Which item to remove from the cache when a slot is needed. Where to put a newly evicted item in the larger memory. Memory (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Structure of a disk drive. Disks Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) The steps in starting an I/O device and getting an interrupt. I/O Devices Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The structure of a large Pentium system Buses Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

The Operating System Zoo Mainframe operating systems Server operating systems Multiprocessor operating systems Personal computer operating systems Handheld operating systems Embedded operating systems Sensor node operating systems Real-time operating systems Smart card operating systems Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Processes Address spaces Files Input/Output Protection Shell Virtual memory Operating System Concepts Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Processes Figure A process tree. Process A created two child processes, B and C. Process B created three child processes, D, E, and F. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

24 Deadlock (a) A potential deadlock. (b) an actual deadlock.

Figure A file system for a university department. Files (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) Before mounting, the files on the CD-ROM are not accessible. (b) After mounting, they are part of the file hierarchy. Files (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Two processes connected by a pipe. Files (3) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

System calls: a set of “extended instructions" provided by O.S., providing the interface between a process and the O.S. Example: Read a certain number of bytes from a file count = read(fd, buffer, nbytes) System Calls

Figure The 11 steps in making the system call read(fd, buffer, nbytes). System Calls Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some of the major POSIX system calls. System Calls for Process Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

System Calls for Process Management ork(): the only way to create a new fork() The only way to create a new process in Unix. Create a copy of the process executing it. fork returns 0 in the child, and returns child's pid in the parent. Returns -1 for error. exit(status) A process terminates by calling exit system call. status: 0-255, 0: normal, others: abnormal terminations. waitpid(pid, status, opts) pid: specific child, -1: first child. status: child exit status. opts: block or not.

System Calls for Process Management execve The only way a program is executed in Unix. s = execve(file, argv, envp) Example: A simplified shell. Shell: Unix command interpreter. Examples of shell commands: date date > file (output redirection) sort < file (input redirection) sort file2 (input + output redirection) cat file1 file2 | sort > file3 (pipe + output redirection)

Figure A stripped-down shell. A Simple Shell Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some of the major POSIX system calls. System Calls for File Management (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Read, write, create, open and close a file: fd = creat(filename, mode) fd = open(file, how) close(fd) Random access a file: pos = lseek(fd, offset, whence) Duplicate the file descriptor: fd2 = dup(fd) fd2 = dup2(fd, fd2) Create a pipe: pipe(&fd[0]) returns two file descriptors: fd[0] : for reading fd[1] : for writing Example for using pipe system call System Calls for File Management

Example of Creating a Pipe

Figure Some of the major POSIX system calls. System Calls for File Management (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some of the major POSIX system calls. Miscellaneous System Calls Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Processes have three segments: text, data, and stack. Memory Layout Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) Two directories before linking /usr/jim/memo to ast’s directory. (b) The same directories after linking. Linking Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) File system before the mount. (b) File system after the mount. Mounting Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The Win32 API calls that roughly correspond to the UNIX calls of Fig Windows Win32 API Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Monolithic systems – basic structure: A main program that invokes the requested service procedure. A set of service procedures that carry out the system calls. A set of utility procedures that help the service procedures. Operating Systems Structure Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

44 Operating System Structure Simple structuring model for a monolithic system

Figure A simple structuring model for a monolithic system. Monolithic Systems Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Structure of the THE operating system. Layered Systems Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Structure of the MINIX 3 system. Microkernels Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

48 Client-Server Model The client-server model

Figure The client-server model over a network. Client-Server Model Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The structure of VM/370 with CMS. Virtual Machines (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) A type 1 hypervisor. (b) A type 2 hypervisor. Virtual Machines (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

The C language Header files Large programming projects The model of run time The World According to C Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The process of compiling C and header files to make an executable. The Model of Run Time Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved