Chapter 2: OS Overview



Similar documents
Operating Systems 4 th Class

OPERATING SYSTEM OVERVIEW

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Chapter 3. Operating Systems

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Operating System Components

Operating System Structures

ELEC 377. Operating Systems. Week 1 Class 3

Process Description and Control william stallings, maurizio pizzonia - sistemi operativi

Components of a Computer System

Operating system Dr. Shroouq J.

CHAPTER 15: Operating Systems: An Overview

System Structures. Services Interface Structure

Introduction. What is an Operating System?

Chapter 1 FUNDAMENTALS OF OPERATING SYSTEM

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

OPERATING SYSTEM SERVICES

Types Of Operating Systems

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Chapter 3: Operating-System Structures. Common System Components

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

CS0206 OPERATING SYSTEMS Prerequisite CS0201, CS0203

Operating Systems, 6 th ed. Test Bank Chapter 7

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management.

Overview and History of Operating Systems

Operating Systems Lecture #6: Process Management

Operating System Tutorial

Chapter 3: Operating Systems

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Chapter 1: Introduction. What is an Operating System?

CS161: Operating Systems

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

Origins of Operating Systems OS/360. Martin Grund HPI

This tutorial will take you through step by step approach while learning Operating System concepts.

Chapter 6, The Operating System Machine Level

Operating System Components and Services

Outline: Operating Systems

How To Understand The History Of An Operating System

OPERATING SYSTEMS SCHEDULING

Convenience: An OS makes a computer more convenient to use. Efficiency: An OS allows the computer system resources to be used in an efficient manner.

Chapter 1 Computer System Overview

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1

Chapter 3 Operating-System Structures

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Operating Systems: Basic Concepts and History

theguard! ApplicationManager System Windows Data Collector

Operating System Organization. Purpose of an OS

Chapter 7 Memory Management

Chapter 5 Process Scheduling

OPERATING SYSTEM INDEX

Linux Process Scheduling Policy

Operating Systems. Rafael Ramirez (T, S)

CPU Scheduling Outline

Overview of Operating Systems Instructor: Dr. Tongping Liu

General Objectives: On completion of this course the student should be able to:

Principles of Operating Systems CS 446/646

First-class User Level Threads

Operating Systems Concepts: Chapter 7: Scheduling Strategies

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

1. Computer System Structure and Components

Contents. Chapter 1. Introduction

Computers: Tools for an Information Age

SYSTEM ecos Embedded Configurable Operating System


Operating Systems PART -A

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

CPU Scheduling. Core Definitions

Chapter 13 Embedded Operating Systems

Chapter 2 System Structures

Lecture 1 Operating System Overview

CPS221 Lecture: Operating System Structure; Virtual Machines

Star System Deitel & Associates, Inc. All rights reserved.

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

Chapter 11 I/O Management and Disk Scheduling

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

Real Time Programming: Concepts

Resource Containers: A new facility for resource management in server systems

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

Real-Time Scheduling 1 / 39

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Process Scheduling. Process Scheduler. Chapter 7. Context Switch. Scheduler. Selection Strategies

Components of a Computing System. What is an Operating System? Resources. Abstract Resources. Goals of an OS. System Software

CS414 SP 2007 Assignment 1

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

How To Understand And Understand An Operating System In C Programming

Why Threads Are A Bad Idea (for most purposes)

Operating System Structures

Efficiency of Batch Operating Systems

Example of Standard API

Scaling Networking Applications to Multiple Cores

W4118 Operating Systems. Instructor: Junfeng Yang

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Operating Systems. III. Scheduling.

Transcription:

Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system: programs - use memory, use CPU time, use I/O devices human users programmers - use program development tools such as debuggers, editors end users - use application programs, e.g. Internet explorer b. computer system = hardware + software OS is a part of the computer software, it is a program. It is a very special program, that is the first to be executed when the computer is switched on, and is supposed to control and support the execution of other programs and the overall usage of the computer system. c. control The operating system controls the usage of the computer resources - hardware devices and software utilities. We can think of an operating system as a Resource Manager. Here are some of the resources managed by the OS: Processors, Main memory, Secondary Memory, Peripheral devices, Information. d. support The operating system provides a number of services to assist the users of the computer system: For the programmers: Utilities - debuggers, editors, file management, etc. For the end users - provides the interface to the application programs For programs - loads instructions and data into memory, prepares I/O devises for usage, handles interrupts and error conditions. The hierarchical view of the computer system illustrates how the operating system interacts with the users of the computer system: 1

Main Objectives in OS design: Convenience makes computer user friendly. Efficiency- allows computer to use resources efficiently. Ability to evolve- constructed in a way to permit effective development, testing and introduction of new functions without interfering with service. 2. Evolution of Operating Systems Serial Processing - 1940 s 1950 s programmer interacted directly with hardware. No operating system. problems Scheduling - users sign up for machine time. Wasted computing time Setup Time- Setup included loading the compiler, source program, saving compiled program, and loading and linking. If an error occurred - start over. 2

Simple Batch Systems Improve the utilization of computers. Jobs were submitted on cards or tape to an operator who batches jobs together sequentially. The program that controls the execution of the jobs was called monitor - a simple version of an operating system. The interface to the monitor was accomplished through Job Control Language (JCL). For example, a JCL request could be to run the compiler for a particular programming language, then to link and load the program, then to run the user program. Hardware features: Memory protection: do not allow the memory area containing the monitor to be altered Timer: prevents a job from monopolizing the system Problems: Bad utilization of CPU time - the processor stays idle while I/O devices are in use. Multiprogrammed Batch Systems More than one program resides in the main memory. While a program A uses an I/O device the processor does not stay idle, instead it runs another program B. 3

New features: Memory management - to have several jobs ready to run, they must be kept in main memory Job scheduling - the processor must decide which program to run. Time-Sharing Systems Multiprogramming systems : several programs use the computer system Time-sharing systems : several (human) users use the computer system interactively. Characteristics: Using multiprogramming to handle multiple interactive jobs Processor s time is shared among multiple users Multiple users simultaneously access the system through terminals Batch Multiprogramming Time Sharing Principal objective Maximize processor use Minimize response time Source of directives to operating system Job control language commands provided with the job Commands entered at the terminal Time sharing is multiprogramming. The key differences between time-sharing systems and batch multiprogramming systems are given in the table above. 3. Major Achievements Five major theoretical advances in development Processes Memory Management Information protection and security Scheduling and resource management System structure 4

3.1. Processes What is a process? A program in execution An instance of a program running on a computer The entity that can be assigned to and executed on a processor A unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources Difficulties with designing system software: Improper Synchronization: results from an improper design of a signaling mechanism can result in duplicate signals, or lost signals. Failed Mutual Exclusion: two programs attempt to modify shared piece of data. Nondeterministic program operation: a program may change the contents of memory used by another program, and in this way affect unpredictably the operation of the other program. Deadlock: each program is waiting for the other program to release its resource Solution to these problems: use the concept of a process that consists of An executable program Associated data needed by the program Execution context of the program: The entire state of the process at any instant is contained in its context. All information the operating system needs to manage the process: Contents of process registers Information about priority of the process Whether the process is waiting for an I/O event etc 5

3.2. Memory Management Responsibilities of OS Process isolation - prevent independent processes from interfering with each other Automatic allocation and management - transparent to the programmer Support of modular programming Protection and access control Long-Term Storage The above requirements are satisfied by means of virtual memory and file system facilities 6

Virtual memory and paging Allows programmers to address memory from a logical point of view Allows process to be comprised of a number of fixed-size blocks, called pages Virtual address is a page number and an offset within the page Each page may be located anywhere in main memory Dynamic mapping between the virtual address used in the program and the real address in main memory File system Implements long-term store Information stored in named objects called files 3.3. Information protection and security Controlling access to computer systems and the information stored in them Availability: Concerned with protecting the system against interruption. Confidentiality: Assures that users cannot read data for which access is unauthorized. Data integrity: Protection of data from unauthorized modification. Authenticity: Concerned with the proper verification of the identity of users. 3.4. Scheduling and resource management Factors to be considered: Fairness- give equal and fair access to all jobs of the same class Differential Responsiveness- discriminate between different classes of jobs. Efficiency- maximize throughput, minimize response time and accommodate as many users as possible. The major elements of the operating system involved in scheduling and resource management in a multiprogramming environment are depicted in Figure 2.11 I/O queues: processes waiting for I/O devices ( a queue is associated with each I/O device) Short-term queue: a list of processes whose execution has been started. They reside in main memory. Round-robin technique: give each process some time in turn. Long-term queue: a list of new jobs waiting to be started. How does it work? Assume that a process is running. The following events transfer the control from the process to the OS Service call from the process - the process explicitly invokes some of the OS services, e.g. I/O operations. Interrupt from the process, e.g. exception handling Timer interrupt - the time slice for the process is over 7

I/O interrupt - an I/O device reports its status to the OS. In each case the corresponding handler is invoked, and then the short-term scheduler picks up the next process to be run. 8

4. Characteristics of Modern Operating Systems Microkernel architecture-assigns only a few essential functions to the kernel, including address spaces, interprocess communication, and basic scheduling. Multithreading- the process is divided into threads that can run simultaneously Thread- dispatchable unit of work. It includes a processor context program counter and stack pointer and its own data storage for the stack. It executes sequentially and is interruptable Process- collection of one or more threads and associated system resources. Symmetric multiprocessing- stand-alone computer with multiple processors that share the same memory and I/O facilities connected by a communication bus. All processors can perform the same functions 9

Distributed operating systems - provide the illusion of a single main memory and single secondary memory space. Used for distributed file system Object-oriented design - used for adding modular extensions to a small kernel. Enables programmers to customize an operating system without disrupting system integrity 10

Exam-like questions: 1. Compare batch multiprogramming systems and time-sharing systems. Discuss their similarities and differences. 2. How is a process defined? 3. Discuss the difficulties in early OS that motivated the use of processes in OS design. 4. Describe briefly virtual memory and paging techniques for memory management. 5. Describe briefly how the resource scheduling works. 6. List and describe briefly four of the characteristics of modern operating systems 11