CPS 210: Operating Systems. The operating system (OS) is the interface between user applications and the hardware. An OS implements a sort of virtual.

Slides:



Advertisements
Similar presentations
Interactive lesson about operating system
Advertisements

WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Introduction CSCI 444/544 Operating Systems Fall 2008.
Computer Systems/Operating Systems - Class 8
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
1: Operating Systems Overview
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
OS Spring’03 Introduction Operating Systems Spring 2003.
Figure 1.1 Interaction between applications and the operating system.
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
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.
What do operating systems do? manage processes manage memory and computer resources provide security features execute user programs make solving user.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Protection and the Kernel: Mode, Space, and Context.
9/14/2015B.Ramamurthy1 Operating Systems : Overview Bina Ramamurthy CSE421/521.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
ICOM Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
Threads and Concurrency. A First Look at Some Key Concepts kernel The software component that controls the hardware directly, and implements the core.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Course Introduction Andy Wang COP 5611 Advanced Operating Systems.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CPS 110/EE 153 Course Intro. The operating system (OS) is the interface between user applications and the hardware. An OS implements a sort of virtual.
Race Conditions Defined 1. Every data structure defines invariant conditions. defines the space of possible legal states of the structure defines what.
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.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
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 November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
1 CSE451 Architectural Supports for Operating Systems Autumn 2002 Gary Kimura Lecture #2 October 2, 2002.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
Introduction to Operating Systems and Concurrency.
Introduction to Operating System. 1.1 What is Operating System? An operating system is a program that manages the computer hardware. It also provides.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Introduction to Operating Systems Concepts
Operating System Overview
CPS 110/EE 153 Course Intro.
Andy Wang COP 5611 Advanced Operating Systems
Chapter 1: Introduction
Course Introduction Dr. Eggen COP 6611 Advanced Operating Systems
Andy Wang COP 5611 Advanced Operating Systems
Chapter 1: Introduction
Lecture Topics: 11/1 General Operating System Concepts Processes
Introduction to Operating Systems
Introduction to Operating Systems
Andy Wang COP 5611 Advanced Operating Systems
Operating Systems Lecture 3.
Operating Systems Lecture 1.
Operating Systems : Overview
Andy Wang COP 5611 Advanced Operating Systems
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
CS510 Operating System Foundations
Outline Operating System Organization Operating System Examples
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
CS703 – Advanced Operating Systems
Andy Wang COP 5611 Advanced Operating Systems
Lecture Topics: 11/1 Hand back midterms
Introduction and Overview
Presentation transcript:

CPS 210: Operating Systems

The operating system (OS) is the interface between user applications and the hardware. An OS implements a sort of virtual machine that is easier to program than the raw hardware. Operating Systems: The Big Picture [McKinley] physical machine interface User Applications Operating System Architecture virtual machine interface

Operating Systems: The Classical View data processes threads The Kernel

Key Concepts kernel The software component that controls the hardware directly, and implements the core privileged OS functions. Modern hardware has features that allow the OS kernel to protect itself from untrusted user code. thread An executing stream of instructions and its CPU register context. virtual address space An execution context for thread(s) that provides an independent name space for addressing some or all of physical memory. process An execution of a program, consisting of a virtual address space, one or more threads, and some OS kernel state.

Operating Systems: The Classical View data processes in private virtual address spaces system call traps...and upcalls (e.g., signals) shared kernel code and data in shared address space Threads or processes enter the kernel for services. The kernel sets up process execution contexts to “virtualize” the machine. CPU and devices force entry to the kernel to handle exceptional events.

Classical View: The Questions The basic issues/questions in this course are how to: allocate memory and storage to multiple programs? share the CPU among concurrently executing programs? suspend and resume programs? share data safely among concurrent activities? protect one executing program’s storage from another? protect the code that implements the protection, and mediates access to resources? prevent rogue programs from taking over the machine? allow programs to interact safely?

The OS and User Applications The OS defines a framework for users and their programs to coexist, cooperate, and work together safely, supporting: concurrent execution/interaction of multiple user programs shared implementations of commonly needed facilities “The system is all the code you didn’t write.” mechanisms to share and combine software components Extensibility: add new components on-the-fly as they are developed. policies for safe and fair sharing of resources physical resources (e.g., CPU time and storage space) logical resources (e.g., data files, programs, mailboxes)

Overview of OS Services Storage: primitives for files, virtual memory, etc. Control devices and provide for the “care and feeding” of the memory system hardware and peripherals. Protection and security Set boundaries that limit damage from faults and errors. Establish user identities, priorities, and accountability. Mediate/control access for logical and physical resources. Execution: primitives to create/execute programs support an environment for developing and running applications Communication: “glue” for programs to interact

The OS and the Hardware The OS is the “permanent” software with the power to: control/abstract/mediate access to the hardware CPUs and memory I/O devices so user code can be: simpler device-independent portable even “transportable” I/O Bus Memory Bus Processor Cache Main Memory Disk Controller Disk Graphics Controller Network Interface Graphics Network interrupts I/O Bridge

Architectural Foundations of OS Kernels One or more privileged execution modes (e.g., kernel mode) protected device control registers privileged instructions to control basic machine functions System call trap instruction and protected fault handling User processes safely enter the kernel to access shared OS services. Virtual memory mapping OS controls virtual-physical translations for each address space. Device interrupts to notify the kernel of I/O completion etc. Includes timer hardware and clock interrupts to periodically return control to the kernel as user code executes. Atomic instructions for coordination on multiprocessors

Introduction to Virtual Addressing text data BSS user stack args/env kernel data virtual memory (big) physical memory (small) virtual-to-physical translations User processes address memory through virtual addresses. The kernel and the machine collude to translate virtual addresses to physical addresses. The kernel controls the virtual-physical translations in effect for each space. The machine does not allow a user process to access memory unless the kernel “says it’s OK”. The specific mechanisms for implementing virtual address translation are machine-dependent.

CPS 210, Spring 2002 Part I The stuff you should already know. Part II The stuff you should learn. Part III The questions we’re trying to answer now through ongoing research in “systems”. Tanenbaum: undergrad OS text. Research papers: to 20.

CPS 210: Part I Concurrency and synchronization Threads and processes, race conditions, mutexes, semaphores, coordination, condition variables, starvation and deadlock Everyone has to know this stuff. A few lectures, problem set + exam 1/29 Classical operating systems Processes and the kernel, system calls, kernel services, file I/O, virtual memory. A few more lectures. New this semester: the infamous Nachos labs: 2/5 and 2/19.

Nachos is designed to look, feel, and crash like a “real” OS. Both the Nachos “OS” and test programs run together as an ordinary process on an ordinary Unix system (Solaris). What is Nachos? (Part 1) User Applications Operating System Architecture Nachos “OS” Solaris OS Architecture MIPS User Applications

Nachos runs real user programs on a simulated machine. MIPS simulator in Nachos executes real user programs. The real OS is treated as part of the underlying hardware. What is Nachos? (Part 2) User Applications Operating System Architecture Nachos “OS” Solaris OS Architecture MIPS User Applications

Nachos: A Peek Under the Hood data user space MIPS instructions executed by SPIM Nachos kernel SPIM MIPS emulator shell cp Machine object fetch/execute examine/deposit SaveState/RestoreState examine/deposit Machine::Run() ExceptionHandler() SP Rn PC registers memory page table process page tables

Overview of the Nachos Labs Lab 1 Synchronization primitives “from scratch”. Uniprocessor kernel-mode mutexes and condition variables. Kernel process management system calls. Like Unix fork/exec/exit/wait with simple virtual memory. Lab 2 Interprocessor communication using pipes and I/O descriptors. Simple command shell and user programs. Paged virtual memory with page cache management.

Secrets of the Nachos Labs It’s the thought that counts. Think before you design it. Think before you code it. Think before you run it. Think before you debug it. The time needed to conceive and write the code is moderate, but debugging time is potentially unbounded.

CPS 210: Part II Classical OS view: advanced topics Deconstructing the OS Servers, network storage, RAID, end-system networking Resource management, continuous media Quantitative system performance Reliability and robustness “Systems” as an experimental research discipline Research vs. development Styles of research Goals and methodology What/how to measure? P erformance? Dependability ? Performability?

Effect of Hardware on Software Advances in hardware technology drive software/OS changes. In the beginning, humans were cheap, computers were expensive. centralized computers, batch processing, no direct user interaction Now computers are cheap. dedicated workstations, PCs, and servers in a networked world emphasize ease-of-use and effective interaction over raw performance Faster and cheaper hardware is the defining force in systems. OS interfaces and policies depend on relative speed and cost of the different components. E.g., faster networks allow tighter coupling of clustered systems. [McKinley]

History Lesson From 1950 to now (50-year history of computing) we’ve seen a 3-9 order-of-magnitude change in almost every component. MIPS: from 0.5 in 1983 to 500 in Price/MIP: from $100K in 1983 to $300 today. Memory: 1 MB memories in 1983 to 1 GB memories today. Network: 10 Mb/s in 1983 to 1 Gb/s or more today. Secondary store: 1 GB in 1983 to 1 TB today. Virtual address space: 32 in 1983 to 64 today. Compare to: transportation: horseback to the Concorde in 200 years [McKinley]

The World Today Internet LAN/SAN Network Servers database file web... mobile devices Internet appliances desktop clients Server farms (clusters)

CPS 210: Part III Contemporary research directions Incorporating processing into network and storage elements. Active storage, extensible switches and active networks, active proxies, firewall appliances and other intermediaries, etc. Server-based computing and computing utilities. “Autonomic computing”: self-organizing server networks. Mobile computing and power management. Harnessing massive storage resources. Massively decentralized systems. Massive scale and robustness: sensor networks, peer-to-peer. New evaluation methodologies.

E-Track, G-Track, and Grading Problem sets and labs 3-5: 45% Exams 3: 45% Exit interview, subjective factors 10% E-track EC on labs and problem sets Semester project Does not affect quals pass! G E