Winter 20021 CMPE 155 Week 2. Winter 20022 Review? Computers Operating Systems Kernels Distributed Systems.

Slides:



Advertisements
Similar presentations
OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
Advertisements

Threads, SMP, and Microkernels
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computer Systems/Operating Systems - Class 8
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Winter 2005 CMPE 151: Network Administration Lecture 2.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
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.
Operating Systems - Introduction S H Srinivasan
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.
Ceng Operating Systems 1-1 Chapter 1: Introduction What is the aim of the subject? Why are OSes important? What is an OS? A bit of history Some basic.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
1 Chapter 1: Introduction What is the aim of the subject? What is the aim of the subject? Why are OSes important? Why are OSes important? What is an OS?
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
CS 6560 Operating System Design Lecture 1. Overview 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4.
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.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
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.
Operating Systems Principles Lecture 1: Introduction 主講人:虞台文.
Chapter 1 Introduction 1.1 What is an operating system
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
1 Introduction. 2 A computer system consists of –hardware –system programs –application programs.
MODERN OPERATING SYSTEMS Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
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.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Operating System 2 Overview. OPERATING SYSTEM OBJECTIVES AND FUNCTIONS.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Processes Introduction to Operating Systems: Module 3.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
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.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
MODERN OPERATING SYSTEMS Chapter 1 Introduction
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
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.
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.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
Introduction to Operating Systems Concepts
Computer System Structures
Computer System Structures
OS Organization.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Operating Systems: A Modern Perspective, Chapter 3
OS Organization.
Outline Operating System Organization Operating System Examples
Operating System Introduction
Operating Systems Structure
Operating Systems Principles Lecture 1: Introduction
Operating Systems Structure
Operating System Introduction
Introduction and Overview
Presentation transcript:

Winter CMPE 155 Week 2

Winter Review? Computers Operating Systems Kernels Distributed Systems

Winter Computer “Hardware”. Processor(s), main memory, disk(s), keyboard, display(s), network interface, other I/O devices.

Winter Multiple Processor Systems (1) “Tightly-coupled” –Shared-memory muliprocessor P …… Shared Memory

Winter Multiple Processor Systems (2) “Less tightly-coupled” –Message-passing multicomputer P …… M P M P M P M

Winter Multiple Processor Systems (3) “Loosely-coupled” –Distributed systems” Network Computer

Winter What is an OS? Machine/resource manager. Physical Devices Microarchitecture Instruction Set Architecture Operating System Compilers, Editors, etc. Hardware Application programs

Winter OS as extended machine… Top-down view. Layer of software that hides hardware. Provides programmer easier instructions. –E.g., read block from file. (Part of) the OS runs in supervisor (privileged) mode: can execute priviledged instructions (e.g., access to physical decices through drivers).

Winter OS as resource manager Bottom-up view. Provides orderly and controlled allocation of resources. Provides (“concurrent”) programs (fair) access to resources (processor, disk, printer). Time (e.g., CPU) and space (e.g., memory) multiplexing.

Winter OS History

Winter First generation: Vacuum tubes: machines took whole rooms! Machine language programming (plugboard wiring). No OS.

Winter Second generation: Transistors made computers commercially viable. Builders, operators, users. Mainframes: multimillion dollar machines. Punch cards, input and output tapes. Batch systems.

Winter Third generation: ICs. Multiprogramming. –Machine shared by “concurrent” programs. –Memory partitions hold multiple jobs. Timesharing. –Multiprogramming still batch processing: scientific computation and commercial data processing. –Cheap terminals: interactive use. –Interactive service + batch processing.

Winter Fourth generation: 1980-… High-scale circuit integration. Computer miniaturization. Mainframes -> minicomputers -> microcomputers or PCs. PC OSs: CP/M, DOS, MS-DOS. GUI-based OSs: UNIX-based, MS Windows-based, MAC OS, …

Winter Modern OSs Mainframe OSs: IBM’s OS/390, DEC’s VMS. Server OSs: Solaris, FreeBSD, etc. PC OS: Linux, MacOS, Windows… Real-time OSs: VxWorks. Embedded OSs: Linux, PalmOS, Windows CE Smart card OSs

Winter Basic OS Concepts

Winter Processes Process: program in execution. –Address space: memory usable by program (text, data, stack). –State: registers. OS uses process table to keep track of processes. Processes can create other (child) processes.

Winter Inter-Process Communication (IPC) Shared memory. –Processes communicate/synchronize through a shared data item. Message passing. –Processes communicate via messages.

Winter Shared Memory Processes must access shared data in a mutual exclusive way. Primitives: –Semaphores: Dijkstra(1965) P(S) and V(S) operations. Atomic (indivisible) operations. –(Conditional) Critical Regions –Monitors

Winter Message Passing Processes communicate/synchronize by sending/receiving messages. Primitives: –Send(message), receive(message). Issues: –Synchronous versus asynchronous. –Reliable versus unreliable.

Winter Distributed Shared Memory Sharing data among computers that don’t share physical memory. DSM provides shared memory abstraction. –Read- and write-like primitives. Needs message passing to convey updates among physically disjoint processing elements.

Winter Deadlocks Shared data/resource may lead to deadlock: processes get “stuck”. Example: v is using r1 and requests r2; w is using r2 and requests r1. vw

Winter Memory Management Share memory among several processes. Monoprogramming: memory sharing between OS and program (embedded OSs). Multiprogramming: multiple processes (partially or totally) in memory. –Swapping. –Virtual memory: paging.

Winter I/O OS I/O subsystem manages I/O devices. –Device-dependent (device drivers) or independent. File system: –File as an abstraction. –Basic operations: create, delete, read, write. Hierarchical file systems. –Dynamically attach tree branches (e.g., mount system call in UNIX). Access control: permissions.

Winter System Calls Interface between OS and user program: set of system calls. –E.g., access a file, create a process, etc. Like making a special procedure call. –System calls executed by kernel. –Calling program pushes parameters onto stack; calls library; library routine (same name as system call) executes TRAP, switching to kernel mode; OS handles call; returns control to library; library returns to user program. Example system calls for file system –open, close, read, write, mkdir, rmdir.

Winter System Calls User-level process Kernel Physical machine System call to access physical resources System call: implemented by hardware interrupt (trap) which puts processor in supervisor mode and kernel address space; executes kernel-supplied handler routine (device driver) executing with interrupts disabled.

Winter Kernels Executes in supervisor mode. –Privilege to access machine’s physical resources. User-level process: executes in “user” mode. –Restricted access to resources. –Address space boundary restrictions.

Winter Kernel Functions Memory management. –Address space allocation. –Memory protection. Process management. –Process creation, deletion. –Scheduling. Resource management. –Device drivers/handlers.

Winter Kernel and Distributed Systems Inter-process communication: RPC, MP, DSM. Distributed (Networked) File systems. Some parts may run as user-level and some as kernel processes.

Winter Be or not to be in the kernel? Monolithic kernels versus microkernels.

Winter Monolithic kernels Examples: Unix, Sprite. “Kernel does it all” approach. Based on argument that inside kernel, processes execute more efficiently and securely. Problems: massive, non-modular, hard to maintain and extend.

Winter Microkernels Take as much out of the kernel as possible. Minimalist approach. Modular and small. –10KBytes -> several hundred Kbytes. –Easier to port, maintain and extend. –No fixed definition of what should be in the kernel. –Typically process management, memory management, IPC. Example: Mach (CMU),

Winter Micro- versus Monolithic Kernels S1S4S3 S4 S1S4S2S3 Monolithic kernel Microkernel Services (file, network). Kernel code and data

Winter Microkernel Application OS Services Microkernel Hardware. Services dynamically loaded at appropriate servers.. Some microkernels run service processes user space; others allow them to be loaded into either kernel or user space.

Winter Extensible Kernels “Extensible” OS. Provides core set of extensible services + extension infrastructure. Extensions: allow applications to specialize the underlying OS to achieve performance and functionality. –Extensions can be loaded into kernel any time. Example: general purpose OS doesn’t provide adequate disk management for database applications.

Winter Extensions Applications can extend OS servers to provide better match for its needs. Goal: build general purpose OS that provides extensibility+safety+performance. Example: UofWashington’s SPIN kernel.