Introduction and Overview

Slides:



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

Operating System.
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
Lecture 11: Operating System Services. What is an Operating System? An operating system is an event driven program which acts as an interface between.
CS 345 Computer System Overview
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
Winter 2005 CMPE 151: Network Administration Lecture 2.
Lecture 1: History of Operating System
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
OS Spring’03 Introduction Operating Systems Spring 2003.
Figure 1.1 Interaction between applications and the operating system.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Lecture 1: Introduction CS170 Spring 2015 Chapter 1, the text book. T. Yang.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
1 What is an operating system? CSC330Patricia Van Hise.
What do operating systems do? manage processes manage memory and computer resources provide security features execute user programs make solving user.
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
SWE202 Fundamental of Operating System Lecture 1: Introduction Asst.Prof.Dr.Surasak Mungsing Faculty of Information Technology Sripatum University.
CS Fall 2011 CS 423 – Operating Systems Design Lecture 2 – Concepts Review Klara Nahrstedt Fall 2011.
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
Chapter 1 Introduction 1.1 What is an operating system
OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Copyright ©: University of Illinois CS 241 Staff1 Operating Systems Orientation.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
O PERATING S YSTEM. What is an Operating System? An operating system is an event driven program which acts as an interface between a user of a computer,
CIS250 OPERATING SYSTEMS Chapter One Introduction.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Operating System Overview Tarek Abdelzaher Lawrence Angrave Vikram Adve.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 0: Historical Overview.
CSCE451/851 Introduction to Operating Systems
Introduction to Operating Systems Concepts
Operating System Overview
Lecture 3: Basic OS Concepts
Operating Systems Lecture 2.
Applied Operating System Concepts
Lecture 1: Operating System Services
2. OPERATING SYSTEM 2.1 Operating System Function
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
Evolution of Operating Systems
Chapter 1: Introduction
Introduction to Operating System (OS)
Chapter 1: Introduction
Chapter 1: Introduction
חוברת שקפים להרצאות של ד"ר יאיר ויסמן מבוססת על אתר האינטרנט:
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Operating System Concepts
Operating Systems Lecture 2.
Lecture Topics: 11/1 General Operating System Concepts Processes
Introduction to Operating Systems
Operating Systems CSE451 Winter 2000
Introduction to Operating Systems
Lecture 3: Basic OS Concepts
Operating System Introduction
Chapter 2 Operating System Overview
Chapter 1: Introduction
Operating System Concepts
Lecture Topics: 11/1 Hand back midterms
Operating System Introduction
Presentation transcript:

Introduction and Overview Instructor: Adam C. Champion, Ph.D. CSE 2431: Introduction to Operating Systems Reading: Chapters 1–2, [OSC] (except Sections 2.8.3–2.9)

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

Info About Me Adam Champion Ph.D., OSU, 2017 Research interests: More: Mobile systems, networks, security, analytics Computer networking, wireless communications Parallel and distributed systems More: http://www.cse.ohio-state.edu/~champion.17

More about you? How do you handle the scenario where there is “no response from apps”? Do you know where variables in a program are stored? What are system calls? Any examples? How do you organize your files?

Course Objectives Understand functions and structures of operating systems Processes & Synchronization Memory System File Systems I/O Systems Understand issues in the design of operating systems

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

What is an OS? (1) Providing Services: Abstraction Convenience Standardization System and Application Programs Resource Management: Allocation Reclamation Protection Virtualization OS Hardware Program that acts as an intermediary between system/app programs and the computer hardware

What is an OS? (2) Resources Allocation Reclamation Protection Virtualization Examples: CPUs Memory I/O devices

What is an OS? (3) Resources Allocation Reclamation Protection Virtualization Examples: Voluntary at runtime Implied at termination Preemptive

What is an OS? (4) Resources Allocation Reclamation Protection Virtualization Protect resources from unauthorized access Related to reliability and security

What is an OS? (5) Resources Allocation Reclamation Protection Virtualization Examples: Virtual memory Timeshared CPU

What is an OS? (6) Resources Group discussion Allocation Reclamation Protection Virtualization Group discussion Topic: Real life analogies of Operating Systems? 5-6 students per group 3-minute discussion

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

History of Operating Systems First generation: 1945–1955 Vacuum tubes and plugboards (no OS) Second generation: 1955–1965 Transistors, batch systems Third generation: 1965–1980 Integrated circuits and multiprogramming Fourth generation: 1980–present Personal computers, mobile devices, sensors

First Generation: 1945–1955 (no OS) ENIAC (Source: Wikipedia)

The First Computer “Bug” Source: Wikipedia

History of Operating Systems (1955–1965) Early batch system Single user Secure Programmer/user as the operator But low CPU utilization: slow mechanical I/O devices

History of Operating Systems (1965–1980) Multiprogramming system Three jobs in memory: 3rd generation Spooling: use disk as very large buffer for input/output devices Timesharing: quick response time

History of Operating Systems (1980–present) Mainframe operating systems Server operating systems Multiprocessor operating systems Personal computer operating systems Real-time operating systems Embedded operating systems Smart card operating systems

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

Basic (1-CPU) Computer System

Typical PC (Intel-based) Computer Structure

Typical Memory Storage Structure 100 msec Magnetic tape 10-20 TB When you program, have you thought about Registers? Disks?

Moving-Head Disk Mechanism

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

Machine-dependent layer A Peek Into Unix Application Libraries User space/level Kernel space/level Machine-dependent layer Portable OS layer

Unix: Application Application (e.g., emacs) Libraries Written by programmer Compiled by programmer Uses function calls Libraries Portable OS layer Machine-dependent layer

Machine-dependent layer Unix: Libraries Application Written by elves Provided pre-compiled Defined in headers Input to linker (compiler) Invoked like functions May be “resolved” when program is loaded Libraries (e.g., stdio.h) Portable OS layer Machine-dependent layer

Typical Unix OS Structure Application Libraries Portable OS layer Machine-dependent layer System calls (read(), open(), etc.) All “high-level” code

Typical Unix OS Structure Application Bootstrap System initialization Interrupt and exception I/O device driver Memory management Kernel/user mode switching Processor management Libraries Portable OS Layer Machine-dependent layer

Discussion What will future operating systems (OSes) look like? 20–30 years from now? What are the problems for current OSes? How can future OSes fix them? What features will future OSes have? What are the criteria to evaluate the OSes?

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

Questions Why kernel and user mode? How?

How do we achieve these? Why Kernel Mode? Services that need to be provided at kernel level System calls: file open, close, read/write Control the CPU so that users won’t stuck by running while ( 1 ) ; Protection: Keep user programs from crashing OS Keep user programs from crashing each other How do we achieve these?

How to Provide Kernel Mode? CPU mode bit added to computer hardware to indicate current CPU mode: 0 (kernel) or 1 (user). When interrupt occurs, CPU hardware switches to kernel mode. Switching to user mode (from kernel mode) done by setting CPU mode bit (by an instruction). kernel user Exception/Interrupt/Fault Set user mode Privileged instructions can be executed only in kernel mode.

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

Three Interrupt Classes Interrupts caused by hardware failures Power outage Memory parity error Interrupts caused by external events: Reset I/O devices Interrupts caused by executed instructions Exceptions System calls

Interrupts by External Events Reset IRQ 1 IRQ 0 Timer

Instruction Execution Interrupts Caused by Instruction Execution Exceptions: caused by errors during instruction execution: Address Error: a reference to a nonexistent or illegal memory address; Reserved Instruction: An instruction with undefined opcode field or a privileged instruction in user mode; Integer Overflow: An integer instruction results in a two’s complement overflow; Floating Point Error: e.g., divide by zero, overflow, underflow Special instructions: MIPS processors: Syscall instruction executed Intel processors: INT n instruction executed

Hardware Handling of Interrupts Save the addresses of the interrupted instruction Transfer control to the appropriate interrupt service routine (software) Sets CPU to kernel mode May do some security checks here

System Call Steps Example: read(fd, buffer, nbytes)

Outline Course Information What is an OS? History of OSes Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS Major Components

OS Major Components Process management Resource management File system CPU Memory I/O devices File system Bootstrap Design Issues 1. Efficiency 2. Fairness 3. Sharing 4. Protection

Process Management (1) What is a process? What does a process need? Is it a program? In short: it’s a program that is executing What does a process need? CPU time, memory, files, and I/O devices

Process Management (2) How to create/terminate processes? fork() execve() kill() exit() What else from OS? Process synchronization Process communication Deadlock handling

CPU Management Responsibilities Issues: CPU scheduling Allocation for multiple CPUs Issues: CPU utilization Fairness Deadlock free

Memory Management Why? Responsibilities: Multiple programs in limited memory Responsibilities: Track memory usage Allocation/De-allocation Transfer from and to secondary storage

I/O Devices …… …… …… Why? Responsibilities Too many details Too many different devices Responsibilities Improve I/O efficiency, utilization General interfaces Extensible for specific hardware devices Kernel Kernel I/O Subsystem SCSI device driver Keyboard device driver …… ATAPI device driver SCSI device controller Keyboard device controller …… ATAPI device controller SCSI devices Keyboard devices …… ATAPI devices

File System Example

File System Why? How to create/open/close/delete files/directories? A easy way for users/apps to manipulate information How to create/open/close/delete files/directories? open() close() link() unlink()

Summary Course Overview What is an OS? History of OS Hardware Review A Typical UNIX Dual-Mode CPU Operations Interrupts and System Calls OS major components