OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S.

Slides:



Advertisements
Similar presentations
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
Advertisements

CSCI 4717/5717 Computer Architecture
Introduction CSCI 444/544 Operating Systems Fall 2008.
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
Lecture 1: History of Operating System
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
Introduction to Operating Systems What is an operating system? Examples How do many programs run at the same time, with one processor?
1 Computer System Overview OS-1 Course AA
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Computer Organization and Architecture
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.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
1 What is an operating system? CSC330Patricia Van Hise.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
 Introduction Introduction  Definition of Operating System Definition of Operating System  Abstract View of OperatingSystem Abstract View of OperatingSystem.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
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:
Invitation to Computer Science 5 th Edition Chapter 6 An Introduction to System Software and Virtual Machine s.
Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
COMPUTER ORGANIZATIONS CSNB123. COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Distributed System Concepts and Architectures 2.3 Services Fall 2011 Student: Fan Bai
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
Processes Introduction to Operating Systems: Module 3.
INFORMATION SYSTEM-SOFTWARE Topic: OPERATING SYSTEM CONCEPTS.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Distributed System Concepts and Architectures Services
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.
CIS250 OPERATING SYSTEMS Chapter One Introduction.
Lecture 1: Review of Computer Organization
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Group 1 chapter 3 Alex Francisco Mario Palomino Mohammed Ur-Rehman Maria Lopez.
1.1 Sandeep TayalCSE Department MAIT 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming Batched Systems Time-Sharing Systems.
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.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
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.
Copyright Prentice Hall, Inc. 1 Operating System Overview.
Introduction to Operating Systems Concepts
Applied Operating System Concepts
Applied Operating System Concepts
Introduction to Operating System (OS)
Chapter 1: Introduction
חוברת שקפים להרצאות של ד"ר יאיר ויסמן מבוססת על אתר האינטרנט:
Chapter 1: Intro (excerpt)
Processor Fundamentals
Operating System Concepts
BIC 10503: COMPUTER ARCHITECTURE
Operating Systems : Overview
Chapter 2: Operating-System Structures
Operating Systems : Overview
Operating Systems : Overview
Chapter 2: Operating-System Structures
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Operating System Concepts
Presentation transcript:

OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S services Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S services This lecture will cover:

This Lecture will also cover: O/S resource management O/S achievement history Hardware architecture Processes Interrupts O/S resource management O/S achievement history Hardware architecture Processes Interrupts

Goals of the Course This course is to provide a combined applied/ theoretical background in Operating Systems and Systems Programming to improve students’ understanding: 1. Systems software design 2. Systems programming 3. Performance analysis 4. Performance tuning This course is to provide a combined applied/ theoretical background in Operating Systems and Systems Programming to improve students’ understanding: 1. Systems software design 2. Systems programming 3. Performance analysis 4. Performance tuning

Some Prerequisites The Study of Operating Systems Relies on Many Areas: 1.Mathematics (a) Discrete Mathematics (b) Basic Calculus (c)Probability (Exponential Distribution, Poisson Processes) The Study of Operating Systems Relies on Many Areas: 1.Mathematics (a) Discrete Mathematics (b) Basic Calculus (c)Probability (Exponential Distribution, Poisson Processes)

2. Computer Science (a) Computer Architecture (b)Programming Language Design (c)Software Design (d)Data Structures/ Algorithms Don’t Panic if you are not familiar with all the topics, but it is best to be exposed to most of them. 2. Computer Science (a) Computer Architecture (b)Programming Language Design (c)Software Design (d)Data Structures/ Algorithms Don’t Panic if you are not familiar with all the topics, but it is best to be exposed to most of them. Other Prerequisites

Operating System Definitions Operating System - a program that acts as an intermediary between a user of a computer and the computer hardware. Resource Allocator - manages and allocates resources. Control Program - controls the execution of user programs and operation of I/O devices. Kernel - the one program running at all times (all else being application programs). Operating System - a program that acts as an intermediary between a user of a computer and the computer hardware. Resource Allocator - manages and allocates resources. Control Program - controls the execution of user programs and operation of I/O devices. Kernel - the one program running at all times (all else being application programs).

O/S Design Goals An Operating System (O/S for short) provides the following: 1. A run time programming interface for applications. 2. Resource management. An Operating System (O/S for short) provides the following: 1. A run time programming interface for applications. 2. Resource management.

O/S Design goals include: 1. Convenience - Reduce Complexity for programmers/ users. 2. Efficiency - Allow “efficient” access to system resources. 3. Flexibility - Adding new features should be easy. O/S Design goals include: 1. Convenience - Reduce Complexity for programmers/ users. 2. Efficiency - Allow “efficient” access to system resources. 3. Flexibility - Adding new features should be easy.

What is not an O/S 1. Programming Language Compilers - Translators 2. Interpreter - Shell/ User Interface 3. Library - A set of commands/ utilities These features are typically provided as part of the O/S but are strictly speaking not the O/S. 1. Programming Language Compilers - Translators 2. Interpreter - Shell/ User Interface 3. Library - A set of commands/ utilities These features are typically provided as part of the O/S but are strictly speaking not the O/S.

Computer Architecture The following layers of abstraction are used (from highest to lowest): 1. Applications Software - Custom programs to support users. 2. Systems Software - Controls the hardware. 3. Hardware - The physical control of the system (signals). The following layers of abstraction are used (from highest to lowest): 1. Applications Software - Custom programs to support users. 2. Systems Software - Controls the hardware. 3. Hardware - The physical control of the system (signals).

Application Software Systems Software Hardware Figure 1: Computer Systems Architecture

O/S Services Some O/S services for users are: 1. Program execution - Read program into memory/ run it return control when done. 2. Peripheral Access - I/O device driver interface. 3. Persistent Object Management- File system structure. 4. Security - File System, Network. Some O/S services for users are: 1. Program execution - Read program into memory/ run it return control when done. 2. Peripheral Access - I/O device driver interface. 3. Persistent Object Management- File system structure. 4. Security - File System, Network.

5. Error Detection/ Handling - Hardware failure, program errors. 6. Program Creation Tools - Debugging/ text editing etc. 7. Accounting - Billing for computer access 5. Error Detection/ Handling - Hardware failure, program errors. 6. Program Creation Tools - Debugging/ text editing etc. 7. Accounting - Billing for computer access Other O/S Services

O/S Resource Management O/S controls are intrusive because they both consume the resources which they seek to control and mediate conflicting requests.

Resource Attributes Resources have properties governing their use including: 1. Preemption - How expensive is it for the device/ resource? 2. Renewability - Does the resource get replenished? 3. Scheduling - Does order of allocation matter? 4. Persistence - Does it’s lifetime extend beyond that of the process which creates it? 5. Sharing - Is it suited to be accessed by many users? Resources have properties governing their use including: 1. Preemption - How expensive is it for the device/ resource? 2. Renewability - Does the resource get replenished? 3. Scheduling - Does order of allocation matter? 4. Persistence - Does it’s lifetime extend beyond that of the process which creates it? 5. Sharing - Is it suited to be accessed by many users?

Scheduling/ Allocation Policy The scheduled allocation of resources reflects policies including: 1. Fairness 2. Starvation Freedom 3. Maximum Throughput 4. Maximum Utilization 5. Minimize Response time. The scheduled allocation of resources reflects policies including: 1. Fairness 2. Starvation Freedom 3. Maximum Throughput 4. Maximum Utilization 5. Minimize Response time.

O/S Achievements Denning's list of conceptual breakthroughs (1980): Processes --- A program in execution Memory Management Information protection and security Scheduling and resource management System Structure Denning's list of conceptual breakthroughs (1980): Processes --- A program in execution Memory Management Information protection and security Scheduling and resource management System Structure

A Traditional Hardware Architecture The traditional von Neumann structure consists of: 1) Processor - Also called the CPU (Central Processing Unit) our example has the registers: PC --- Program Counter IR --- Instruction Register MAR --- Memory Address Register MBR --- Memory Buffer Register I/O AR --- I/O Address Register I/O BR --- I/O Buffer Register The traditional von Neumann structure consists of: 1) Processor - Also called the CPU (Central Processing Unit) our example has the registers: PC --- Program Counter IR --- Instruction Register MAR --- Memory Address Register MBR --- Memory Buffer Register I/O AR --- I/O Address Register I/O BR --- I/O Buffer Register

2) Memory --- (Volatile) 3) Peripherals --- I/O Devices 4) Systems Interconnection --- Links the Other Components (Bus) 2) Memory --- (Volatile) 3) Peripherals --- I/O Devices 4) Systems Interconnection --- Links the Other Components (Bus) A Traditional Hardware Architecture (Continued)

Figure 2: von Neumann Architecture Figure 2: von Neumann Architecture

The register structure comes from Stallings; the names mean: 1) PC --- Program Counter --- Address of next instruction 2) IR --- Instruction Register --- Current OpCode to execute 3) MAR --- Memory Address Register --- Memory Pointer 4) MBR --- Memory Buffer Register --- Buffer for memory access 5) I/O AR --- I/O Address Register --- I/O Pointer 6) I/O BR --- I/O Buffer Register --- Buffer for I/O access User registers are not shown here. The register structure comes from Stallings; the names mean: 1) PC --- Program Counter --- Address of next instruction 2) IR --- Instruction Register --- Current OpCode to execute 3) MAR --- Memory Address Register --- Memory Pointer 4) MBR --- Memory Buffer Register --- Buffer for memory access 5) I/O AR --- I/O Address Register --- I/O Pointer 6) I/O BR --- I/O Buffer Register --- Buffer for I/O access User registers are not shown here.

Process Context The context of a process consists of: 1) The Current Instruction Pointer (the IP) 2) Register Contents 3) Memory used by that process This is the machine's current state used to determine the machines next state when running a particular program. The context of a process consists of: 1) The Current Instruction Pointer (the IP) 2) Register Contents 3) Memory used by that process This is the machine's current state used to determine the machines next state when running a particular program.

The Model of Execution Traditionally called the fetch/ execute cycle, in its simplest form: (figure 3)

Time- Sharing Systems- Interactive Computing The CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job only if the job is in memory). A job is swapped in and out of memory to the disk. On-line communication between the user and the system is provided; when the operating system finishes the execution of one command, it seeks the next “control statement” not from a card reader, but rather from the user’s keyboard. On line file system must be available for users to access data and code. Time- Sharing Systems- Interactive Computing The CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job only if the job is in memory). A job is swapped in and out of memory to the disk. On-line communication between the user and the system is provided; when the operating system finishes the execution of one command, it seeks the next “control statement” not from a card reader, but rather from the user’s keyboard. On line file system must be available for users to access data and code.

Motivation for Interrupts An interrupt is an external asynchronous event changing the flow of control of a process (my definition). It is also refers to triggering such an event The Problem Peripherals tend to have slow response time (especially if waiting on human supplied input). Motivation for Interrupts An interrupt is an external asynchronous event changing the flow of control of a process (my definition). It is also refers to triggering such an event The Problem Peripherals tend to have slow response time (especially if waiting on human supplied input).

The Solution To improve CPU utilization we want to allow the CPU to continue to execute while awaiting I/O as seen in Figure. When an interrupt is detected an interrupt handling routine is typically invoked. There are times (such as interrupt processing) where it may be desirable to disallow further interrupts. The Solution To improve CPU utilization we want to allow the CPU to continue to execute while awaiting I/O as seen in Figure. When an interrupt is detected an interrupt handling routine is typically invoked. There are times (such as interrupt processing) where it may be desirable to disallow further interrupts.

Interrupting the Fetch/Execute Cycle The fetch/ execute cycle is adjusted to support interrupts. (figure 4) The fetch/ execute cycle is adjusted to support interrupts. (figure 4)

Interrupt Processing Processing an interrupt on most architectures involves the following steps: 1. Finish the current instruction 2. Push the IP on the stack 3. Set the IP to the interrupt handler's address. 4. Preserve the process context (i.e. push registers). 5. Executing the interrupt handling routine. 6. Restore the process context (i.e. pop registers). 7. Pop the IP from the stack Interrupt Processing Processing an interrupt on most architectures involves the following steps: 1. Finish the current instruction 2. Push the IP on the stack 3. Set the IP to the interrupt handler's address. 4. Preserve the process context (i.e. push registers). 5. Executing the interrupt handling routine. 6. Restore the process context (i.e. pop registers). 7. Pop the IP from the stack