Operating System Structures



Similar documents
Chapter 3: Operating-System Structures. Common System Components

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Chapter 3 Operating-System Structures

Operating Systems 4 th Class

Operating System Components

Components of a Computer System

Introduction. What is an Operating System?

Chapter 2 System Structures

Example of Standard API

ELEC 377. Operating Systems. Week 1 Class 3

Chapter 3. Operating Systems

Operating System Structures

OPERATING SYSTEMS STRUCTURES

System Structures. Services Interface Structure

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

Chapter 2: OS Overview

Operating System Organization. Purpose of an OS

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

Overview of Operating Systems Instructor: Dr. Tongping Liu

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

OS Concepts and structure

Operating Systems OS Architecture Models

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Common Operating-System Components

Operating Systems: Basic Concepts and History

CHAPTER 15: Operating Systems: An Overview

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Principles of Operating Systems CS 446/646

Virtualization Technology. Zhiming Shen

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

Operating System Components and Services

Operating system Dr. Shroouq J.

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

Operating System Structure

OPERATING SYSTEM SERVICES

How To Understand The History Of An Operating System


Weighted Total Mark. Weighted Exam Mark

Have both hardware and software. Want to hide the details from the programmer (user).

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Chapter 6, The Operating System Machine Level

Virtualization for Cloud Computing

CPS221 Lecture: Operating System Structure; Virtual Machines

CS420: Operating Systems OS Services & System Calls

3 - Introduction to Operating Systems

theguard! ApplicationManager System Windows Data Collector

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

Process Description and Control william stallings, maurizio pizzonia - sistemi operativi

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

Windows NT. Chapter 11 Case Study 2: Windows Windows 2000 (2) Windows 2000 (1) Different versions of Windows 2000

Undergraduate Course Syllabus

Computer Organisation Operating Systems

Chapter 11 I/O Management and Disk Scheduling

The Plan Today... System Calls and API's Basics of OS design Virtual Machines

Virtual Servers. Virtual machines. Virtualization. Design of IBM s VM. Virtual machine systems can give everyone the OS (and hardware) that they want.

Contents. Chapter 1. Introduction

Operating Systems. Rafael Ramirez (T, S)

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

Operating System Overview. Otto J. Anshus

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Operating Systems PART -A

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

Virtual Machines. Virtualization

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Lesson 06: Basics of Software Development (W02D2

Chapter 1: Introduction. What is an Operating System?

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Why study Operating Systems? CS 372. Why study. Why study. Introduction to Operating Systems

I/O. Input/Output. Types of devices. Interface. Computer hardware

Devices and Device Controllers

COS 318: Operating Systems

Gildart Haase School of Computer Sciences and Engineering

x86 ISA Modifications to support Virtual Machines

Chapter 15 Windows Operating Systems

Unit 4 Objectives. System Software. Component 4: Introduction to Information and Computer Science. Unit 4: Application and System Software Lecture 2

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

Virtualization. Pradipta De

Software: Systems and Application Software

Overview and History of Operating Systems

Operating System Tutorial

12. Introduction to Virtual Machines

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

CHAPTER 17: File Management

Operating System Software

CSC 2405: Computer Systems II

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Virtual Machines.

Virtualization. Explain how today s virtualization movement is actually a reinvention

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Chapter 10 Case Study 1: LINUX

Learning Objectives. Chapter 1: Networking with Microsoft Windows 2000 Server. Basic Network Concepts. Learning Objectives (continued)

Chapter 5 Cloud Resource Virtualization

Operating Systems Overview

Transcription:

Operating System Structures Meelis ROOS mroos@ut.ee Institute of Computer Science Tartu University fall 2009

Literature A. S. Tanenbaum. Modern Operating Systems. 2nd ed. Prentice Hall. 2001. G. Nutt. Operating Systems: A Modern Perspective. 3rd ed. Addison-Wesley. 2003. A. Silberschatz, P. B. Galvin, G. Gagne. Operating System Concepts. 6th ed. or later, John Wiley & Sons. 2002. Course webpage: http://www.cs.ut.ee/ mroos/os/ Course mailing list: ati.osehitus@lists.ut.ee MEELIS ROOS 2

Outline of the course Structure of computer and operating system Input-output devices Storage systems, network structure,... File systems File system interfaces and implementation Memory management Main memory management, virtual memory Process management Processes and threads Process scheduling, synchronization, deadlocks... MEELIS ROOS 3

Operating System Components Process management Main memory management File management I/O system management Secondary storage management Networking Protection and security Shell MEELIS ROOS 4

Process Management Process is a running program Process needs resources to run (CPU time, main meory, files, I/O devices) Operating system is responsible for the following duties: Process creation and deletion Stopping and resuming of processes Process synchronization mechanisms Inter-process communication mechanisms Deadlock management mechanisms MEELIS ROOS 5

Memory Management Memory can be seen as a large array of words or bytes, each having own address; can be accessed quickly by CPU and I/O devices Main memory is volatile (lost on crash or power-off) Operating system is responsible for the following tasks: Memory allocation and freeing when asked by processes Accounting of memory areas are they used, by whom? Decisions about what process to bring into memory next when some memory is freed MEELIS ROOS 6

File Management File is a batch of information about related subjects Structure of any specific file is defined by the creator Programs (in both source and executable form) and data are mostly stored in files Operating system is responsible for the following tasks in file management: File creation and deletion Directory creation and deletion Support for manipulating files and directories Storing files on secondary storage Managing backups of files MEELIS ROOS 7

Input-Output System I/O system consists of: I/O buffering system Cache management system General interfaces for device drivers Specific device drivers MEELIS ROOS 8

Secondary Storage Management Main memory is lost after power outage, neither do all necessary programs and data fit into memory Thus we need to use secondary storage to hold information Disks, tapes,... Operating system is responsible for the following tasks in secondary storage management: Space allocation Free space management Disk access scheduling MEELIS ROOS 9

Protection Mechanisms Protection mechanisms control access to system and user resources by program, processes or users A protection mechanism must: Tell apart authorized and unauthorized users Provide access rules Enforce these rules MEELIS ROOS 10

Shell Many commands to operating system are control commands of the system itself: Process creation I/O operations Main memory management File system manipulation Protection mechanisms Network operations Shell a program that interacts with the user and lets him control the system Examples: UNIX shell, MS-DOS COMMAND.COM, MacOS GUI+Finder, Windows GUI+Explorer MEELIS ROOS 11

Operating System Services Services that operating system provides to programs Program execution (loading into memory and starting) I/O operations because programs can not usually access peripheral devices directly, operating system must offer services for it File system manipulation file creation, deletion, reading, writing, directory operations Communication exchange of data between processes (in the same or in differnet computers), implemented by message passing or shared memory Fault detection discovery of faults with CPU, memory, I/O devices and user programs and appropriate reactions to them MEELIS ROOS 12

Additional functions of the OS Not user-oriented but for better functioning of the system Resource allocation and freeing Accounting who used what resources and how much (for payment and statistics) Protection and security MEELIS ROOS 13

System Calls System calls are the interface between running program and operating system kernel Usually implemented in assembly language Often also directly available in system programming languages (C, C++) Three ways of parameter passing: Parameters in CPU registers Parameters in memory table, fixed register contains address of the table Parameters in the stack API Application Programming Interface ABI Application Binary Interface MEELIS ROOS 14

Most Common Types of System Calls Process management File management Device management General information Communication MEELIS ROOS 15

System Programs...help to create an environment for application program execution and development...give access to system calls and services in user-accessible way User view of the system is usually defined by system programs From the point of view of operating system kernel these programs look like any user program File manipulation Status information retrieval... Some system programs are often implemented as parts of shell MEELIS ROOS 16

Structure: MS-DOS Designed to get maximal functionality with scarce memory Not divided into modules Some internal structure exists but interfaces and functionality are not separated Applications extend operating system as they find convenient application program resident system program DOS device drivers ROM BIOS device drivers MEELIS ROOS 17

Structure: original UNIX UNIX was also written for computers with modest resources Somewhat structured but still monolitic Two separated layers: system programs and kernel Kernel is everything below system call interface (the users) shells and commands compilers and interpreters system libraries system call interface to the kernel signals terminal handling character I/O system terminal drivers file system swapping block I/O system disk and tape drivers CPU scheduling page replacement demand paging virtual memory kernel interface to the hardware terminal controllers terminals device controllers disks and tapes memory controllers physical memory MEELIS ROOS 18

Layered Approach Operating system is divided into layers Each layer uses services of lower layers The lowest layer is hardware The highest layer is application program with user interface Modularity: each layer only uses operations and services from lower layers Example: OS/2 MEELIS ROOS 19

Microkernel As much modules as possible are moved out from kernel to user level (as processes) The modules communicate using message passing Benefits: Easier to extend Easier to port to a new architecture More robust (less code works in kernel mode) More secure Exampled: Tru64 UNIX, MacOS X, QNX, also somewhat Windows NT MEELIS ROOS 20

Virtual Machines Logical next step from layered system Any layers below are seen as hardware that is usable for current layer Virtual machine gives client machines an interface that is identical to actual hardware Creates an illusion of many processes that use their own processor and run its own operating system there along with its own (virtual) memory This client operating system can be very simple (even single-user and single-tasking) IBM has been the main maker of virtualized architectures MEELIS ROOS 21

Virtual Machines The resources of physical computer are divided to create virtual machines The sharing of processor(s) gives the impression that users have their own processors File system and spooling give virtual card readers, disks and printers Normal time-shared terminal acts as the console of virtual machine Shared disks (minidisk) Virtual network interfaces for communicating between virtual machines Paravirtualization as a way to compensate for not fully virtualizable architecture MEELIS ROOS 22

Virtual Machines: pros and cons Perfect protection of system resources because of virtual machine isolation No direct sharing of resources because of this Theoretically a powerful means for operating systems research and development More efficieant use of hardware Implementation is complex, especially when architecture is not fully virtualized and needs special tricks to achieve near-100% emulation of hardware; fully virtualizable hardware is a big bonus MEELIS ROOS 23

Exokernels Advancement of microkernel idea Device access is not translated (each client system no more has its own zero address) Different processes are given different address ranges These address ranges are enfoced on hardware and kernel level Bonus is eliminated address translation overhead MEELIS ROOS 24