Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS Design.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Introduction CSCI 444/544 Operating Systems Fall 2008.
Distributed systems Programming with threads. Reviews on OS concepts Each process occupies a single address space.
Distributed systems Programming with threads. Reviews on OS concepts Each process occupies a single address space.
CS-3013 & CS-502, Summer 2006 Virtual Machine Systems1 CS-502 Operating Systems Slides excerpted from Silbershatz, Ch. 2.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
OS Spring’03 Introduction Operating Systems Spring 2003.
OS Organization. OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Concurrency Thread abstraction of.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Chapter 3 Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
9/13/20151 Threads ICS 240: Operating Systems –William Albritton Information and Computer Sciences Department at Leeward Community College –Original slides.
Protection and the Kernel: Mode, Space, and Context.
Systems Security & Audit Operating Systems security.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
CS533 Concepts of Operating Systems Jonathan Walpole.
Threads, Thread management & Resource Management.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Threads and Processes.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Thread Scheduling.
Types of Operating Systems
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Operating Systems Lecture 1 Jinyang Li. Class goals Understand how an OS works by studying its: –Design principles –Implementation realities Gain some.
Chapter 2 Introduction to OS Chien-Chung Shen CIS, UD
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
COP 4610 Introduction to Operating Systems. Chapter 1 - Introduction OS - Layer between the hardware and user programs (Figure 1.1) OS - The ultimate.
Introduction to Operating Systems and Concurrency.
Operating Systems Security
Types of Operating Systems 1 Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2015.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
Processes and Virtual Memory
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Memory Management Overview.
Threads, Thread management & Resource Management.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Implementation.
12/2/091 What is an Operating System Andy Konwinski CS61CL Dec 2, 2009 Lecture 13 UCB CS61CL F09 Lec 13.
Cloud Computing – UNIT - II. VIRTUALIZATION Virtualization Hiding the reality The mantra of smart computing is to intelligently hide the reality Binary->
Chapter 2 Introduction to OS Chien-Chung Shen CIS/UD
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Introduction to Operating Systems Concepts
Virtual Machine Monitors
Introduction to Operating Systems
Operating System Structure
CS490 Windows Internals Quiz 2 09/27/2013.
1. 2 VIRTUAL MACHINES By: Satya Prasanna Mallick Reg.No
Introduction to Operating Systems
Chapter 15, Exploring the Digital Domain
Chapter 4: Threads.
Lecture Topics: 11/1 General Operating System Concepts Processes
Threads Chapter 4.
CSCE 313 – Introduction to UNIx process
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Operating Systems: A Modern Perspective, Chapter 3
Operating Systems Structure
Operating System Overview
Introduction and History
Presentation transcript:

Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS Design

Design of Operating Systems  OS manages h/w resources o Allows running many programs at the same time o Allows programs to interact with h/w devices 2 Hardware OS Kernel Program1UI Background tasks Program2

Key Ideas in OS Design  How does OS allow running many programs? o Provides virtualization mechanism that allows programs to share resources securely  How does OS allow programs to interact with h/w? o Provides a h/w abstraction, implemented via system calls 3

Virtualization  OS provides the illusion that each program is running on its own machine o Program thinks it has full access to CPU, memory, disk o This is called virtualization because there is one physical machine, but the OS provides the illusion of multiple virtual machines Hardware OS Kernel Program1UI Background tasks Program2 4

Benefits of Virtualization  Virtual machines provide resource isolation o Program is not aware that other programs exist, i.e., each program is isolated from others o A program cannot accidentally overwrite another program’s memory or files, causing it to crash o Ideally, if a program uses too much memory, disk, etc., only its performance degrades  What are the properties of an “ideal” virtual machine? 5

Implementing Virtualization  OS implements virtual machines by virtualizing each physical resource  Processor -> Threads o OS provides the illusion that a large number of virtual processors, called threads, are available to programs  Run cpu.c  Memory -> Virtual Memory o OS provides the illusion that each program has access to a large amount of contiguous, private memory  Run mem.c  Disk -> Files o OS provides the illusion that a large number of virtual disks, called files, are available to programs 6

Concurrency  Thread abstraction is powerful because it allows a program to perform several tasks in parallel (or concurrently) o E.g., a web server can serve multiple web requests, by using a thread per request  However, running threads concurrently raises some challenging problems o Run threads-race.c with args 100, 1000, 10000, o Run threads-sync.c  The OS runs multiple programs concurrently, and thus must handle these problems as well 7

System Calls  Programs request h/w access via system calls o Similar to procedure calls, but a little more complicated o System calls provide an abstraction of h/w, making it easier to write programs  Set of system calls is OS API  Examples: o Create/destroy process o Allocate/deallocate memory o Read/write a file 8

System Call Example  Program calls read() syscall to read a file from disk o Execution goes via a library that generates a trap o Trap invokes the kernel, which accesses disk o Kernel returns results to program  Will discuss traps, and need for traps later Hardware OS Kernel Program1 Library 9 trap readreturn results

OS Interface 10 OS Kernel Video Card CPU Monitor Printer Disk Memory Network Application layer system calls: thread_create(), read(), write(), thread_join()... Device MgmtFile SystemNetwork Comm. Process MgmtProtectionSecurity Hardware layer virtual machine interface physical machine interface Thread schedulerMemory management OS interface

Summary  Two important OS concepts o OS isolates applications using virtualization o OS abstracts h/w with a simpler interface  Virtualization o Each program thinks it owns the machine o Programs don’t need to worry about other running programs  E.g., a program cannot corrupt other programs  Abstraction o Simpler interface to h/w implemented via system calls o Eases programing, improves portability 11