Chapter 8 Operating System Support

Slides:



Advertisements
Similar presentations
CSC 360- Instructor: K. Wu Overview of Operating Systems.
Advertisements

Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
CS 345 Computer System Overview
Lecture 1: History of Operating System
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Memory Management Chapter 4. Memory hierarchy Programmers want a lot of fast, non- volatile memory But, here is what we have:
Memory Design Example. Selecting Memory Chip Selecting SRAM Memory Chip.
Operating System Support Focus on Architecture
Operating System Support Focus on Architecture
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Memory ManagementCS-502 Fall Memory Management CS-502 Operating Systems Fall 2006 (Slides include materials from Operating System Concepts, 7 th.
Chapter 1 and 2 Computer System and Operating System Overview
Computer Organization and Architecture
A. Frank - P. Weisberg Operating Systems Evolution of Operating Systems.
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
Layers and Views of a Computer System Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System.
Computer Organization and Architecture Operating System Support Chapter 8.
Chapter 91 Memory Management Chapter 9   Review of process from source to executable (linking, loading, addressing)   General discussion of memory.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Operating System Overview
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Operating Systems.
Operating Systems.  Operating System Support Operating System Support  OS As User/Computer Interface OS As User/Computer Interface  OS As Resource.
Tutorial 7 Memory Management presented by: Antonio Maiorano Paul Di Marco.
Review of Memory Management, Virtual Memory CS448.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Memory Management – Page 1 of 49CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: Memory Management Reading: Stallings, Sections.
HERY H AZWIR Computer Software. Computer Software Outline Software and Programming Languages  Software  Programming  Programming language development.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
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.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
Memory Management – Page 1 of 49CSCI 4717 – Computer Architecture Memory Management Uni-program – memory split into two parts –One for Operating System.
Chapter 9 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
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.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Chapter 11: Operating System Support Dr Mohamed Menacer Taibah University
CIS250 OPERATING SYSTEMS Chapter One Introduction.
Memory Management Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only storage.
Memory Management – Page 1CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: Memory Management *** Modified – look for Reading:
Copyright Prentice Hall, Inc. 1 Operating System Overview.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Computer Architecture Chapter (8): Operating System Support
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Operating System Overview
Operating Systems Lecture 2.
Applied Operating System Concepts
Chapter 8: Main Memory.
Chapter 8 Operating System Support
William Stallings Computer Organization and Architecture
Introduction to Operating System (OS)
Chapter 1: Intro (excerpt)
William Stallings Computer Organization and Architecture 8th Edition
Operating Systems.
Computer Architecture
William Stallings Computer Organization and Architecture 8th Edition
Chapter 2 Operating System Overview
Presentation transcript:

Chapter 8 Operating System Support Resource management Providing support Scheduling Maximizing use of resources Memory management Partitioning Paging Virtual memory Segmentation

Objectives of Operating System Convenience Making the computer easier to use Efficiency Allowing better use of computer resources Functions: Managing Resources Scheduling Processes (or tasks) Managing Memory

Layers and Views of a Computer System

Operating System Services include Program creation Program execution Access to I/O devices Controlled access to files System access Error detection and response Accounting

O/S as a Resource Manager

Types of Operating System Interactive Batch Single program (Uni-programming) Multi-programming (Multi-tasking) Real-Time

Simple Batch Systems Resident Monitor program Users submit jobs to operator Operator batches jobs Monitor controls sequence of events to process batch When one job is finished, control returns to Monitor which reads next job Monitor handles scheduling

Memory Layout for Resident Monitor

Instructions to Monitor May be denoted by $ e.g. Job Control Language Instructions to Monitor May be denoted by $ e.g. $JOB $FTN ... High Level Language Program (Fortran, COBOL, . . . ) $LOAD $RUN ... Application Data for program $END

Desirable Hardware Features Memory protection To protect the Monitor Timer To prevent a job monopolizing the system Privileged instructions Only executed by Monitor e.g. I/O Interrupts Allows for relinquishing and regaining control

Multi-programmed Batch Systems I/O devices are very slow  Waiting is inefficient use of computer When one program is waiting for I/O, another can use the CPU

Uni-programmed System

Multi-Programming with Three Programs

Sample Program Mix

Utilization: Uni-programmed vs Multi-programmed

Multiprogramming Resource Utilization

Some Types of Systems Uniprogramming - One user at a time uses the computer Time Sharing - Allow users to interact directly with the computer i.e. Interactive Multi-programming - Allows a number of users to interact with the computer

Types of Scheduling

Five State Process Model

Process Control Block

Scheduling Sequence Example

Key Elements of O/S

Process Scheduling

Memory Management Uni-programming Multi-programming Note: Memory size Memory split into two One for Operating System (monitor) One for currently executing program Multi-programming “User” part is sub-divided and shared among active processes Note: Memory size - 16 bits  64K memory addresses - 24 bits  16M memory addresses - 32 bits  4G memory addresses

Swapping Problem: I/O is so slow compared with CPU that even in multi-programming system, CPU can be idle most of the time Solutions: Increase main memory Expensive Swapping

What is Swapping? Long term queue of processes stored on disk Processes “swapped” in as space becomes available As a process completes it is moved out of main memory If none of the processes in memory are ready (i.e. all I/O blocked) Swap out a blocked process to intermediate queue Swap in a ready process or a new process But swapping is an I/O process… Isn’t I/O slow? So why does swapping make sense ?

Use of Swapping

Partitioning Partitioning: May not be equal size Splitting memory into sections to allocate to processes (including Operating System!) Fixed-sized partitions Potentially a lot of wasted memory Variable-sized partitions Process is fitted into smallest hole that it will fit in Dynamic partitions no room for additional memory allocation memory leak – need periodic coalescing, or – need periodic compaction

Fixed Partitioning

Effect of Dynamic Partitioning

Relocation Challenges Can’t expect that process will load into the same place in memory Instructions contain addresses Locations of data Addresses for instructions (branching) Logical address - relative to beginning of program Physical address - actual location in memory (this time) Solution: Use Base Address & Automatic (hardware) conversion