1 Introduction Chapter 1 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.

Slides:



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

Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc
Categories of I/O Devices
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
OPERATING SYSTEM LESSON 2. INTRODUCTION TO OPERATING SYSTEM Computer Hardware’s complexity Operating Systems (OS) hide this complexity from users OS manages.
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 Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
OS Spring’03 Introduction Operating Systems Spring 2003.
Computer System Organization S H Srinivasan
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Process Description and Control A process is sometimes called a task, it is a program in execution.
Chapter 1 Introduction 1.1 What is an operating system
1 What is an operating system? CSC330Patricia Van Hise.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
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.
System Calls 1.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
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.
OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
4300 Lines Added 1800 Lines Removed 1500 Lines Modified PER DAY DURING SUSE Lab.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Operating System Overview Tarek Abdelzaher Lawrence Angrave Vikram Adve.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
بسم الله الرحمن الرحيم MEMORY AND I/O.
操作系统原理 OPERATING SYSTEM Chapter 1 Introduction 概 述.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Operating Systems: History, Hardware & Concepts Ch 1.4 & 1.5 Thursday, January 18, 2007.
Introduction to Operating Systems Concepts
Design of Operating Systems
Operating System Overview
CS 3305 System Calls Lecture 7.
Intro to Processes CSSE 332 Operating Systems
MODERN OPERATING SYSTEMS Third Edition ANDREW S
CS510 Operating System Foundations
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Presentation transcript:

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 Operating system concepts 1.6 System calls 1.7 Operating system structure

2 A typical computer system OPERATING SYSTEM

3 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

4 Two modes of execution OS programs execute in kernel or supervisor mode All other programs execute in user mode When a a user process is executing (in user mode) and it requires something form the OS, it issues a system call to the OS –The computer switches to kernel mode so that the OS can execute

5 History of computers – 1.2 First generation –vacuum tubes, plug boards Second generation –transistors, batch systems Third generation 1965 – 1980 –ICs and multiprogramming, spooling Fourth generation 1980 – present –personal computers

6 2 nd generation computing OS used here to distinguish jobs from one another

7 In the 2 nd generation – what was on those cards

8 3 rd generation multiprogramming Allowed the interleaving of jobs between CPU & I/O activity

9 4 th generation computing GUI’s Multimedia Networks Virtual memory techniques

10 The Operating System “Zoo” – 1.3 Mainframe operating systems Server operating systems Multiprocessor operating systems Personal computer operating systems Real-time operating systems Embedded operating systems Smart card operating systems

11 Components of a simple personal computer – 1.4 Monitor Bus

12 Processors CPU –Registers General purpose Special purpose –Program counter –Stack pointer –PSW

13 Fetch-execute cycle CPU fetches the instruction whose address is in the program counter CPU increments program counter to point to the next instruction CPU decodes instruction and locates data & destination of the result CPU executes the instruction Back to top

14 Pipelining & super-scalar CPU’s Enhancements to fetch-execute cycle

15 Typical memory hierarchy

16 Base-limit registers Hardware protection for programs & OS

17 I/O devices Two parts to a device –Controller Chip that physically controls the device Accepts commands from the OS Presents a simple interface to the OS –Hides the complicated details of the device from the OS Device driver software, which runs in kernel mode, is affiliated with the OS –Actual device

18 Three methods of I/O Busy waiting –Once I/O starts, CPU continually polls the I/O device to find out when I/O is complete (and what its status is) Interrupts Direct Memory Access (DMA) –A DMA chip controls the flow of data between memory & the controller, without requiring constant CPU intervention CPU sets up the DMA chip; when I/O complete DMA interrupts CPU

19 What is an interrupt? When the CPU is executing a program and some event takes place in the system that requires its attention/action, the CPU gets interrupted so that it can stop what it is doing and tend to the matter at hand.

20 Interrupts Interrupts are used to temporarily suspend execution of a program in order to carry out a more urgent task. Examples are: –Moving a cursor in response to mouse movements –Receiving messages from a network –Stopping execution in case of programming errors –Responding to I/O completion This is the context in which we’ll introduce them.

21 I/O operation A user process is executing and needs I/O –cin, cout A system call is made to the OS –The appropriate I/O device driver (functions as part of the OS) is invoked –I/O is initiated by the device controller (part of the I/O device) The process that requested I/O is suspended (waiting for its I/O) and the CPU goes on to some other task (i.e. another process)

22 I/O interrupt 1. The disk device driver (part of the OS) tells the disk controller to begin I/O (by writing into its registers). 2. When the disk controller completes the I/O operation, it signals the interrupt controller. 3. The interrupt controller (if not busy with something more important) interrupts the CPU by setting one of its pins. 4. The interrupt controller puts the I/O device # on the bus to the CPU (so CPU knows which device has finished).

23 I/O interrupt When the CPU responds to the interrupt, the current PC & PSW are pushed onto the stack; the CPU is switched into kernel mode. The I/O device # serves as an index into an array of addresses of interrupt handlers (IH). (IH’s are functions within device drivers) The IH removes PC & PSW from stack and saves them; then gets the status of I/O completion. The IH returns control of the CPU to the instruction whose address is in the PC (i.e., to the process whose info is in the PSW); original process resumes execution

24 Buses Pentium system

25 Operating system concepts Processes Deadlocks Memory management I/O File management Security Shell

26 Processes A process is a program in execution –It can create other processes (children) –It can also create threads (lightweight processes)

27 Deadlocks (a) A potential deadlock. (b) an actual deadlock.

28 Memory management Deals with the transfer of data and programs from external memory (HD, flash etc.) into main memory (RAM) A program in execution must be in main memory –Where it is stored is called its address space

29 I/O Every OS has an I/O subsystem to manage all I/O devices that are part of the system. –Some I/O software is device-independent –Some I/O software is part of device drivers

30 Files File system for a university department

31 Shell An OS’ command interpreter –Not technically part of the OS, but relies heavily on OS features When a session is started, a shell is initiated. –Types a prompt –Uses standard keyboard input and screen output

32 Recycling of concepts Read Sec – p. 43

33 System Calls – 1.6 When a program running in user mode needs a service that only the OS can provide, it issues a system call –CPU switches from user to kernel mode –OS routine takes over –Read bottom p. 44

34 Many types of system calls For process management For file management For directory management And miscellaneous tasks

35 Process management Forking example A stripped down shell: while (true) { /* repeat forever */ type_prompt( ); /* display prompt */ read_command (command, parameters) /* input from terminal */ pid = fork(); if (pid != 0) /* Parent code */ /* fork off child process */ { waitpid( -1, &status, 0); /* wait for child to exit */ } else /* Child code */ /* pid=0 { execve (command, parameters, 0); /* execute command */ }

36

37 Metric Units The metric prefixes