SMD149 - Operating Systems

Similar documents
Roland Parviainen Phone: Office:? Web:

An Operating System History of Operating Systems. Operating Systems. Autumn CS4023

Reserves time on a paper sign-up sheet. Programmer runs his own program. Relays or vacuum tube hardware. Plug board or punch card input.

Operating Systems CS3502 Spring 2018

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

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

Andrew S. Tanenbaum, Operating Systems, Design and Implementation, (Second Edition), Prentice Hall.

Operating Systems (ECS 150) Spring 2011

Four Components of a Computer System

ELEC 377 Operating Systems. Week 1 Class 2

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

Operating-System Structures

CS 390 Chapter 2 Homework Solutions

TYPES OF OPERATING SYSTEMS. Dimple Juneja

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

EEE 435 Principles of Operating Systems

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

Introduction to System Programming

CSC 2405: Computer Systems II

Introduction to OS. Introduction MOS Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

OS structure. Process management. Major OS components. CSE 451: Operating Systems Spring Module 3 Operating System Components and Structure

OPERATING SYSTEMS OVERVIEW

Operating System Overview. Chapter 2

Fundamental Concepts and History

Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - II OS Structures. University at Buffalo. OS Design and Implementation

OS Design Approaches. Roadmap. System Calls. Tevfik Koşar. Operating System Design and Implementation. CSE 421/521 - Operating Systems Fall 2013

CS450/550 Operating Systems

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

Kernel Types Simple OS Examples System Calls. Operating Systems. Autumn CS4023

Computer Science 4500 Operating Systems. Welcome! In This Module. Module 1 Introduction, Overview and History

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

OS concepts and structure. q OS components & interconnects q Structuring OSs q Next time: Processes

Operating Systems Concepts

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

Lecture 1 Introduction (Chapter 1 of Textbook)

Operating Systems. I. Introduction. Eurecom

Chapter 2. Operating-System Structures

Chapter 1: Introduction

CSC Operating Systems Spring Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. January 17 th, 2007.

Announcements. Operating System Structure. Roadmap. Operating System Structure. Multitasking Example. Tevfik Ko!ar

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009

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

Chapter 2 Computer-System Structure

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

CSC 453 Operating Systems

Topics. Operating System. What is an Operating System? Let s Get Started! What is an Operating System? Where in the Book are we?

Unit 2 : Computer and Operating System Structure

Operating System Concepts Rab Nawaz Khan Jadoon

Operating System. Operating Systems Structure Chapter 2. Services Provided by the OS. Evolution of an Operating System

OS - Introduction Ezio Bartocci Institute for Computer Engineering

About Me. Office Hours: Tu 4-5, W 1-2, or by appointment Office: 346A IST Bldg

Process Description and Control

Operating Systems CMPSC 473. Introduction January 15, Lecture 1 Instructor: Trent Jaeger

Computer System Overview

Operating Systems CS 571

Introduction. Operating Systems. Introduction. Introduction. Introduction

Introduction to OS (cs1550)

Operating System Services. User Services. System Operation Services. User Operating System Interface - CLI. A View of Operating System Services

Introduction to Operating Systems

Operating Systems Overview. Chapter 2

Chapter 2: System Structures

Lecture 2 Fundamental OS Concepts. Bo 2018, Spring

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CS 550 Operating Systems Spring Operating Systems Overview

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

CSCE Introduction to Computer Systems Spring 2019

OPERATING SYSTEMS UNIT - 1

Topics. Operating System I. What is an Operating System? Let s Get Started! What is an Operating System? OS History.

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

Chapter 2: Operating-System Structures

Welcome to CSE 4300! Spring 2018

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

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

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

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Chapter 2 Operating System Overview

Introduction to Operating Systems. Chapter Chapter

Introduction to Operating System

Lecture 2 - Fundamental Concepts

Operating System Structure

CSC 256/456: Operating Systems. Introduction. John Criswell! University of Rochester

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

Operating System Overview. Operating System

Chapter 2: Operating-System Structures

EECS 678: Introduction to Operating Systems. Heechul Yun

CIS Operating Systems Introduction. Professor Qiang Zeng

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Operating System Review

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

Operating Systems, Fall

Chapter 1: Introduction

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

CS370 Operating Systems

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

Computer Fundamentals : Pradeep K. Sinha& Priti Sinha

1: Welcome and Overview COM S 414. Last Modified: 9/2/ :04:21 PM

Master level: Operating systems, distributed systems, networking,

Chapter 3: Operating-System Structures

Transcription:

SMD149 - Roland Parviainen October 31, 2005 1 / 54

Overview Course Information Roland Parviainen E-mail: rolle@csee.ltu.se, rolle@parviainen.org Phone: 070-5317170 Office:? Web: http://parviainen.org 2 / 54

Outline Overview Course Information to the course to Operating systems and a brief history Hardware and software concepts 3 / 54

Course Objectives Overview Course Information Fundamental course in systems programming and operating systems (theory and development) By the end of this course, you should Have gained an understanding of the evolution and purpose of an operating system Be able to describe the key elements of an operating system and their functionalities and interdependences Have learnt the significance of application programming interface (API) Have gained hands-on experience in implementing some OS functionalities 4 / 54

Course Information Overview Course Information Prerequisites SMD135 Program and data structures SMD137 Computer organization and logic design SMD138 Real-time systems Course textbook by H. M. Deitel, P. J. Deitel and D. R. Choffnes, Prentice Hall Publication, 3rd edition, 2004 (ISBN: 0131246968) Available at Bokis (680 kr) Other modern books should work as well http://www.sm.luth.se/csee/courses/smd/149/ Home work assignments, labs, news, slides, etc. 5 / 54

Course Structure Overview Course Information Modules Theoretical Processes and Threads Physical and Virtual Memory Secondary Storage and File Systems Processors: Performance and Management Networking and Distributed Computing Security Issues Laborations Systems programming (C/Unix) and Operating systems programming (Java/Nachos) 6 / 54

Lectures and labs Overview Course Information 15 scheduled, but only 14 will be used 2 lectures will cover laborations (systems programming, nachos) 10 scheduled labos 7 / 54

Examination and grading Overview Course Information No final exam Continuous examination Five homework assignments (each worth 40 points) You will generally have one week per homework Late submissions will NOT be graded Redo or repair of assignments is not permitted; exception: if you need 10 points or less to pass the course Three lab assignments (each worth 100 points) You will will generally have two weeks per lab Late submission can only get a maximum of pass grade Submissions after LP-2 (2005/06) ends will NOT be graded 8 / 54

Examination and grading Overview Course Information Maximum achievable number of points in the course is 500 (200 theoretical + 300 laborations) To pass the course (i.e., grade 3 ), you need to have passed both the theoretical and practical parts of the course At least 100 points to pass the theory part At least 150 points to pass the laborations part Grade 4 - at least 325 points and passed both parts Grade 5 - at least 400 points and passed both parts 9 / 54

Operating systems History Architectures What is an operating system The software that controls the hardware...all the software that is required in order for the user to manage the system and to run third-party application software for that system. In computing, an operating system (OS) is the system software responsible for the direct control and management of hardware and basic system operations. Additionally, it provides a foundation upon which to run application software such as word processing programs and web browsers. Resource manager 10 / 54

Operating systems History Architectures Components Kernel Shell Core components Often in the kernel: Processor scheduler Memory manager I/O manager Interprocess communication (IPC) manager File system manager 11 / 54

Operating systems History Architectures What is part of an operating system Kernel, Shells, Software Libraries, Application Programs, GUIs? Controversy United States v. Microsoft antitrust trials GNU/Linux naming controversy 12 / 54

Brief history History Architectures 40s and 50s Early computers had no operating system Single job at a time Faster computers - job switching overhead increased Single stream batch-processing systems Programs and data submitted at the same time Machine operators, not users, handled computers Replaced by operating systems... 13 / 54

History Architectures 60s Several jobs at a time I/O bound and processour bound jobs Multiprogramming 1964: System/360 with OS/360 from IBM (later MFT, MVT, SVS, MVS, MVS/XA, MVS/ESA, OS/390 and z/os) Interactive users Timesharing Real-time systems response in bounded time periods CTSS (Compatible time-sharing system), TSS (Time-sharing system), Multics, CP/CMS (Control program/conversational Monitor System) 14 / 54

History Architectures 60s Multics Developed using CTSS High level language Hardware: 400-1000 KMIPS Partly inspired Unix (Unics - Multics - bad pun...) Virtual Memory Unix 15 / 54

History Architectures 70s Commercialization of time-sharing systems Ethernet/LANs Foundations of Internet are started TCP, TCP/IP Personal computing starts 16 / 54

History Architectures 80s TCP/IP replaces NCP, DNS is developed 8 and 16 bit personal computers GUIs Xeroc Palo Alto Research Center (Xerox PARC) Apple Macintosh Distributed computing - client/server 17 / 54

History Architectures 90s HTTP and WWW Distributed computing explosion PCs with hundreds of MIPS Microsoft domination Plug and play 18 / 54

History Architectures 00s Middleware Web services Small and mobile devices 19 / 54

Architectures History Architectures Components Kernel Shell Core components Processor scheduler Memory manager I/O manager Interprocess communication (IPC) manager File system manager 20 / 54

Monolithic History Architectures All core components inside the kernel Modules can communicate directly through function calls Highly efficient Bugs and errors can be hard to isolate Security? Linux, many BSD systems, Solaris 21 / 54

History Architectures 22 / 54

Layered History Architectures Groups similar functions in layers Layers communicate only with the layer above or below Interfaces hides implementation Calls may have to go through several layers 23 / 54

History Architectures 24 / 54

Microkernel History Architectures Kernel only provides a small number of services (MM, IPC, synchronization) More advanced services are implemented as user processes Often inefficient: intermodule communication, context switches are expensive, etc. Mach, L4, QNX, BeOS, Minix Not to be confused with modular monolithic operating systems 25 / 54

History Architectures 26 / 54

History Architectures Microkernel vs. Monolithic vs. Layered Famous discussion: Linus Torvalds vs. Andy Tanenbaum, 1992: Linux is obsolete (http://www.oreilly.com/catalog/opensources/book/appa.html) Often partly mixed MacOS X, Windows NT (and XP, Vista, etc) 27 / 54

Network and distributed systems History Architectures Network Operating systems Runs on one computer Allows its processes to access resources on remote computers Distributed operating systems Single OS that manages resources on more than one computer system Amoeba, Chord Goals Transparent performance Scalability Fault tolerance Consistency 28 / 54

Hardware components A computer s hardware typically consists of: processor(s) main memory input/output devices Printed Circuit Board (PCB) Hardware component that provides electrical connections between devices The mainboard is the central PCB in a computer Devices such as processors and main memory are attached Include chips to perform low-level operations (e.g., BIOS) 29 / 54

Processor A processor is hardware that executes machine- language CPU executes the instructions of a program Coprocessor executes special-purpose instructions Registers are high-speed memory located on processors Data must be in registers before a processor can operate on it Instruction length is the size of a machine-language instruction 30 / 54

31 / 54

32 / 54

Main memory and storage Memory Main memory consists of volatile random access memory (RAM) Processes can access data locations in any order Common forms of RAM include: dynamic RAM (DRAM) - requires refresh circuit static RAM (SRAM) - does not require refresh circuit Secondary storage Secondary storage stores large quantities of persistent data at low cost Accessing data on a hard disk is slower than main memory Mechanical movement of read/write head Rotational latency Transfer time 33 / 54

Buses A bus is a collection of traces Traces are thin electrical connections that transport information between hardware devices A port is a bus that connects exactly two devices An I/O channel is a bus shared by several devices to perform I/O operations Example, the frontside bus (FSB) connects a processor to main memory 34 / 54

Direct Memory Access (DMA) DMA improves data transfer between memory and I/O devices Devices and controllers transfer data to and from main memory directly Processor is free to execute software instructions DMA channel uses an I/O controller to manage data transfer Notifies processor when I/O operation is complete Improves performance in systems that perform large numbers of I/O operations (e.g., mainframes and servers) 35 / 54

36 / 54

Processor support for Processor protection mechanismns for operating systems Prevents processes from accessing privileged instructions or memory Computer systems generally have several different execution modes: User mode (user state or problem state) User may execute only a subset of instructions Kernel mode (supervisor state) Processor may access privileged instructions and resources on behalf of processes 37 / 54

Interrupts and exceptions Discovering changes Polling Interrupts Exception 38 / 54

Timers and Clocks Timers An interval timer periodically generates an interrupt Operating systems use interval timers to prevent processes from monopolizing the processor Clocks Provide a measure of continuity A time-of-day clock enables an OS to determine the current time and date 39 / 54

Bootstrapping Loading initial OS components into memory Performed by a computer s Basic Input/Output System (BIOS) Initializes system hardware Loads instructions into main memory from a region of secondary storage called the boot sector If the system is not loaded, the user will be unable to access any of the computer s hardware 40 / 54

41 / 54

Caching Caches Relatively fast memory Maintain copies of data that will be accessed soon Increase program execution speed Examples include: L1 and L2 processor caches Main memory can be viewed as a cache for hard disks and other secondary storage devices 42 / 54

Buffering and Spooling Buffers Temporary storage area that holds data during I/O transfers Primarily used to: Coordinate communications between devices operating at different speeds Store data for asynchronous processing Allow signals to be delivered asynchronously Spooling Buffering technique in which an intermediate device, such as a disk, is interposed between a process and a low-speed I/O device Allows processes to request operations from a peripheral device without requiring that the device be ready to service the request 43 / 54

Software support Programming languages Some are directly understandable by computers, others require translation Classified generally as either: Machine language Assembly language High-level language Compilers, Interpreters, Loaders Firmware Middleware 44 / 54

Compiling, Linking and Loading Before a high-level-language program can execute, it must be: Translated into machine language Linked with various other machine-language programs on which it depends Loaded into memory 45 / 54

Compiling Translating high-level code to machine code Accepts source code as input and returns object code 46 / 54

Linking Create a single executable unit Integrate precompiled modules called libraries referenced by a program Assign relative addresses to different program or data units Resolve all external references between subprograms Produce an integrated module called a load module Linking can be performed at compile time, before loading, at load time or at runtime 47 / 54

Dynamic linking Executable contains undefined symbols and a list with objects/libraries that provides definitions Libraries need to be stored in one location only Errors in libraries can easily be fixed Multiple versions of libraries? 48 / 54

Loading Convert relative addresses to physical addresses Place each instruction and data unit in main memory Techniques for loading a program into memory Absolute loading Place program at the addresses specified by programmer or compiler (assuming addresses are available) Relocatable loading Relocate the program s addresses to correspond to its actual location in memory Dynamic loading Load program modules upon first use 49 / 54

50 / 54

51 / 54

52 / 54

Firmware and Middleware Firmware contains executable instructions stored in persistent memory attached to a device Programmed with microprogramming Layer of programming below a computer s machine-language Microcode: simple, fundamental instruction necessary to implement all machine-language operations More and more frequently: high-level languages Middleware is software for distributed systems Enables interactions among multiple processes running on one or more computers across a network Facilitates heterogeneous distributed systems Simplifies application programming 53 / 54

http://www.sm.luth.se/csee/courses/smd/149/ Home work assignment 1 deadline: 14 Nov. Next: Processes and threads Chapters 3, 4, 5 (Sections 5.1-5.3), 8 (Sections 8.1-8.7.5) 54 / 54