Introduction.

Slides:



Advertisements
Similar presentations
What is an Operating System?
Advertisements

CMSC 421: Principles of Operating Systems Section 0202 Instructor: Dipanjan Chakraborty Office: ITE 374
Chapter 1: Introduction
Slide 1-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 1.
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.
Slide 1-1 Computer Systems II Gordon College Operating System Overview.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Introduction. Why Study OS? Understand model of operation –Easier to see how to use the system –Enables you to write efficient code Learn to design an.
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.
Slide 1-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 1.
 Understand model of operation  Easier to see how to use the system  Enables you to write efficient code  Learn to design an OS  Even so, OS is pure.
Slide 1-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 1.
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) [ 原书信息 ] 【原出版社】
Introduction to Basic OS Concepts. Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems.
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  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
 H.M.BILAL Operating System Concepts.  What is an Operating System?  Mainframe Systems  Desktop Systems  Multiprocessor Systems  Distributed Systems.
المحاضرة الاولى Operating Systems. The general objectives of this decision explain the concepts and the importance of operating systems and development.
Operating System Concepts Chapter One: Introduction What is an operating system? Simple Batch Systems Multiprogramming Systems Time-Sharing Systems Personal-Computer.
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.
Chapter 1: Introduction
Operating System. Chapter 1: 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.1 Sandeep TayalCSE Department MAIT 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming Batched Systems Time-Sharing Systems.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Multiprocessor Systems Distributed.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
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.
CMPS Operating Systems Prof. Scott Brandt Computer Science Department University of California, Santa Cruz.
Applied Operating System Concepts
Chapter 1: Introduction
Chapter 1: Introduction
Introduction to Basic OS Concepts
Operating Systems Lecture 2.
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Introduction to Operating System (OS)
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
חוברת שקפים להרצאות של ד"ר יאיר ויסמן מבוססת על אתר האינטרנט:
Outline Introduction to Operating Systems Using the Operating Systems
Operating System Concepts
Chapter 1: Introduction
Operating Systems Lecture 2.
Introduction to Operating Systems
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Introduction to Operating Systems
Subject Name: Operating System Concepts Subject Number:
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Introduction.
Operating Systems: A Modern Perspective, Chapter 1
Chapter 1: Introduction
Instructor: Xiuwen Liu Department of Computer Science
Chapter 1: Introduction
Operating System Concepts
Chapter 1: Introduction
Presentation transcript:

Introduction

Why Study OS? Understand model of operation Learn to design an OS Easier to see how to use the system Enables you to write efficient code Learn to design an OS Even so, OS is pure overhead of real work Application programs have the real value to person who buys the computer

System Overview A computer system consists of hardware and software that are combined to provide a tool to solve specific problems Hardware includes CPU, memory, disks, printers, screen, keyboard, mouse ... Software includes System software A general environment to create specific applications Application software A tool to solve a specific problem

Perspectives of the Computer cut malloc() print open() read-disk start-printer send save fork() track-mouse Application Software Application Software Application Software System Software System Software System Software Hardware Hardware Hardware End User View (b) Application Programmer View (c) OS Programmer View

System Software (“Middleware”) Independent of applications, but common to all Examples C library functions A window system A database management system Resource management functions

Purpose of an OS (What is Resource Management?) Process: An executing program Resource: Anything that is needed for a process to run Memory Space on a disk The CPU “An OS creates resource abstractions” “An OS manages resource sharing”

Abstract Resources User Interface Application Abstract Resources (API) Middleware OS Resources (OS Interface) OS Hardware Resources

Hardware Resources Processor: execute instructions Memory: store programs and data Input/output (I/O)controllers: transfer to and from devices Disk devices: long-term storage Other devices: conversion between internal and external data representations

Hardware Resources – cont.

Hardware Interface – cont. Everything that a programmer needs to know in order to write programs that perform desired operation on the hardware Disk drive is an example Disk interface provides functions to move disk head, transfer data Monitor Monitor interface provides functions to move the cursor, display characters/graphics

Software Classification System software Provides a general programming environment in which programmers can create specific applications Application software Intended to solve a specific problem

Software Classification - continued Loader OS Database Management System Window Application Programmer System Software Libraries Compiler Hardware Command Line Interpreter Software API

What is an Operating System? The operating system is the part of the system software that manages the use of the hardware used by other system software and all application software It is the system program that acts between the hardware and the user programs

What is an Operating System? - continued It provides services to user programs Through system calls / message passing File system services Memory services I/O services It hides hardware from user programs When your program shows a message on the monitor, it does not need to know the details When your program generates a new file, it does not need to know where the free space is on your hard drive

Differences between OS and System Software Major differences between OS and general system software General system software relies on the abstractions provided by OS OS abstracts the hardware directly OS provides the fundamental trusted mechanisms for resource sharing A general purpose OS is domain-independent

Operating System Functions Resource manager manage hardware and software resources Resource abstraction and sharing A nicer environment implement a virtual machine for processes to run in A program in execution is called a process a nicer environment than the bare hardware

Resource Management Functions Transform physical resources to logical resources Resource abstraction Make the hardware resources easier to use Multiplex one physical resource to several logical resources Create multiple, logical copies of resources Schedule physical and logical resources Decide who gets to use the resources

Resource Abstraction Provides an abstract model of the operation of hardware components Like data abstraction in Object-Oriented programming Interface functions Internal functions and status Eliminates the tedious details that a programmer would otherwise have to handle

A Disk Device Abstraction Three interface functions load(block, length, device) Copies block of memory to device buffer seek(device, track) Positions read/write head out(device, sector) Writes the data to disk sector

A Disk Device Abstraction – cont. An abstract function for writing a block of memory to disk write(char *block, int len, int device, int track, int sector) { ... load(block, length, device); seek(device, track); out(device, sector); }

A Disk Device Abstraction – cont. load(…); seek(…); out(…); void write() { seek(…) out(…) } int fprintf(…) { ... write(…) … (a) Direct Control (b) write() abstraction (c) fprintf() Application Programmer OS Programmer

Resource Abstraction – cont. The dark side … While simplifying the way application programmers can control hardware, abstraction can limit the flexibility by which specific hardware can be manipulated Certain operations may be impossible to achieve using the abstraction

Resource Sharing Concurrent execution Parallel execution Two or more processes appear to be (or actually are) executing at the same time Parallel execution Two or more processing actually executing simultaneously Processes which are concurrent, or parallel, must share the computer

… … … Abstract Machines Abstract Machines Idea Program Result Physical

Resource Sharing Two types of sharing Time multiplexed sharing time-sharing schedule a serially-reusable resource among several users Space multiplexed sharing space-sharing divide a multiple-use resource up among several users

Resource Sharing To control sharing, must be able to isolate resources OS usually provides mechanism to isolate, then selectively allows sharing How to isolate resources How to be sure that sharing is acceptable Concurrency

The OS as a Conductor The OS coordinates the sharing and use of all the components in the computer

Multiprogramming … … Abstract Machine Pi Abstract Machine Pj Abstract Machine Pk … OS Resource Sharing Pi Memory Pk Memory … Pj Memory Time-multiplexed Physical Processor Space-multiplexed Physical Memory

Multiprogramming(2) Technique for sharing the CPU among runnable processes Process may be blocked on I/O Process may be blocked waiting for other resource, including the CPU While one process is blocked, another might be able to run Multiprogramming OS accomplishes CPU sharing “automatically” – scheduling Reduces time to run all processes

How Multiprogramming Works Process 1 Process 2 Process 3 Time-multiplexed CPU Process 4 Space-multiplexed Memory

Speeding Up the Car Wash Vacuum Inside Wash Dry (a) The Sequential Car Wash Vacuum Inside Wash Dry (b) The Parallel Car Wash

Time-multiplexing the Processor - Resulted in concurrent execution or concurrency

Time-multiplexing the Processor – cont. Using the processor I/O operation / paused ti Pi’s Total Execution Time, ti (a) Pi’s Use of Machine Resources P1 P2 Pi PN … (b) All Processes’ Use of Machine Resources Improves performance

Space-multiplexing Memory

Time-multiplexing I/O Devices

Space-multiplexing the Disk

Issues in Resource Sharing Resource isolation and sharing Protection Prevent unauthorized access of resources by one process when they are currently allocated to another Sharing Resource allocation Scheduling

Do We Need an OS? Not always But they are very useful When resource abstraction or sharing is not needed Some programs run “stand-alone” Early computers did not have a sophisticated OS OS was evolved along the hardware technology But they are very useful Reusable functions Easier to use than the bare hardware

Operating Systems Strategies Several different strategies have been used Earliest computers were dedicated to a single program and there was no multiprogramming and no OS Batch systems Timesharing systems There are a few other recent strategies Personal computers and workstations Embedded systems Small, communicating computers Network technology

Batch Processing Systems Reduce setup time by batching similar jobs Automatic job sequencing – automatically transfers control from one job to another. First rudimentary operating system. Resident monitor initial control in monitor control transfers to job when job completes control transfers back to monitor

Batch Processing Systems - continued Job 19 Input Spooler Output Spooler Job 3 Input Spool Output Spool

Memory Layout for a Simple Batch System

Batch Processing Uses multiprogramming Job (file of OS commands) prepared offline Batch of jobs given to OS at one time OS processes jobs one-after-the-other No human-computer interaction OS optimizes resource utilization Batch processing (as an option) still used today

Spooling Overlap I/O of one job with computation of another job. While executing one job, the OS Reads next job from card reader into a storage area on the disk (job queue). Outputs printout of previous job from disk to printer. Job pool – data structure that allows the OS to select which job to run next in order to increase CPU utilization

Multi-programmed Batch Systems Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.

OS Features for Multi-programming I/O routine supplied by the system Memory management – the system must allocate the memory to several jobs CPU scheduling – the system must choose among several jobs ready to run Allocation of devices

Time-sharing Systems The goal is to enable users to interact with the computer system Batch processing systems do not allow user interactions 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 system must be available for users to access data and code.

Time-sharing Systems - continued Physical Machine Abstract Machines … Command Result

Timesharing Systems – cont’d Uses multiprogramming Support interactive computing model (Illusion of multiple consoles) Different scheduling & memory allocation strategies than batch Tends to propagate processes Considerable attention to resource isolation (security & protection) Tend to optimize response time

Personal-computer Systems Personal computers – computer system dedicated to a single user. I/O devices – keyboards, mice, display screens, small printers. User convenience and responsiveness. Can adopt technology developed for larger operating system often individuals have sole use of computer and do not need advanced CPU utilization of protection features.

Personal-computer Systems - continued Win32 API Windows CE (Pocket PC) Windows 95/98/Me Windows NT/2000/XP Win32 API Subset Win32 API SubSet

Embedded Systems 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. Well-defined fixed-time constraints. Hard real-time system. Secondary storage limited or absent, data stored in short-term memory, or read-only memory (ROM) Conflicts with time-sharing systems, not supported by general-purpose operating systems. Soft real-time system Limited utility in industrial control or robotics Useful in applications (multimedia, virtual reality) requiring advanced operating-system features.

Parallel systems Multiprocessor systems with more than one CPU in close communication. Tightly coupled system – processors share memory and a clock; communication usually takes place through the shared memory. Advantages of parallel system: Increased throughput Economical Increased reliability graceful degradation fail-soft systems

Distributed Systems Distribute the computation among several physical processors Loosely coupled system – each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines Advantages of distributed systems Resources Sharing Computation speed up – load sharing Reliability Communications

Distributed systems - cont. Network operating system provides file sharing provides communication scheme runs independently from other computers on the network Distributed operating system less autonomy between computers gives the impression there is a single operating system controlling the network.

Migration of Operating-System Concepts and Features

Evolution of Modern OS Timesharing Network OS PC & Wkstation Batch Real-Time Memory Mgmt Protection Scheduling Files Devices System software Human-Computer Interface Client-Server Model Protocols Small Computer Network storage, Resource management