Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.

Slides:



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

Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
Thursday, June 08, 2006 The number of UNIX installations has grown to 10, with more expected. The UNIX Programmer's Manual, 2nd Edition, June, 1972.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
1/21/2008CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Abhinav Kamra Computer Science, Columbia University 2.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 2: Computer-System Structures.
Chapter 8 Operating System Support
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
OS and the Computer System  Some OS programs exist permanently in the system area of the memory to monitor and control activities in the computer system.
Chapter 2: Computer-System Structures
What do operating systems do? manage processes manage memory and computer resources provide security features execute user programs make solving user.
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.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Operating Systems Lecture Notes Introduction Matthew Dailey Some material © Silberschatz, Galvin, and Gagne, 2002.
Operating system Structure and Operation by Dr. Amin Danial Asham.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
2.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 2: Computer-System Structures Computer System Operation I/O Structure.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2 Computer-System Structures n Computer System Operation n I/O Structure.
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
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.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures(Hardware) or Architecture or Organization Computer System Operation I/O Structure Storage Structure Storage Hierarchy.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
CSCE451/851 Introduction to Operating Systems
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Operating System Overview
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Protection of System Resources
Introduction to Operating System (OS)
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer-System Architecture
Module 2: Computer-System Structures
Lecture Topics: 11/1 General Operating System Concepts Processes
Operating Systems Lecture 3.
Module 2: Computer-System Structures
CS 143A Principles of Operating Systems
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Module 2: Computer-System Structures
Presentation transcript:

Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing resources. –When a job issues an I/O request (e.g., open a file, read data from a file), it cannot continue until the request is fulfilled. –The CPU then becomes idle (the job is blocked on the request).

Operating System Structure Basic idea of multiprogramming: –Keep multiple jobs in memory. –When one job blocks on I/O (or other events), the operating system: Starts the I/O operation. Switches to another job that is ready to execute. Now the CPU and I/O device are executing in parallel. –When the I/O device has completed request, it generates an interrupt to inform the CPU. –Virtually all general purpose computers support multiprogramming.

First developed for batch systems in the 60s. –Go to the computer center and give them your program (stored on punch cards). –The computer operator “batched” several jobs together and loaded them into the computer. –Come back at 5:00 to get the results of your program. Batch systems are non-interactive.

Time-Sharing Systems (Multitasking) Logical extension of multiprogramming termed multitasking. Quite often sitting at terminal using a “command line” interface to interact with computer. Types in commands from keyboard. A system program called a shell reads command from the command line and makes OS system calls to carry out commands. OS switches between user’s programs very quickly, generally in round-robin fashion.

Shared Computer User1User 3 User 4 User 2

Shared Computer User1 User 3 User 4 User 2

Shared Computer User1 User 3 User 4 User 2

Shared Computer User1 User 3 User 4 User 2

Shared Computer User1 User 3 User 4 User 2

Time-Sharing Systems (Multitasking) Switching between users is very fast. Goal is to give the illusion that each user has own machine. Think about using a text editor, or getting a directory listing. Response time is a priority.

Protection of System Resources I/O Devices Memory CPU Files Operating System

Protection of System Resources Based on dual-mode execution: –kernel mode and user mode. –Privileged instructions can be issued only in kernel mode. –Mode bit in Process Status Word (PSW), checked on every instruction.

User process executing System Call Trap, mode bit = 0 Execute System Call Return. Mode bit = 1 Continue Execution Mode Bit=1

Protection of I/O Devices All I/O instructions are privileged instructions. Only accessed through system calls.

Memory Protection Must provide memory protection for the interrupt vector, interrupt service routines, and other applications address space. Two registers that determine the range of legal addresses a program may access: –Base register – holds the smallest legal physical memory address. –Limit register – contains the size of the range Memory outside the defined range is protected.

Use of A Base and Limit Register

Hardware Address Protection limit

CPU (and OS) Protection Keep user from monopolizing CPU. Ensure OS regains control of CPU.

CPU Protection Timer – interrupts computer after specified period to ensure operating system maintains control. –Timer is decremented every clock tick. –When timer reaches the value 0, an interrupt occurs. Timer commonly used to implement time sharing.

Privileged Instructions Load base and limit registers?

Privileged Instructions Load base and limit registers? Set the system timer?

Privileged Instructions Load base and limit registers? Set the system timer? Read the system clock?

Privileged Instructions Set the system timer? Read the system clock? Load base and limit registers? Open a file?

Privileged Instructions Load base and limit registers? Set the system timer? Read the system clock? Open a file? Compile a program and create executable?

Privileged Instructions Load base and limit registers? Set the system timer? Read the system clock? Open a file? Compile a program and create executable? Enable/disable interrupts?