Operating Systems (ECS 150) Spring 2011

Similar documents
Operating System Overview. Chapter 2

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

Operating System Overview. Operating System

Operating System Overview. Chapter 2

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Operating Systems Overview. Chapter 2

Computer System Overview

Introduction. CS3026 Operating Systems Lecture 01

Operating Systems Overview. Chapter 2

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

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

Welcome to CSE 4300! Spring 2018

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

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

CSC Operating Systems Fall Lecture - I Introduction. Tevfik Ko!ar. Louisiana State University. August 25 th, Contact Information

CSC 2405: Computer Systems II

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

Operating Systems CS 571

CS450/550 Operating Systems

I/O Systems. 04/16/2007 CSCI 315 Operating Systems Design 1

Unix API Books. Linux Kernel Books. Assignments and Exams. Grading for CSC 256. Operating Systems 8/31/2018. CSC 256/456 Fall

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

UNIVERSITY OF NEBRASKA AT OMAHA COURSE SYLLABUS/DESCRIPTION

Chapter 13: I/O Systems

Computer Fundamentals : Pradeep K. Sinha& Priti Sinha

COT 4600 Operating Systems Fall Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM

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

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

Distributed Operating Systems Spring Prashant Shenoy UMass Computer Science.

SMD149 - Operating Systems

Roland Parviainen Phone: Office:? Web:

Overview of the ECE Computer Software Curriculum. David O Hallaron Associate Professor of ECE and CS Carnegie Mellon University

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

Main Points of the Computer Organization and System Software Module

Introduction to Computer Systems

Chapter 2. OS Overview

Introduction. Operating Systems. Introduction. Introduction. Introduction

CSE 5306 Distributed Systems. Course Introduction

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Distributed Operating Systems Fall Prashant Shenoy UMass Computer Science. CS677: Distributed OS

Operating Systems : Overview

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

Operating-System Structures

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

Chapter 14 Operating Systems

Distributed and Operating Systems Spring Prashant Shenoy UMass Computer Science.

Chapter 14 Operating Systems

Introduction to Computer Systems

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Chapter 13: I/O Systems

Operating Systems: Overview and Introduction

Introduction to Operating Systems. Chapter Chapter

7/20/2008. What Operating Systems Do Computer-System Organization

Chapter 1: Introduction. What is an Operating System? Overview Course (contd.) How do I spend my time? Computer System Components

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


Overview of the Class

Chapter 1: Introduction

EECS 482 Introduction to Operating Systems

Lecture 1: January 23

CSE 120 Principles of Operating Systems

Introduction to Operating. Chapter Chapter

CSE 333 Lecture 1 - Systems programming

Misc. Third Generation Batch Multiprogramming. Fourth Generation Time Sharing. Last Time Evolution of OSs

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.

Syllabus for Computer Science General Part I

CS/SE3SH3 Operating Systems

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

Lecture 1: January 22

CS 5460/6460 Operating Systems

COURSE OVERVIEW & OPERATING SYSTEMS CONCEPT Operating Systems Design Euiseong Seo

CSci 5103 Operating Systems. Jon Weissman. Administrivia

CSci Introduction to Operating Systems. Administrivia, Intro

Chapter 1: Distributed Systems: What is a distributed system? Fall 2013

Operating Systems, Spring 2015 Course Syllabus

Welcome to CS 241 Systems Programming at Illinois

Chapter 13: I/O Systems

Introduction to Computer Systems and Operating Systems

Announcement. Exercise #2 will be out today. Due date is next Monday

Lecture 2 Operating System Structures (chapter 2)

Multiprogramming. Evolution of OS. Today. Comp 104: Operating Systems Concepts 28/01/2013. Processes Management Scheduling & Resource Allocation

CS 241 Data Organization using C

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

CS370 Operating Systems

Chapter 2: Operating-System Structures

Chapter 1: Introduction

CNG 140 C Programming. Syllabus. Course Info Fall Semester. Catalog Description

Practical Programming Methodology

Chapter 1: Introduction

Module 12: I/O Systems

Lecture 2: September 9

Operating System Services

Sistemas Operacionais I. Valeria Menezes Bastos

Transcription:

Operating Systems (ECS 150) Spring 2011 Raju Pandey Department of Computer Science University of California, Davis CA 95616 pandey@cs.ucdavis.edu http://www.cs.ucdavis.edu/~pandey

Course Objectives After completing this course, you should have broad understanding of components of modern high performance operating system, and theoretical issues associated with building operating system; Implemented fragments of operating system components, polices, mechanisms, etc.; and develop intuition for which system approaches work, and which don t; This course. is not about specific OS, say Linux or Windows XP, etc. is not about APIs, standards, is more about OS concepts and their realization We will use BSD primarily as an example OS concept Organizing Theme: OS Components and Issues Kinds of components Characteristics Issues in building them ECS 150A, Sping 2011 Introduction and Overview, 2 University of California, Davis

Administrative Matters Instructor: TA: Raju Pandey, pandey@cs.ucdavis.edu 3041 Kemper Hall, 752-3584 Office Hrs: Tu/Th: 1:40 3:00 and with appointments Jesus Pulido (jpulido@ucdavis.edu) Office hours: To be announced Details: Lecture: T/Th 4:40 6:00 PM, 184 Young Communication Discussion through smart site for the course Course home page: accessible through http://www.cs.ucdavis.edu/~pandey ECS 150A, Winter 2005 Introduction and Overview, 3 University of California, Davis

Administrative Matters - cont'd Textbook: "The Design and Implementation of the FreeBSD Operating Systems" by Marshall Kirk, McKusick and George V. Neville-Neil (* Let s wait a bit on this *) Check course home page for other reference books Reading material Text book Manuals, HOW-TOS FreeBSD Source code Copies of transparencies: Pick it up from course web site. Computing Resources: CSIF Machines; Personal machines More details forthcoming Software: Modifying FreeBSD ECS 150A, Spring 2011 Introduction and Overview, 4 University of California, Davis

Course work Course load: Very high Project (40-45%) Homeworks (10-15%) Tests (40-50%) Midterm (15-20%) Final (20-30%) ECS 150A, Spring 2011 Introduction and Overview, 5 University of California, Davis

Course work: Projects Projects: Implement OS concepts by 1. extending/modifying a real operating system; 2. rebuilding operating system; 3. testing implementation by running applications on modified operating system Advice Know C, if not brush up Start to learn FreeBSD Submission details coming soon I II III IV V Projects Operating System Intro System Call and Synchronization Process management, scheduling Memory management File system and I/O ECS 150A, Spring 2011 Introduction and Overview, 6 University of California, Davis

Course work: Homework About 4 6; due in one week. Two parts: Read text book sections and answer questions Solve assigned problems Solutions will be made available Homework due in class; must submit before class starts. ECS 150A, Spring 2011 Introduction and Overview, 7 University of California, Davis

Policies Regrades on homework Must be done within one week of grading; Talk with TA first, followed by the instructor No makeup Midterm or Final examination. Final grade Absolute grading. Each homework, project, examinations given points that define A, B, C, D for each activity. Final A, B, C, D computed by weighted average of these points Your final graded weighted in a similar manner Your final grade depends on where you fall.. All work must be original; NO CHEATING. More on this later.. ECS 150A, Spring 2011 Introduction and Overview, 8 University of California, Davis

Background Brush up on all within the first two weeks. C language: Source files, include files Macros: #define, #ifdef, #include, etc. + Preprocessors static, extern, local and global functions and variables int, char, float, void Pointers; function pointers; address, *, & Arrays, multi-dimensionals arrays, pointers as arrays, etc. Memory model Shell: csh, tcsh, bourne, korn Scripts, Environment variables, Utilities Compilation, linking, object files, libraries, shared libraries, dynamic libraries Tools: Editors, Compilers, linkers, make, gdb, tar/untar, zip/unzip/gzip Common operations: format and create floppies, mount and unmount directories, file permission, etc.. ECS 150A, Spring 2011 Introduction and Overview, 9 University of California, Davis

Scope of Course OS components OS structures Processes, threads Memory management File and I/O subsystems Security Emphasis: Core OS concepts Design and implementation issues Performance implications Correctness and security implications ECS 150A, Spring 2011 Introduction and Overview, 10 University of California, Davis

Tentative schedule: Date Syllabus Topic 3/29 Introduction 3/31-4/5 Machine and OS Organization 4/7-4/12 Processes and Threads 4/14-4/19 Synchronization 4/21-2/26 Scheduling 4/28 Memory Management 5/3 *** Midterm*** (In class) 5/5-5/10 Virtual Memory 5/12-5/17 File System 5/19-5/24 I/O 5/26-/31 Security 6/2 Summary 6/4 (Saturday) Final Exam: 1:00 PM 3:00 PM (* denote advanced topics that may be covered if there is time) ECS 150A, Spring 2011 Introduction and Overview, 11 University of California, Davis

Overview What is an OS? What does an OS do? How is OS organized? How do we evaluate what an OS does? ECS 150A, Spring 2011 Introduction and Overview, 12 University of California, Davis

Semantic Gaps Hardware capabilities at low level: Low level operations on bits, bytes and words Low level logical operations (gotos, conditional gotos) Low level memory model (registers, raw memory words) Asynchronous operation (timers, interrupts) Application semantics at a high level: States represented as complex data structures Units and collections of operations Complex flow of operations Software used to provide mapping between high level and low level: Language processors, linkers and loaders. Language execution environments Operating Systems ECS 150A, Spring 2011 Introduction and Overview, 13 University of California, Davis

Semantic Gap and Software Layers End User Application Programs Programmer Utilities OS Designer Operating System Computer Hardware ECS 150A, Spring 2011 Introduction and Overview, 14 University of California, Davis

Semantic Gaps cont d. Machine instruction vs high level operation Compiler Linear memory vs data structures Compiler Limited Resources (CPU & memory) vs more needed OS Virtualization Secondary memory devices vs files OS I/O devices vs high level I/O commands OS ECS 150A, Spring 2011 Introduction and Overview, 15 University of California, Davis

Introduction: Views of OSs An extended machine Principle of abstraction hides complexity OS provides high level operations using lower level operations o o An interface between applications and hardware Almost like a library, except that sometimes it intervenes without being explicitly called. A virtual machine Principle of virtualization supports sharing OS provides virtual CPU, memory, devices A resource manager: Abstract hardware resources (CPU, memory, persistent storage, network, etc.) Control access to resources Balance overall performance with individual needs (response time, deadlines) ECS 150A, Spring 2011 Introduction and Overview, 16 University of California, Davis

Why OS? Objectives Programming simplicity High Level API -> Programming Model Utilities Portability across different machine architectures User Benefits: Safety Fairness Efficiency Ability to evolve ECS 150A, Spring 2011 Introduction and Overview, 17 University of California, Davis

Software engineering Issue: Major OS Issues How is OS organized? How are different components defined? What do they do? How do they talk with each other? How can new features be added to it? Abstraction/Modeling Issues: How are resources named? How do OS and application components discover each other? How do they talk with each other? How are parallel activities created and controlled? How do we make data last longer than program executions? How do multiple computers interact with each other? *UW ECS 150A, Spring 2011 Introduction and Overview, 18 University of California, Davis

Major OS Issues Resource Management issues: How are resources shared? How do we make things go faster? What happens as demands and resources increase? Accounting Security/Protection/Reliability issues: What if something goes wrong? How to protect one program from another? How to ensure integrity of OS and its resources? How to ensure access control? *UW ECS 150A, Spring 2011 Introduction and Overview, 19 University of California, Davis

Program development Editors and debuggers Program execution Access to I/O devices Controlled access to files System access Services Provided by OS ECS 150A, Spring 2011 Introduction and Overview, 20 University of California, Davis

Services Provided by OS cont d. Error detection and response internal and external hardware errors o memory error o device failure software errors o arithmetic overflow o access forbidden memory locations operating system cannot grant request of application Accounting collect statistics monitor performance used to anticipate future enhancements used for billing users ECS 150A, Spring 2011 Introduction and Overview, 21 University of California, Davis

Some things operating systems do Program management (Processes) Memory Management Scheduling / Resource management Communication Protection and Security File Management - I/O Naming Synchronization User Interface ECS 150A, Spring 2011 Introduction and Overview, 22 University of California, Davis

Processes A unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources Three components: Program Associated data needed by the program Execution context of the program Basis for Scheduling Resource management Protection, access control Accounting Variations: Threads, Events ECS 150A, Spring 2011 Introduction and Overview, 23 University of California, Davis

Process: Issues Mechanisms Processes, Lightweight process, threads, events System-Level, User-Level? Machine-specific, Portable Interaction with OS, User and Machine abstractions Cost Context switching Management cost Concurrency Scheduling Fairness Guarantees Real-time and software real-time constraints ECS 150A, Spring 2011 Introduction and Overview, 24 University of California, Davis

Memory Management Process isolation Safety Automatic allocation and management Virtual Memory Distributed shared memory Protection and access control Long-term storage Support for modular programming ECS 150A, Spring 2011 Introduction and Overview, 25 University of California, Davis

Memory Management Mechanisms: Memory Hierarchy Single and mult-host memory models: o consistency, synchronization Applications Interaction with hardware Recovery, Persistence Cost: Page faults Caching and replacement ECS 150A, Spring 2011 Introduction and Overview, 26 University of California, Davis

Communication Interaction between processes at local or remote nodes Information transfer Mechanisms Shared memory, sockets, pipes, files, signals, interrupts RPC, RMI Group communications (One-one, one-many, many-one, manymany Protocols Cost and performance Latency, Scalability, Quality of Service ECS 150A, Spring 2011 Introduction and Overview, 27 University of California, Davis

File and I/O Systems Long term archival Mechanisms and characteristics File and I/O system models Transparency Consistency Algorithms: Buffering Data partitioning and placement Scalability Performance: Latency Resource usage Accessibility ECS 150A, Spring 2011 Introduction and Overview, 28 University of California, Davis

Evolution of Operating Systems Dedicated machines Batch Processing Time Sharing Workstations and PC s Distributed Systems ECS 150A, Spring 2011 Introduction and Overview, 29 University of California, Davis

Evolution of OS Concepts and Features ECS 150A, Spring 2011 Introduction and Overview, 30 University of California, Davis

Evolution of OSs Serial Processing No operating system Machines run from a console with display lights and toggle switches, input device, and printer Setup included loading the compiler, source program, saving compiled program, and loading and linking Simple Batch System: Monitor: software that controls the running programs o Batch jobs together o Program branches back to monitor when finished o Resident monitor is in main memory and available for execution o Job control language for instruction to the monitor Memory protection: do not allow the memory area containing the monitor to be altered Timer: prevents a job from monopolizing the system ECS 150A, Spring 2011 Introduction and Overview, 31 University of California, Davis

Evolution of OSs Multiprogramming Systems Overlap CPU and I/O Protection Synchronization and Communication Dynamic Memory Management (swapping and paging) Interactive OSs Guaranteed response time Time-sharing (quantum) ECS 150A, Spring 2011 Introduction and Overview, 32 University of California, Davis

OS Evolution and Concepts PC and workstation OSs GUI Real-time OSs Deadlines (scheduling) Distributed OSs Loosely coupled/tightly coupled Consistent timeline (logical clocks, time stamps) Special Purpose OSs Real-time OS Embedded systems Active routers ECS 150A, Spring 2011 Introduction and Overview, 33 University of California, Davis