GEOMATIKA UNIVERSITY COLLEGE CHAPTER 2 OPERATING SYSTEM PRINCIPLES

Slides:



Advertisements
Similar presentations
1 (Review of Prerequisite Material). Processes are an abstraction of the operation of computers. So, to understand operating systems, one must have a.
Advertisements

Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Computer System Overview
1 Interrupts INPUT/OUTPUT ORGANIZATION: Interrupts CS 147 JOKO SUTOMO.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
OS Organization. OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Concurrency Thread abstraction of.
Operating System Organization
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Interrupts Signal that causes the CPU to alter its normal flow on instruction execution ◦ frees CPU from waiting for events ◦ provides control for external.
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.
Operating Systems CS3502 Fall 2014 Dr. Jose M. Garrido
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
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.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
CSC 2405 Computer Systems II Exceptions Mini-Lecture Traps & Interrupts.
بسم الله الرحمن الرحيم MEMORY AND I/O.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Networked Embedded Systems Pengyu Zhang & Sachin Katti EE107 Spring 2016 Lecture 4 Timers and Interrupts.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Computer Organization and Architecture + Networks Lecture 6 Input/Output.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Introduction to Operating Systems Concepts
Chapter 1: Introduction to Computers and Programming
Computer System Structures Interrupts
Computer Architecture and Number Systems
OPERATING SYSTEM CONCEPT AND PRACTISE
Computer Science II Chapter 1.
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Resource Management IB Computer Science.
Exceptional Control Flow
OPERATING SYSTEMS CS3502 Fall 2017
Operating Systems (CS 340 D)
CS 3305 System Calls Lecture 7.
Exceptional Control Flow
Introduction to Operating System (OS)
CS 286 Computer Organization and Architecture
CS703 - Advanced Operating Systems
Quick Introduction to OS
08/28/06 parts of the computer.
BIC 10503: COMPUTER ARCHITECTURE
Computer Science I CSC 135.
Operating Systems Chapter 5: Input/Output Management
Chapter 5: Computer Systems Organization
Lecture Topics: 11/1 General Operating System Concepts Processes
Five Key Computer Components
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Operating Systems: A Modern Perspective, Chapter 3
Wireless Embedded Systems
Computer System Overview
Instructor: Xiuwen Liu Department of Computer Science
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.
COMP3221: Microprocessors and Embedded Systems
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
08/28/06 parts of the computer.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

GEOMATIKA UNIVERSITY COLLEGE CHAPTER 2 OPERATING SYSTEM PRINCIPLES Your company information DOOD 330/OPS 330 OPERATING SYSTEM CHAPTER 2 OPERATING SYSTEM PRINCIPLES

Outline Abstractions, processes and resources Concepts of Application Program Interfaces (APIs) Interrupts Device organization

Abstractions, processes and resources Coordinate Use of the Abstractions The Abstractions Processes Create the Abstractions

OS Requirements Provide resource abstractions: Process abstraction of CPU/memory use Address space Thread abstraction of CPU within address space Resource abstraction “Anything a process can request that can block the process if it is unavailable” NT uses “object abstraction” to reference resources File abstraction of secondary storage use

OS Requirements (Cont.) Manage resource sharing Time/space-multiplexing Exclusive use of a resource Isolation Managed sharing

Abstraction & Sharing Program State Process Program State Process Libraries Program State Process OS Services Abstraction Manage sharing ROM Routines Processor(s) Main Memory Devices

Performance The OS is an overhead function  should not use too much of machine’s resources Minimum functionality is to implement abstractions Additional function must be traded off against performance DOS: one process UNIX: low level file system

Process, Thread, and Resource Management Abstraction Process Abstraction Generic Resource Manager Multiprogramming Other … Primary Memory Abstract Resources Processor

API’s An Application Programming Interface (API) is a set of commands, functions and protocols which programmers can use when building a software. It allows the programmers to use predefined functions to interact with systems, instead of writing them from scratch. Characteristics of good API Easy to learn and use, Hard to misuse. Easy to read and maintain code that uses it. Is programming language neutral. Sufficiently powerful to support all computational requirements.

Diagram Of Application Programming Interface (API) API’s (Cont.) Diagram Of Application Programming Interface (API)

API’s (Cont.) It allows a user to access wordnet database and to create wordnet tools without the knowledge of the underlying database design. The API is object-oriented design. The API is designed in such a way that it supports single/ multiple languages. The API is designed in two layers: Application layer Database layer

Interrupts An event external to the currently executing process that causes a change in the normal flow of instruction execution Usually generated by hardware devices external to the CPU

Why Interrupts? People like connecting devices A computer is much more than the CPU • Keyboard, mouse, screen, disk drives • Scanner, printer, sound card, camera, etc. These devices occasionally need CPU service External events typically occur on a macroscopic timescale

Possible Solution: Polling CPU periodically checks each device to see if it needs service - takes CPU time even when no requests pending - overhead may be reduced at expense of response time - can be efficient if events arrive rapidly “Polling is like picking up your phone every few seconds to see if you have a call. …”

Alternative: Interrupts Give each device a wire (interrupt line) that it can use to signal the processor • When interrupt signalled, processor executes a routine called an interrupt handler to deal with the interrupt • No overhead when no requests pending

Polling vs. Interrupts “Polling is like picking up your phone every few seconds to see if you have a call. Interrupts are like waiting for the phone to ring.” • Interrupts win if processor has other work to do and event response time is not critical • Polling can be better if processor has to respond to an event ASAP

Types of Interrupts There are three types of interrupts, each with several different uses: External Interrupts Internal Interrupts Software Interrupts Procedures for processing all types of interrupts are almost identical

External Interrupts Used by CPU to interact with input/output devices; e.g. the CPU requests a data transfer and in input device asserts an interrupt when it is ready. Improve system performance by allowing the CPU to execute instructions. Also used to initiate transfers.

Internal Interrupts Occurs entirely within the CPU Used to handle exception that occur during the execution of valid instructions; e.g: Divide by zero exception Arithmetic overflow Page faults Invalid instruction codes

Software Interrupts Generated by specific interrupt instructions in the CPU’s instruction set. These interrupt act like subroutine call statements except they always go to a specific address.

Computer Organization The components from which computers are built, i.e., computer organization. In contrast, computer architecture is the science of integrating those components to achieve a level of functionality and performance. Example: It is as if computer organization examines the lumber, bricks, nails, and other building material While computer architecture looks at the design of the house.

Basic Terminology

Basic Terminology (Cont.)