Operating Systems Lecture 2.

Slides:



Advertisements
Similar presentations
Computer-System Structures Er.Harsimran Singh
Advertisements

CSC 360- Instructor: K. Wu Overview of Operating Systems.
CMSC 421: Principles of Operating Systems Section 0202 Instructor: Dipanjan Chakraborty Office: ITE 374
Chapter 1: Introduction
1/23/2004CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Bare Machine (early 1950s) Structure  Large machines run from console  Single user.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
1/16/2008CSCI 315 Operating Systems Design1 Introduction Notice: The slides for this lecture have been largely based on those accompanying the textbook.
1/18/2008CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
1 5/25/2016 操作系统课件 教材: 《操作系统概念(第六版 影印版)》 【原书名】 Operating System Concepts(Sixth Edition) [ 原书信息 ] Operating System Concepts(Sixth Edition) [ 原书信息 ] 【原出版社】
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction n What is an Operating System? n Mainframe Systems.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
Chapter 2: Computer-System Structures
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
 H.M.BILAL Operating System Concepts.  What is an Operating System?  Mainframe Systems  Desktop Systems  Multiprocessor Systems  Distributed Systems.
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
1.1 Operating System Concepts Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
1.1 Sandeep TayalCSE Department MAIT 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming Batched Systems Time-Sharing Systems.
Chapter 2: Computer-System Structures(Hardware) or Architecture or Organization Computer System Operation I/O Structure Storage Structure Storage Hierarchy.
Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real.
Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Applied Operating System Concepts
Chapter 1: Introduction
Chapter 1: Introduction
Introduction to Basic OS Concepts
Operating Systems Lecture 2.
Chapter 2: Computer-System Structures(Hardware)
Applied Operating System Concepts
Chapter 2: Computer-System Structures
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 1: Introduction
Chapter 1: Introduction
חוברת שקפים להרצאות של ד"ר יאיר ויסמן מבוססת על אתר האינטרנט:
Computer-System Architecture
Module 2: Computer-System Structures
Operating System Concepts
Chapter 1: Introduction
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Operating Systems Lecture 3.
Subject Name: Operating System Concepts Subject Number:
Module 2: Computer-System Structures
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 2: Computer-System Structures
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Chapter 1: Introduction
Operating System Concepts
Chapter 1: Introduction
Presentation transcript:

Operating Systems Lecture 2

© Copyright Virtual University of Pakistan Agenda for Today Review of previous lecture Single-user systems Batch systems Multiprogrammed systems Time-sharing systems Real-time systems Interrupts, traps, and signals CPU, I/O, and memory protection Recap of the lecture 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Single User Systems Personal computers – computer system dedicated to a single user. Interactive User convenience and responsiveness. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Single User Systems Can adopt technology developed for larger operating systems—multi-process, multi-user Individuals usually have sole use of computer and do not need advanced protection features. May run several different types of operating systems (Windows, MacOS, UNIX, Linux) 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Batch Systems First rudimentary system. User  operator Reduce setup time by batching similar jobs Automatic job sequencing – automatically transfers control from one job to another. Resident monitor : initial control in monitor control transfers to job when job completes control transfers back to monitor 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Memory Layout 31 December 2018 © Copyright Virtual University of Pakistan

Multiprogrammed Systems Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them. 31 December 2018 © Copyright Virtual University of Pakistan

Multiprogrammed Systems Example: Two processes P1 and P2 with CPU and I/O bursts of one time unit each 31 December 2018 © Copyright Virtual University of Pakistan

OS Features Needed for Multiprogramming SPOOLing (Simultaneous Peripheral Operation On-Line) Memory management CPU scheduling 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Time-sharing Systems An interactive system with multiprogramming A job is swapped in and out of memory to the disk if needed. On-line file system must be available for users to access data and code. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Real-time Systems Well-defined fixed-time constraints. Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Real-Time systems may be either hard or soft real-time. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Real-time Systems … Hard real-time systems: Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM) No virtual memory—time cannot be “wasted” on translation of logical to physical addresses OS code structured for efficiency Plane landing systems, process control in nuclear power plants, respirators, etc. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Real-time Systems ... Soft real-time systems Output should be produced within the given time constraints but if it is not, the result is not life threatening Useful in applications (multimedia, virtual reality) requiring advanced operating-system features. 31 December 2018 © Copyright Virtual University of Pakistan

Interrupts, Traps, and Signals The occurrence of an event is usually signaled by an interrupt from either the hardware or the software. Hardware may trigger an interrupt at any time by sending a signal to the CPU usually by way of the system bus. Software may trigger an interrupt by executing a special operation called a system call. Answer the Phone . Resume 31 December 2018 © Copyright Virtual University of Pakistan

Interrupts, Traps, and Signals A process can generate a trap, for example, by dividing a number by zero. A user or a process may generate a signal (an interrupt to a process) Answer the Phone . Resume 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Interrupt Handling Interrupt transfers control to the interrupt service routine, generally, through the interrupt vector, which contains addresses of all the interrupt service routines. Interrupt architecture must save the address of the instruction after the interrupted instruction and the CPU state so that execution of the interrupted process may continue after the interrupt has been serviced. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Interrupt Handling … Incoming interrupts are disabled while another interrupt is being processed to prevent lost interrupts. An operating system is interrupt driven. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Hardware Protection Dual-Mode Operation I/O Protection Memory Protection CPU Protection 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan 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. User mode – execution done on behalf of a user. Monitor mode (also kernel mode or system mode) – execution done on behalf of operating system. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Dual-Mode Operation … 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. monitor user Interrupt/fault set user mode Privileged instructions can be issued only in monitor mode. 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Recap of Lecture Single-user systems Batch systems Multiprogrammed systems Time-sharing systems Real-time systems Interrupts, traps, and signals Privileged instructions I/O protection Recap of the lecture 31 December 2018 © Copyright Virtual University of Pakistan

© Copyright Virtual University of Pakistan Operating Systems Lecture 2 31 December 2018 © Copyright Virtual University of Pakistan