OPERATING SYSTEMS OVERVIEW. Operating Systems 2015 Spring by Euiseong Seo

Similar documents
for Operating Systems Computer Systems Laboratory Sungkyunkwan University

Architectural Support for Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Architectural Support for OS

Architectural Support for Operating Systems. Jinkyu Jeong ( Computer Systems Laboratory Sungkyunkwan University

CS3600 SYSTEMS AND NETWORKS

Introduction to Unix. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

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

Chapter 1: Introduction Dr. Ali Fanian. 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

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

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

Chapter 1: Introduction. Chapter 1: Introduction

Chapter 1: Introduction

Lecture 1 Introduction (Chapter 1 of Textbook)

Introduction OS

Chapter 1: Introduction

Useful information. Introduction. Outline of the course. Background. References

Chapter 1: Introduction

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

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

Introduction SOFTWARE TECHNOLOGIES FOR BIOENGINEERING OS

CSE Opera*ng System Principles

Common Computer-System and OS Structures

Four Components of a Computer System

European University of Lefke. Instructor: Dr. Arif SARI

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

Operating System Review

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

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

Lecture 3: System Calls & API Standards

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

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

CSC 2405: Computer Systems II

DM510 Operating Systems. Jacob Aae Mikkelsen

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

CS 201. Exceptions and Processes. Gerson Robboy Portland State University

Operating Systemss and Multicore Programming (1DT089)

Operating Systems and Networks AE4B33OSS. RNDr. Petr Štěpán, Ph.D. System call

Systems Programming and Computer Architecture ( ) Timothy Roscoe

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 18

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

Module 1 Introduction/OS Overview

Operating System. Chapter 3. Process. Lynn Choi School of Electrical Engineering

CS 550 Operating Systems Spring Interrupt

What is a Process. Processes. Programs and Processes. System Classification 3/5/2013. Process: An execution stream and its associated state

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

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

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

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

CSCI-375 Operating Systems

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar

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

Lecture 2 - Fundamental Concepts

Computer-System Architecture

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

CS2506 Quick Revision

CSE 153 Design of Operating Systems Fall 18

Computer-System Structures

Operating Systems CS 571

Operating Systems and Networks AE4B33OSS. RNDr. Petr Štěpán, Ph.D. System call

ECE 485/585 Microprocessor System Design

Exceptions and Processes

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

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

ELEC 377 Operating Systems. Week 1 Class 2

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

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

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

Processes and Exceptions

Operating Systems. Computer Science & Information Technology (CS) Rank under AIR 100

CS 261 Fall Mike Lam, Professor. Exceptional Control Flow and Processes

OPERATING SYSTEMS. Goals of the Course. This lecture will cover: This Lecture will also cover:

Process Scheduling Queues

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

Why use an Operating System? Operating System Definition

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

System Call. Preview. System Call. System Call. System Call 9/7/2018

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

Mon Sep 17, 2007 Lecture 3: Process Management

Exceptions and Processes

Unix API Books. Linux Kernel Books. Assignments and Exams. Grading for CSC 256. Operating Systems 8/31/2018. CSC 256/456 Fall

Architectural Support for Operating Systems

The Kernel Abstraction

Systems software design. Processes, threads and operating system resources

CS330: Operating System and Lab. (Spring 2006) I/O Systems

Anne Bracy CS 3410 Computer Science Cornell University

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

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

CS 5460/6460 Operating Systems

Unit 2 : Computer and Operating System Structure

CSE 153 Design of Operating Systems

CS450/550 Operating Systems

Introduction and Overview

Anne Bracy CS 3410 Computer Science Cornell University

LIA. Large Installation Administration. Virtualization

Chapter 1 Computer System Overview

I/O Systems. Jo, Heeseung

Transcription:

OPERATING SYSTEMS OVERVIEW Operating Systems 2015 Spring by Euiseong Seo

What is an Operating System? A program that acts as an intermediary between a user of a computer and computer hardware Operating system goals Execute user programs Make computer systems convenient to use Use computer hardware in an efficient manner

Computer System Structure Computer system can be divided into four components Hardware provides basic computing resources n CPU, memory, I/O devices Operating systems n 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 n Word processors, compilers, web browsers, database systems, video games Users n People, machines, other computers

Four Components of a Computer System

What Operating Systems Do Depends on the point of view Users want convenience, ease of use and good performance Don t care about resource utilization But shared computer such as mainframe or minicomputer must keep all users happy Users of dedicate systems such as workstations have dedicated resources but frequently use shared resources from servers Handheld computers are resource poor, optimized for usability and battery life Some computers have little or no user interface, such as embedded computers in devices and automobiles

Operating System Definition OS is a resource allocator Manages all resources Decides between conflicting requests for efficient and fair resource use OS is a control program Controls execution of programs to prevent errors and improper use of the computer

Operating System Definition No universally accepted definition Everything a vendor ships when you order an operating system is a good approximation But varies wildly The one program running at all times on the computer is the kernel. Everything else is either System programs Application programs

Computer Startup bootstrap program is loaded at power-up or reboot Typically stored in ROM or EPROM, generally known as firmware Initializes all aspects of system n Memory, graphic devices and peripheral devices Loads operating system kernel and starts execution Executing bootstrap program is called booting

Computer System Organization

Computer System Organization One or more CPUs, device controllers connect through common bus providing access to shared memory Concurrent execution of CPUs and devices competing for memory cycles I/O devices and the CPU can execute concurrently Each device controller is in charge of a particular device type Each device controller has a local buffer CPU moves data from/to main memory to/from local buffers 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

OS and Architecture Mutual interaction The functionality of an OS is limited by architectural features n Multiprocessing on DOS/8086? The structure of an OS can be simplified by architectural support n Interrupt, DMA, synchronization, etc. Most proprietary OS s were developed with the certain architecture in mind n SunOS/Solaris for SPARC architecture n Windows for x86 architecture n ios for ARM architecture

Interrupts How does the kernel notice an I/O has finished? Polling Hardware interrupt

Interrupts Interrupt handling Preserves the state of the CPU n In a fixed location n In a location indexed by the device number n On the system stack Determines the type n Polling n Vectored interrupt system Transfers control to the interrupt service routine (ISR) or interrupt handler

Exceptions Interrupts Generated by hardware devices n Triggered by a signal in INTR or NMI pins (x86) Asynchronous Exceptions Generated by software executing instructions n INT instruction in x86 Synchronous Exception handling is the same as interrupt handling

Exceptions Further classification of exceptions Traps n Intentional n System calls, breakpoint traps, special instructions, etc. n Return control to next instruction Faults n Unintentional but possibly recoverable n Page faults (recoverable), protection faults (unrecoverable), etc. n Either re-execute faulting ( current ) instruction or abort Aborts n Unintentional and unrecoverable n Parity error, machine check, etc. n Abort the current program

Exceptions System calls Programming interface to the services provided by OS n Example: the system call sequence to copy the contents of one file to another

Example System Calls Important fork system CreateProcess calls (POSIX Create a new & process Win32) Process Management File Management File System Management waitpid execve exit kill open close read write lseek stat chmod mkdir rmdir link unlink mount umount chdir WaitForSingleObject (none) ExitProcess (none) CreateFile CloseHandle ReadFile WriteFile SetFilePointer GetFileAJributesEx (none) CreateDirectory RemoveDirectory (none) DeleteFile (none) (none) SetCurrentDirectory Wait for a process to exit CreateProcess = fork + execve Terminate execu9on Send a signal Create a file or open an exis9ng file Close a file Read data from a file Write data to a file Move the file pointer Get various file ajributes Change the file access permission Create a new directory Remove an empty directory Make a link to a file Destroy an exis9ng file Mount a file system Unmount a file system Change the curent working directory

System Call Implementation

System Call Implementation count = read (fd, buffer, nbytes);

Data Transfer Schemes Data transfer modes in I/O Programmed I/O (PIO) n CPU is involved in moving data between I/O devices and memory n Special I/O instructions VS memory-mapped I/O DMA (Direct Memory Access) n Used for high-speed I/O devices able to transmit information at close to memory speeds n Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention. n Only an interrupt is generated per block.

I/O Operations via DMA

Timers How does the OS take control of CPU from the running programs? Use a hardware timer that generates a periodic interrupt The timer interrupt transfers control back to OS The OS preloads the timer with a time to interrupt. n 10ms for Linux 2.4, 1ms for Linux 2.6 n (cf.) time slice Timer is privileged n Only the OS can load it