Introduction to Operating Systems

Similar documents
Role 1: The Operating System is an Abstract Machine. Learning Outcomes. Introduction to Operating Systems. What is an Operating System?

Introduction to Operating Systems. Chapter Chapter

Introduction to Operating Systems. Chapter Chapter

Introduction to Operating. Chapter Chapter

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Computer System Overview

Operating Systems Overview. Chapter 2

Introduction. CS3026 Operating Systems Lecture 01

Operating Systems Overview

Operating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System

Operating System Overview. Operating System

Operating System Overview. Chapter 2

Operating Systems Overview. Chapter 2

Networks and Operating Systems Chapter 11: Introduction to Operating Systems

Unit 2 : Computer and Operating System Structure

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

Operating Systems : Overview

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

Process Description and Control

Announcement. Exercise #2 will be out today. Due date is next Monday

CS420: Operating Systems

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

Lecture 1 Introduction (Chapter 1 of Textbook)

Chapter 8. Operating System Support. Yonsei University

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

What s the difference between threads/processes. Operating Systems

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

CS420: Operating Systems

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management

Introduction to Processes in Computer Systems SEEM

Memory Allocation. Copyright : University of Illinois CS 241 Staff 1

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

Chapter 1: Introduction

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

Operating Systems Structure and Processes Lars Ailo Bongo Spring 2017 (using slides by Otto J. Anshus University of Tromsø/Oslo)

2/14/2012. Using a layered approach, the operating system is divided into N levels or layers. Also view as a stack of services

Operating System Services

Chapter 1: Introduction

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

Slide 6-1. Processes. Operating Systems: A Modern Perspective, Chapter 6. Copyright 2004 Pearson Education, Inc.

Process Description and Control. Chapter 3

Introduction to Operating Systems

Processes. Process Scheduling, Process Synchronization, and Deadlock will be discussed further in Chapters 5, 6, and 7, respectively.

Memory - Paging. Copyright : University of Illinois CS 241 Staff 1

MEMORY MANAGEMENT. Jo, Heeseung

Misc. Third Generation Batch Multiprogramming. Fourth Generation Time Sharing. Last Time Evolution of OSs

OPERATING SYSTEMS UNIT - 1

Process Time. Steven M. Bellovin January 25,

CS370 Operating Systems

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

Objectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

Why use an Operating System? Operating System Definition

Operating System Support

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

Operating System Overview. Chapter 2

Chapter 1: Introduction

Module 1. Introduction:

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

Spring It takes a really bad school to ruin a good student and a really fantastic school to rescue a bad student. Dennis J.

CS370 Operating Systems

CS370 Operating Systems

Chapter 9: Virtual-Memory

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

Lecture 5: Process Description and Control Multithreading Basics in Interprocess communication Introduction to multiprocessors

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

Address spaces and memory management

Memory Management. Jo, Heeseung

Major Requirements of an OS

Four Components of a Computer System

Frequently asked questions from the previous class survey

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Process Description and Control. Chapter 3

Chapter 9: Virtual Memory

Chapter 1: Introduction. Chapter 1: Introduction

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

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

Operating Systems: Overview and Introduction

Lecture 2: September 9

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

UNIT 2. OPERATING SYSTEM STRUCTURES

Tessellation: Space-Time Partitioning in a Manycore Client OS

Process Description and Control. Chapter 3

Common Computer-System and OS Structures

Chapter 13: I/O Systems

Operating Systems: Internals and Design Principles. Chapter 2 Operating System Overview Seventh Edition By William Stallings

Processes and Threads. Processes and Threads. Processes (2) Processes (1)

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

What are some common categories of system calls? What are common ways of structuring an OS? What are the principles behind OS design and

Operating Systems. Antônio Augusto Fröhlich LISHA/UFSC. December 20, 2008

CSC 453 Operating Systems

OPERATING SYSTEMS Chapter 13 Virtual Machines. CS3502 Spring 2017

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

Virtual machines are an interesting extension of the virtual-memory concept: not only do we give processes the illusion that they have all of memory

Process Description and Control. Major Requirements of an Operating System

Major Requirements of an Operating System Process Description and Control

Operating System Overview

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

Operating System Review

Transcription:

Introduction to Operating Systems Chapter 1 1.3 Chapter 1.5 1.9

Learning Outcomes High-level understand what is an operating system and the role it plays A high-level understanding of the structure of operating systems, applications, and the relationship between them. Some knowledge of the services provided by operating systems. Exposure to some details of major OS concepts. 2

What is an Operating System? 3

4 Block Diagram of Haswell Platform Architecture http://www.pcquest.com

Role 1: The Operating System is an Abstract Machine Extends the basic hardware with added functionality Provides high-level abstractions More programmer friendly Common core for all applications E.g. Filesystem instead of just registers on a disk controller It hides the details of the hardware Makes application code portable 5

Disk Users Memory CPU Network Bandwidth 6

Role 2: The Operating System is a Resource Manager Responsible for allocating resources to users and processes Must ensure No Starvation Progress Allocation is according to some desired policy First-come, first-served; Fair share; Weighted fair share; limits (quotas), etc Overall, that the system is efficiently used 7

Structural (Implementation) View: the Operating System is the Privileged Component Applications Applications Applications User Mode Requests (System Calls) Privileged Mode Operating System Hardware 8

Operating System Kernel Portion of the operating system that is running in privileged mode Usually resident (stays) in main memory Contains fundamental functionality Whatever is required to implement other services Whatever is required to provide security Contains most-frequently used functions Also called the nucleus or supervisor 9

The Operating System is Privileged Applications should not be able to interfere or bypass the operating system OS can enforce the extended machine OS can enforce its resource allocation policies Prevent applications from interfering with each other Applications Applications Applications User Mode Privileged Mode Operating System Hardware 10

Delving Deeper: The Structure of a Computer System Application System Libraries Application System Libraries User Mode Kernel Mode Device Device Operating System Memory 11

The Structure of a Computer System User Mode Application System Libraries Kernel Mode Device Device OS OS interacts via load and store instructions to all memory, CPU and device registers, and interrupts Memory 12

The Structure of a Computer System Application Applications interact with themselves and via function calls to library procedures User Mode System Libraries Kernel Mode Device OS Device Memory 13

The Structure of a Computer System Application Interaction via System Calls System Libraries User Mode Kernel Mode Device Device OS Memory 14

Privilege-less OS Some Embedded OSs have no privileged component e.g. PalmOS, Mac OS 9, RTEMS Can implement OS functionality, but cannot enforce it. All software runs together No isolation One fault potentially brings down entire system 15

A Note on System Libraries System libraries are just that, libraries of support functions (procedures, subroutines) Only a subset of library functions are actually systems calls strcmp(), memcpy(), are pure library functions» manipulate memory within the application, or perform computation open(), close(), read(), write() are system calls» they cross the user-kernel boundary, e.g. to read from disk device» Implementation mainly focused on passing request to OS and returning result to application System call functions are in the library for convenience try man syscalls on Linux 16

Operating System Software Fundamentally, OS functions the same way as ordinary computer software It is a program that is executed (just like applications) It has more privileges Operating system relinquishes control of the processor to execute other programs Reestablishes control after System calls Interrupts (especially timer interrupts) User Mode Kernel Mode Device Device Application System Libraries OS Memory 17

Major OS Concepts (Overview) Processes Concurrency and deadlocks Memory management Files Scheduling and resource management Information Security and Protection 18

Processes 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 resource ownership 19

Process Minimally consist of three segments Text contains the code (instructions) Data Global variables Stack Activation records of procedure/function/method Local variables Note: data can dynamically grow up E.g., malloc()-ing The stack can dynamically grow down E.g., increasing function call depth or recursion Memory Stack Gap Data Text 20

Process state Consists of three components An executable program code text Associated data needed by the program Data and stack Execution context of the program Registers, program counter, stack pointer Information the operating system needs to manage the process» OS-internal bookkeeping, files open, etc 21

Multiple processes creates concurrency issues (a) A potential deadlock. (b) an actual deadlock. 22

Memory Management The view from thirty thousand feet Process isolation Prevent processes from accessing each others data Automatic allocation and management Users want to deal with data structures Users don t want to deal with physical memory directly Protection and access control Still want controlled sharing OS services Virtual memory File system 23

Virtual Memory Allows programmers to address memory from a logical point of view Gives apps the illusion of having RAM to themselves Logical addresses are independent of other processes Provides isolation of processes from each other Can overlap execution of one process while swapping in/out others to disk. 24

Virtual Memory Addressing Memory management unit (hardware) translates program memory addresses to main memory addresses. 25

File System Implements long-term store Information stored in named objects called files 26

Example File System 27

Scheduling and Resource Management Fairness give equal and fair access to all processes Differential responsiveness discriminate between different classes of jobs Efficiency maximize throughput, minimize response time, and accommodate as many uses as possible 28

Operating System Internal Structure? 29

Classic Operating System Structure The layered approach a) Processor allocation and multiprogramming b) Memory Management c) Devices d) File system e) Users Each layer depends on the inner layers a b c d e 30

Operating System Structure In practice, layering is only a guide Operating Systems have many interdependencies Scheduling on virtual memory Virtual memory (VM) on I/O to disk VM on files (page to file) Files on VM (memory mapped files) And many more 31

The Monolithic Operating System Structure Also called the spaghetti nest approach Everything is tangled up with everything else. Linux, Windows,. 32

The Monolithic Operating System Structure However, some reasonable structure usually prevails Bowman, I. T., Holt, R. C., and Brewster, N. V. 1999. Linux as a case study: its extracted software architecture. In Proceedings of the 21st international Conference on Software Engineering (Los Angeles, California, United States, May 16-22, 1999). ICSE '99. ACM, New York, NY, 555-563. DOI= http://doi.acm.org/10.1145/302405.302691 33

34

The End 35