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



Similar documents
Chapter 2: OS Overview

Outline: Operating Systems

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 Structures

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

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Operating Systems 4 th Class

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

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

Virtual vs Physical Addresses

Operating Systems, 6 th ed. Test Bank Chapter 7

Operating System Software

CHAPTER 15: Operating Systems: An Overview

CS0206 OPERATING SYSTEMS Prerequisite CS0201, CS0203

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

Operating System Tutorial

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

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

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

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

Multi-core Programming System Overview

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

OPERATING SYSTEMS STRUCTURES

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

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Chapter 3. Operating Systems

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

Devices and Device Controllers

Operating System Components

The Real-Time Operating System ucos-ii

Introduction to the NI Real-Time Hypervisor

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

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

Chapter 3 Operating-System Structures

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

CPU Scheduling. Core Definitions

Embedded Systems. 6. Real-Time Operating Systems

Processor Scheduling. Queues Recall OS maintains various queues

Computers: Tools for an Information Age

theguard! ApplicationManager System Windows Data Collector

Operating Systems. III. Scheduling.

Special FEATURE. By Heinrich Munz

Operating Systems. Notice that, before you can run programs that you write in JavaScript, you need to jump through a few hoops first

SYSTEM ecos Embedded Configurable Operating System

OPERATING SYSTEMS SCHEDULING

Chapter 7 Memory Management

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

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

Security Overview of the Integrity Virtual Machines Architecture

CS420: Operating Systems OS Services & System Calls

Operating Systems. Lecture 03. February 11, 2013

Networking Operating Systems (CO32010)

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Operating Systems Overview

CPU Scheduling Outline

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

Comp 204: Computer Systems and Their Implementation. Lecture 12: Scheduling Algorithms cont d

Chapter 5 Cloud Resource Virtualization

OS Concepts and structure

The Microsoft Windows Hypervisor High Level Architecture

features at a glance

Operating Systems Lecture #6: Process Management

OPERATING SYSTEM OVERVIEW

Introduction. What is an Operating System?

CS161: Operating Systems

Overview of Operating Systems Instructor: Dr. Tongping Liu

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

I/O. Input/Output. Types of devices. Interface. Computer hardware

Operating Systems. 05. Threads. Paul Krzyzanowski. Rutgers University. Spring 2015

OPERATING SYSTEM - VIRTUAL MEMORY

CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont.

Chapter 3: Operating-System Structures. Common System Components

Operating System Structures

Origins of Operating Systems OS/360. Martin Grund HPI

Chapter 14 MS-DOS Operating System

Operating Systems CSE 410, Spring File Management. Stephen Wagner Michigan State University

REAL TIME OPERATING SYSTEMS. Lesson-10:

Memory unit sees only the addresses, and not how they are generated (instruction counter, indexing, direct)

Chapter 12 File Management

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

Chapter 6, The Operating System Machine Level

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

Intel DPDK Boosts Server Appliance Performance White Paper

Full and Para Virtualization

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

Why Threads Are A Bad Idea (for most purposes)

Computer-System Architecture

CPU Scheduling. CPU Scheduling

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Weighted Total Mark. Weighted Exam Mark

Red Hat Linux Internals

ò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking?

Virtualization for Cloud Computing

Transcription:

Lecture Outline Operating Systems Objectives Describe the functions and layers of an operating system List the resources allocated by the operating system and describe the allocation process Explain how an operating system manages processes and threads Compare CPU scheduling methods Explain how an operating system manages memory Operating System Overview Important part of all information systems Manages all hardware resources and allocates them to users and applications as needed Accesses files and directories, creates and moves windows, and accesses resources over a network Operating System Functions Functions are divided into five main groups Resource allocation: Ensure that overall system objectives are achieved efficiently and effectively Bridge between users, their processes, and the hardware resources used by these processes. Operating System Hardware Interface (device drivers) Interrupt Processing Resource Allocation Services (service layer) Users and Security CPU Timer Scheduling Process/thread Account Primary storage Page fault and protection Virtual memory Interprocess communications Authentication Secondary storage Storage device Storage I/O control File/folder Authorization I/O devices I/O device Interactive and network I/O Network Console and GUI Page 1 of 5

Operating System Layers Using layers makes the OS easier to maintain Command layer (shell) Command language or job control language (JCL) Service layer Service call Kernel Resource Allocation Single-tasking and multitasking Resource allocation tasks Real and virtual resources Single-Tasking Resource Allocation Involves only two running programs Application OS (grants the application all unused hardware resources) Single-tasking operating systems are small and efficient There s only one active program Multitasking Resource Allocation Norm for modern general-purpose computers Allows flexibility of application and system software Resource allocation goals Meet resource needs of each program Prevent programs from interfering with one another Efficiently use hardware and other resources Resource Allocation Tasks Keep detailed records of available resources; know which resources can satisfy which requests Schedule resources based on specific allocation policies Update records to reflect resource commitment and release by programs and users Real and Virtual Resources Real resources Physical devices and associated system software Virtual resources Resources that are apparent to a process or user Meet or exceed real resources by: Rapidly shifting resources unused by one program to other programs that need them Substituting one type of resource for another Process Management Process Unit of executing software managed independently by OS Can request and receive hardware resources and OS Can be stand-alone or part of a group that cooperates to achieve a common purpose Can communicate with other processes executing on the same computer or on other computers Page 2 of 5

Process Control Data Structures Process control block (PCB) Created, updated, and deleted by OS Used by OS to perform many functions (e.g., resource allocation, secure resource access, protecting active processes from interference with other active processes) Normally organized into a larger data structure (called a linked list, process queue, or process list) Process Control Data Structures (continued) Processes can spawn other processes and communicate with them Parent process Child process Sibling process Process family Threads Portion of a process that can be scheduled and executed independently Can execute concurrently on a single processor or simultaneously on multiple processors Share all resources allocated to parent process Advantage: reduce OS overhead for resource allocation and process Thread control block (TCB) and run queues CPU Allocation OS makes rapid decisions about which threads receive CPU control and for how long that control is retained Threads usually share CPUs (concurrent or interleaved execution) Thread States Ready Waiting for access to the CPU Running Retains control of CPU until the thread or its parent process terminates normally or an interrupt occurs Blocked Waiting for some event to occur (completion of service request or correction of an error condition) Interrupt Processing Thread can be blocked waiting for resources Thread is put into a wait state and its state stored on the stack Some interrupt handler will process the blocked thread s request When the resource has been allocated, thread is moved from block state to ready or running state The thread remains in the blocked state until the request is satisfied or a time out occurs Scheduling Decision-making process used by OS to determine which ready thread moves to the running state Typical methods Preemptive scheduling Priority-based scheduling Real-time scheduling Page 3 of 5

Preemptive Scheduling A thread can be removed involuntarily from the running state Functions of the supervisor (portion of OS that receives control) Calls appropriate interrupt handler Transfers control to the scheduler Functions of the scheduler Updates status of any process or thread affected by last interrupt Decides which thread to dispatch to the CPU Updates thread control information and the stack to reflect the scheduling decision Dispatches selected thread Processing steps on left occur after Thread 1 makes an I/O service call Processing steps on right occur after I/O device completes I/O operation Timer Interrupts Generated at regular intervals by CPU to give scheduler an opportunity to suspend currently executing thread Not a real interrupt No interrupt handler to call Supervisor passes control to the scheduler Important CPU hardware feature for multitasking OSs Priority-Based Scheduling Determines which ready thread should be dispatched to the CPU according to: First come first served (FCFS) Explicit priority Shortest time remaining (STR) Real-Time Scheduling Guarantees minimum amount of CPU time to a thread if the thread makes an explicit realtime scheduling request when it is created Guarantees a thread enough resources to complete its function within a specified time Often used in transaction processing, data acquisition, and automated process control Memory Allocation The assignment of specific memory addresses to system software, application programs, and data OS allocates memory When threads are created; responds to requests for additional memory during a thread s lifetime To itself and for other needs (buffers and caches) Physical Memory Organization Main memory can be regarded as a sequence of contiguous, or adjacent, memory cells Most significant byte Least significant byte Addressable memory Physical memory Page 4 of 5

Single-Tasking Memory Allocation Bulk of OS normally occupies lower memory addresses Application program is loaded immediately above it Contiguous memory allocation Address resolution Process of determining physical memory address that corresponds to memory reference Multitasking Memory Allocation The operating system: Finds free memory regions in which to load new processes and threads Reclaims memory when processes or threads terminate Multitasking Memory Allocation (continued) Goals of multitasking memory allocation Allow as many active processes as possible Respond quickly to changing memory demands of processes Prevent unauthorized changes to a process s memory region(s) Perform memory allocation and addressing as efficiently as possible Memory Fragmentation Occurs when memory partitions allocated to a single process or purpose are scattered throughout physical memory To address the problem Compaction (large overhead) Noncontiguous memory allocation Noncontiguous Memory Allocation Portions of a process can be allocated to free partitions anywhere in memory Uses small fixed-sized partitions More flexible than contiguous memory allocation, but requires more complex partition tables and address calculations Virtual Memory Management Allocates portions of processes (pages) to small memory partitions (page frames) Swaps pages between memory and secondary storage as needed Page hits, page faults, page tables Page files and victims Memory Protection Refers to protecting memory allocated to one program from unauthorized access by another program Prevents errors in one program from generating errors in another Adds overhead to each write operation Memory Management Hardware Complex memory procedures incur substantial overhead Modern CPUs incorporate advanced memory allocation and address resolution functions in hardware (e.g., Intel Pentium) Page 5 of 5