Page 19/8/2015 CSE 30341: Operating Systems Principles Operating Systems: What did we learn? 1.Programming abstractions: 2.How they are implemented  Implementation.

Slides:



Advertisements
Similar presentations
Operating System.
Advertisements

Operating Systems Manage system resources –CPU scheduling –Process management –Memory management –Input/Output device management –Storage device management.
Computers Software. Computer Layers Hardware BIOS Operating System Applications.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
EEE 435 Principles of Operating Systems Principles and Structure of I/O Software (Modern Operating Systems 5.2 & 5.3) 5/22/20151Dr Alain Beaulieu.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Operating Systems. What is an Operating System? A layer of software between users/applications and the hardware. The first program loaded onto a computer.
1 CIS450/IMSE450/ECE478 Operating Systems Winter 2003 Professor Jinhua Guo.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Introduction to Computers Essential Understanding of Computers and Computer Operations.
Operating Systems.
Operating Systems: Principles and Practice
Xen and the Art of Virtualization. Introduction  Challenges to build virtual machines Performance isolation  Scheduling priority  Memory demand  Network.
Virtual Network Servers. What is a Server? 1. A software application that provides a specific one or more services to other computers  Example: Apache.
Virtualization A way To Begin with Virtual Reality… - Rahul Khanwani.
Case study 2 Android – Mobile OS.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
1 Instant replay  The semester was split into roughly four parts. —The 1st quarter covered instruction set architectures—the connection between software.
I/O Systems ◦ Operating Systems ◦ CS550. Note:  Based on Operating Systems Concepts by Silberschatz, Galvin, and Gagne  Strongly recommended to read.
Week 6 Operating Systems.
A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, Sixth Edition Chapter 9, Part 11 Satisfying Customer Needs.
Survey of PC and Network Operating Systems
How to buy a PC Brad Leach David Howarth James Sawruk Andrew U.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
CS 1308 Computer Literacy and the Internet. Introduction  Von Neumann computer  “Naked machine”  Hardware without any helpful user-oriented features.
Types of Computers Mainframe/Server Two Dual-Core Intel ® Xeon ® Processors 5140 Multi user access Large amount of RAM ( 48GB) and Backing Storage Desktop.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Chapter 8: Operating Systems and Utility Programs Catherine Gifford Dan Falgares.
Eng.Abed Al Ghani H. Abu Jabal Introduction to computers.
Processes and OS basics. RHS – SOC 2 OS Basics An Operating System (OS) is essentially an abstraction of a computer As a user or programmer, I do not.
Course Introduction Andy Wang COP 5611 Advanced Operating Systems.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Introduction to virtualization
Operating Systems Security
Full and Para Virtualization
Lecture 4 Page 1 CS 111 Online Modularity and Virtualization CS 111 On-Line MS Program Operating Systems Peter Reiher.
Lecture 1: Network Operating Systems (NOS) An Introduction.
Introduction TO Network Administration
Operating Systems Morrison / WellsCLB: A Comp Guide to IC 3 3E 1 Morrison / Wells.
Ms. Tracy  Identify the purpose of an operating system.  Identify different operating systems.  Describe computer user interaction with multiple.
Course 03 Basic Concepts assist. eng. Jánó Rajmond, PhD
1 Lesson 8 Operating Systems Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Unit 2 VIRTUALISATION. Unit 2 - Syllabus Basics of Virtualization Types of Virtualization Implementation Levels of Virtualization Virtualization Structures.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Virtual Machine Monitors
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
Lifecycle Suppose we have two processes that require the CPU. The first one had the CPU and you would like to let the second process run, ie context switch.
Operating Systems : Overview
Types of Computers Mainframe/Server
Introduction to Operating Systems
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Andy Wang COP 5611 Advanced Operating Systems
Outline Chapter 2 (cont) OS Design OS structure
Andy Wang COP 5611 Advanced Operating Systems
Outline Operating System Organization Operating System Examples
System calls….. C-program->POSIX call
Designing an Operating Systems
CSE 542: Operating Systems
Andy Wang COP 5611 Advanced Operating Systems
Lecture Topics: 11/1 Hand back midterms
Laptops and Processes Modern laptops are multicore
What is an operating system An operating system is the most important software that runs on a computer. It manages the computer's memory and processes,
Presentation transcript:

page 19/8/2015 CSE 30341: Operating Systems Principles Operating Systems: What did we learn? 1.Programming abstractions: 2.How they are implemented  Implementation constrained by hardware  Hardware implements things that are usable by software  Programming abstractions “learnt”:  Processes – needed by OS, but applications can use them via fork() and other calls  Threads – needed to use a hardware capability (CPU)  lots of complications: need support for locks, semaphores. Be aware of deadlocks etc.  Memory – you learnt them in programming class  Files – you learnt them in programming class  Protection and security – you knew they were there…

page 29/8/2015 CSE 30341: Operating Systems Principles How are they implemented?  Processes: Table for maintaining info (PCB), how to create, destroy and schedule processes  Memory: Logical vs physical memory (you didn’t have to worry about this because the compiler does that for you), paging and virtual memory (you didn’t worry about this unless you cared about performance)  Files: Directories, partitions, files, blocks, disk scheduling etc. (you didn’t have to worry about this unless you worried about performance)  RAID: probably new, especially the details  Protection: Access matrix, ACL, capabilities  So, what drives these implementations?

page 39/8/2015 CSE 30341: Operating Systems Principles Operating System is all about tradeoffs  There are no magic bullets. Everything is a compromise.  The compromise is made by the OS manufacturer, by analyzing “typical scenarios” and optimizing the OS to work for those scenarios.  “According to the Office performance benchmarks, Windows XP SP3 is also considerably faster than Vista SP1” - PC World  What does this sentence mean?  Take away message: you can either learn what those tradeoffs are and make sure that your code works well with them  Row-major ordering means certain types of memory accesses are good

page 49/8/2015 CSE 30341: Operating Systems Principles Operating Systems  Operating systems helps juggle resources and makes it appear to have more resources than we actually have  Use idle CPU to schedule another process  OS overhead itself is useless work. Ideally, OS should achieve its goals with zero overhead. That means the OS policies are typically simple.  We rarely use complex policies that might give good performance in the long run unless we know for a fact that we will get better performance most of the time  Knowing the future would help. Frequently, we approximate by using the past to predict the future. Fails when changing between phases.  Question: When resources become plentiful, what is the role of OS? Process scheduling in a 32 core laptop processor  Question: When resources are extremely scarce, what is the role of OS (100 MHz laptop processor)?

page 59/8/2015 CSE 30341: Operating Systems Principles Managing IO  Hardware support is preferred  DMA vs programmed IO  When the DMA controller is running, we may have to wire-down pages  DMA controller, Graphics co-processor, Network processor, Disk controller, Bus controller etc. etc.  Require drivers to control each device  Drivers written by vendors  Reliability of OS is the sum total of OS + drivers –Assume that the graphics driver crashed. What can the OS do?

page 69/8/2015 CSE 30341: Operating Systems Principles Lifecycle  Suppose we have two processes that require the CPU. The first one had the CPU and you would like to let the second process run, ie context switch. Should you do it at this time?  Cost of context switch  Opportunity cost of flushing TLB/cache  Cost of losing IO locality for file system  Cost of flushing buffers to disks and bringing in new pages  Pages might be wired during transfer preventing new process from running (by making them wait for memory to be freed by previous process which was context switched and hence is not running anyways)  A good scheduler would optimize across all these parameters: quickly

page 79/8/2015 CSE 30341: Operating Systems Principles Designing an Operating Systems  Goal is to understand how the technologies that we studied so far apply to typical machines  First we focus on PDAs and Laptops  Both are mobile, inexpensive  Battery is a big concern  Quick startup  Quick shutdown  Frequent suspends

page 89/8/2015 CSE 30341: Operating Systems Principles PDA  Small mobile devices  Important design elements:  Inexpensive  Mobile (small, rugged, good battery life)  Constrained CPU, memory, storage, screen  CPU: 200 MHz  Memory: 64 MB  Storage: Flash or Microdrive  OS: Symbian, PalmOS, MS Windows Mobile, QNX, Linux, MacOS?

page 99/8/2015 CSE 30341: Operating Systems Principles PDA and Process  Usually: only one user, process at any one time  Palm context switches by “freezing” process state and unthawing old process  Process Synchronization: Little system support.  Many multimedia applications (video, audio, cellular calls)

page 109/8/2015 CSE 30341: Operating Systems Principles PDA and memory/storage  Usually no MMU  Storage: Flash or Microdrive  Flash has no moving components, however can only be rewritten a finite number of times  Mobile device and so storage should be consistent

page 119/8/2015 CSE 30341: Operating Systems Principles PDA and security  Heavily uses physical security feature  Overall: What is the roll of PDA and whatever we learnt?  Why do we even discuss PDA class machines?

page 129/8/2015 CSE 30341: Operating Systems Principles Laptop class  Important design factors:  Cost, weight  CPU: as fast as your lap can tolerate  Memory: up to 4 GB  Disk: up to 320 GB  Sandisk 64 GB flash  Energy consumed depends on amount of resource  OS: MS Windows, Mac OSX, Linux, FreeBSD, …

page 139/8/2015 CSE 30341: Operating Systems Principles Laptops and Processes  Modern laptops are multi-core  Mostly interactive tasks and hence prefer interactive applications  Frequent suspend - does that affect scheduling?  Process synchronization  Users use productivity apps, multimedia apps and solitaire

page 149/8/2015 CSE 30341: Operating Systems Principles Laptops - memory and storage  What do you do with 4 GB on a laptop?  Leave memory of exited programs to quicken startup?  Energy cost  Use massive buffered IO?  Reliability when memory runs out  Disks and Flash  Disks support fully operational, spin-down, park modes

page 159/8/2015 CSE 30341: Operating Systems Principles Laptops and protection  Physical security still possible  Rarely multiuser

page 169/8/2015 CSE 30341: Operating Systems Principles Desktop  Dual processor/quad core  3+ GHz dual core x2 and 64 bit processor  GBs of memory  Multiple hard disks  Hard disk can be up to 1 TB per disk!!

page 179/8/2015 CSE 30341: Operating Systems Principles Desktop and Process scheduling…  What do you do with these beasts?  Web browse  s  Word  Multimedia encoding/creation  Scheduling a balance of interactive and batch processing

page 189/8/2015 CSE 30341: Operating Systems Principles Memory and File system  RAID becomes increasingly necessary for most machines, given that 500 GB hard drive is ~$60  Desktops, if they knew that they would be on UPS, can afford to really use a lots of caching and buffering  Security wise, desktops are similar to workstations in that they are single user at a time

page 199/8/2015 CSE 30341: Operating Systems Principles Data center server  One of the specification is the size that server will take in a rack. 1U is the smallest size and blade servers, which fit one unit are all the rage  Dual (Quad Core Xeon, 2x4MB Cache, 2.66 GHz, 1333 MHz FSB), 16 GB memory, 2x73GB 15k rpm hard disk - $10000  1 rack - 60 racks  ($ 0.6 m)

page 209/8/2015 CSE 30341: Operating Systems Principles Servers  Mission critical systems  Three tier systems - production, backup and test  Virtual hosting to protect against interference with other processes  Data center support service level agreements (SLA) - OS should be aware of these  On demand computing  Autonomic management  Each rack can consume 10 Kw  Additional 10 Kw in cooling  Data center can be powered exclusively by a 300 MW power station.

page 219/8/2015 CSE 30341: Operating Systems Principles Hot topics  Hot research areas:  Energy management for servers/laptops  Virtual machine support for isolation (Java, Xen, VMWare, Parallels, Wine etc.)  Grid/cluster computing to harness lots of machines  Autonomic OS/storage etc.