Course Details. Operating Systems with C/C++ Course Details. What is an Operating System?

Similar documents
Operating Systems. Lecture Course in Autumn Term 2015 University of Birmingham. Eike Ritter. September 22, 2015

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

Chapter 1: Introduction

European University of Lefke. Instructor: Dr. Arif SARI

Chapter 1: Introduction

Chapter 1: Introduction. Chapter 1: Introduction

Lecture 1 Introduction (Chapter 1 of Textbook)

7/20/2008. What Operating Systems Do Computer-System Organization

Chapter 1: Introduction

DM510 Operating Systems. Jacob Aae Mikkelsen

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

CS370 Operating Systems

CS370 Operating Systems

CS3600 SYSTEMS AND NETWORKS

Chapter 1: Introduction. Operating System Concepts 8 th Edition,

Chapter 1: Introduction. Operating System Concepts 8th Edition,

CS420: Operating Systems

Chapter 1: Introduction Dr. Ali Fanian. Operating System Concepts 9 th Edit9on

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

CSE Opera+ng System Principles

CS420: Operating Systems

Operating Systems. Overview. Dr Alun Moon. Computing, Engineering and Information Sciences. 27th September 2011

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Chapter 1: Introduction. Operating System Concepts 8th Edition,

Operating System Services

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Introduction to Operating Systems (Part II)

Introduction to Operating Systems

Introduction. TDDI04, K. Arvidsson, IDA, Linköpings universitet Contents. What is an Operating System (OS)?

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

Dinosaurs? & Dinosaur Wars. Outline & Questions. Evolution of our Textbook. Poll? Questions?

Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Dinosaurs? & Dinosaur Wars. CSCI 6730 / 4730 Operating Systems. Questions? Outline & Questions. Poll? Popularity: The OS Market Share

CHAPTER 1 - INTRODUCTION. Jacob Aae Mikk elsen

Operating System Concepts 9 th Edit9on

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Introduction. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

Operating System Review

OPERATING SYSTEMS Lecture Notes. Prepared by K.Rohini, Assistant Professor, CSE Department, GVPCEW.

Chapter 2: Operating-System Structures. Operating System Concepts 8 th Edition

Frederick P. Brooks tar dinosaurs tar tar tar pit

The Lesson Plan of OS. The syllabus of OS. Access the lesson plan and syllabus at

Lecture 1 - Operating System Overview

Module 2: Computer-System Structures. Computer-System Architecture

Introduction. Chapter Prof. Amr El-Kadi

Four Components of a Computer System

Introduction. Chapter Prof. Amr El-Kadi

Computer-System Architecture

Computer-System Architecture. Common Functions of Interrupts. Computer-System Operation. Interrupt Handling. Chapter 2: Computer-System Structures

OPERATING SYSTEMS UNIT - 1

System Call System Program Linker/Loader with Examples Types of computing Environment

Chapter 1: Introduction

Computer-System Structures

SRIMAAN COACHING CENTRE-TRB-COMPUTER INSTRUCTORS STUDY MATERIAL CONTACT: III

Instruction Cycle. Computer-System Architecture. Computer-System Operation. Common Functions of Interrupts. Chapter 2: Computer-System Structures

OS: An Overview. ICS332 Operating Systems

Module 1: Introduction

Operating Systems Spring 2013, Ort Braude College Electrical Engineering Department

Module 1: Introduction

Module 1: Introduction. What is an Operating System?

Four Components of a Computer System. Operating System Concepts 7 th Edition, Jan 12, 2005

What Operating Systems Do An operating system is a program hardware that manages the computer provides a basis for application programs acts as an int

Operating Systemss and Multicore Programming (1DT089)

COURSE OVERVIEW & OPERATING SYSTEMS CONCEPT Operating Systems Design Euiseong Seo

Operating Systems Fundamentals. What is an Operating System? Focus. Computer System Components. Chapter 1: Introduction

Chapter 1: Introduction Operating Systems MSc. Ivan A. Escobar

Topics: Early systems and OS overview Skim Chapters 1-2 of SGG Read Chapter 1 of USP CS 3733 Operating Systems

Part I Overview Chapter 1: Introduction

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

Operating Systems: Internals and Design Principles, 7/E William Stallings. Chapter 1 Computer System Overview

Chapter 1: Introduction

Part I Introduction Hardware and OS Review

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Operating-System Structures

Chapter 1 Computer System Overview

Module 1. Introduction:

Computer-System Organization (cont.)

Introduction to Operating Systems

Chapter 2: Computer-System Structures. Hmm this looks like a Computer System?

Uniprocessor Computer Architecture Example: Cray T3E

ELEC 377 Operating Systems. Week 1 Class 2

Operating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

Operating Systems. studykorner.org

(Refer Slide Time: 1:26)

OPERATING SYSTEM OVERVIEW

Common Computer-System and OS Structures


UNIT 2. OPERATING SYSTEM STRUCTURES

CS30002: Operating Systems. Arobinda Gupta Spring 2017

Introduction CHAPTER. Review Questions

SAZ4B/SAE5A Operating System Unit : I - V

CSC 453 Operating Systems

Sri Vidya College of Engineering and Technology Department of Computer Science & Engineering II CSE / II IT

HIGH PERFORMANCE COMPUTING: MODELS, METHODS, & MEANS OPERATING SYSTEMS 1

Module 1 Introduction/OS Overview

Transcription:

Lecture Course in Autumn Term 2013 University of Birmingham Lecture notes and resources: http://www.cs.bham.ac.uk/ exr/teaching/lectures/opsys/13_14 closed facebook group: UoBOperatingSystems anyone registered on this module may join Recommended Course Books OS Concepts (8th Edition) Silberchatz et al. The C Programming Language (2nd Edition) Kernighan and Ritchie September 30, 2013 Assessment: 80% exam, 20% coursework Description of coursework and assessment criteria will be made available on the website. There will be 4 pieces of challenging coursework over the term that will put you through your paces, ultimately to give you a firm grasp on the subject. Students on the extended module (check your registration status with the school office if you are unsure of this) will be given an additional piece of coursework. Make use of the labs (two hours per week) to work on the coursework problems. A program that acts as an intermediary between a user of a computer and the computer hardware Operating system goals: Execute user programs and make solving user problems easier Make the computer system convenient to use Use the computer hardware in an efficient manner

Two Popular Definitions of an OS Computer System Structure OS as a resource allocator: Manages all resources and decides between conflicting requests for efficient and fair resource use (e.g. accessing disk or other devices) OS as a control system: Controls execution of programs to prevent errors and improper use of the computer (e.g. protects one user process from crashing another) Computer system can be divided into four components: Hardware: provides basic computing resources CPU, memory, I/O devices Operating system: Controls and coordinates use of hardware among various applications and users Application programs: define the ways in which the system resources are used to solve the computing problems of the users Word processors, compilers, web browsers, database systems, video games Users: People, machines, other computers Bootstrapping of the OS Computer System Organisation Small bootstrap program is loaded at power-up or reboot Typically stored in ROM or EPROM, generally known as firmware (e.g. BIOS) Initializes all aspects of the system (e.g. detects connected devices, checks memory for errors, etc.) Loads operating system kernel and starts its execution One or more CPUs, device controllers connect through common bus providing access to shared memory CPU(s) and devices compete for memory cycles (i.e. to read and write memory addresses)

Computer System Operation Interrupts I/O devices and the CPU can execute concurrently Each device controller (e.g. controller chip) is in charge of a particular device type Each device controller has a local buffer (i.e. memory store for general data and/or control registers) CPU moves data from/to main memory to/from controller buffers (e.g. write this data to the screen, read coordinates from the mouse, etc.) I/O is from the device to local buffer of controller Device controller informs CPU that it has finished its operation by causing an interrupt Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines Interrupt architecture must save the address of the interrupted instruction so original processing may be resumed Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt A trap is a software-generated interrupt caused either by an error or a user request Storage Structure Caching Main memory - only large storage media that the CPU can access directly Secondary storage - extension of main memory that provides large non-volatile storage capacity Magnetic disks - rigid metal or glass platters covered with magnetic recording material Disk surface is logically divided into tracks, which are subdivided into sectors The disk controller determines the logical interaction between the device and the computer Important optimisation principle, performed at many levels in a computer (in hardware, operating system, software) Information in use copied from slower to faster storage temporarily Faster storage (cache) checked first to determine if information is there If it is, information used directly from the cache (fast) If not, data copied to cache and used there Cache often smaller than storage being cached Cache management is an important design problem Determining cache size and replacement policy

Multiprocessors Fault Handling and Protection Most systems use a single general-purpose processor Multiprocessor systems growing in use and importance Also known as parallel systems, tightly-coupled systems Advantages include Increased throughput Economy of scale Increased reliability - graceful degradation or fault tolerance Two architectures Asymmetric Multiprocessing - CPUs have different roles, usually one is the master of the others Symmetric Multiprocessing - CPUs have identical roles, sharing process queues to service ready processes. Software error or request creates exception or trap, which are essentially handled as special interrupts Division by zero, request for operating system service Other process problems include infinite loop, processes modifying each others or the operating system s code Dual-mode operation allows OS to protect itself and other system components User mode and kernel mode Mode bit provided by hardware Provides ability to distinguish when system is running user code or kernel code Some instructions designated as privileged, only executable in kernel mode System call changes mode to kernel, return from call resets it to user Otherwise, a user process could manipulate hardware directly, leading to chaos. Process Management Process Management Activities A process is a program in execution. It is a unit of work within the system. Program is a passive entity (e.g. the stored code), process is an active entity. Process needs resources to accomplish its task CPU, memory, I/O, files, initialization data Process termination requires reclamation of any reusable resources Single-threaded process has one program counter, specifying location of next instruction to execute The operating system is responsible for the following activities in connection with process management: Creating and deleting both user and system processes Suspending and resuming processes Providing mechanisms for process synchronization Providing mechanisms for process communication Providing mechanisms for deadlock handling Process executes instructions sequentially, one at a time, until completion Multi-threaded process has one program counter per thread Concurrency of systems achieved by multiplexing the CPUs among the processes/threads

Memory Management Storage Management All data must be in memory before and after processing All instructions must be in memory in order to be executed Memory management determines what is in memory and when Optimizing CPU utilization and computer response to users (e.g. avoiding excessive swapping of data between disk and memory) Memory management activities Keeping track of which parts of memory are currently being used and by whom Deciding which processes (or parts thereof) and data to move into and out of memory (e.g. to and from the disk - virtual memory) Allocating and deallocating memory space as needed OS provides uniform, logical view of information storage Abstracts physical properties to logical storage units: file and directories Each medium is controlled by device (e.g. disk drive, tape drive) Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random) File-System management Access control on most systems to determine who can access what OS activities include Creating and deleting files and directories Primitives (i.e. standardised functions) to manipulate files and directories Mapping files within memory onto secondary storage I/O Subsystems Protection and Security One purpose of OS is to hide peculiarities of hardware devices from the user I/O subsystem responsible for: Memory management of I/O, including buffering (storing data temporarily while it is being transferred), caching (storing parts of data in faster storage for performance), spooling (the overlapping of output of one job with input of other jobs) Abstract device-driver interface, so driver developers know how to interface their code with the OS (e.g. network cards, storage devices for different hardware use common interfaces). Drivers for specific hardware devices Protection - any mechanism for controlling access of processes or users to resources defined by the OS Security - defense of the system against internal and external attacks Huge range, including denial-of-service, worms, viruses, identity theft, theft of service Systems generally first distinguish among users, to determine who can do what User identities (user IDs, security IDs) include name and associated number, one per user User ID then associated with all files, processes of that user to determine access control Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file Privilege escalation allows user to change to effective ID with more rights