Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.

Slides:



Advertisements
Similar presentations
Computer-System Structures Er.Harsimran Singh
Advertisements

Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
04/14/2008CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Lecture 1: History of Operating System
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Chapter 1 and 2 Computer System and Operating System Overview
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Common System Components
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 1 and 2 Computer System and Operating System Overview
Silberschatz, Galvin and Gagne  Operating System Concepts Common System Components Process Management Main Memory Management File Management.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
I/O Systems CSCI 444/544 Operating Systems Fall 2008.
What do operating systems do? manage processes manage memory and computer resources provide security features execute user programs make solving user.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Operating Systems.  Operating System Support Operating System Support  OS As User/Computer Interface OS As User/Computer Interface  OS As Resource.
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
I/O Systems I/O Hardware Application I/O Interface
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
Distributed System Concepts and Architectures 2.3 Services Fall 2011 Student: Fan Bai
Operating System Principles And Multitasking
Distributed System Concepts and Architectures Services
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Silberschatz, Galvin and Gagne  Operating System Concepts UNIT II Operating System Services.
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.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Introduction to Operating Systems Prepared by: Dhason Operating Systems.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
System Components Operating System Services System Calls.
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.
Operating Systems {week 01.b}
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
2. OPERATING SYSTEM 2.1 Operating System Function
Chapter 2: System Structures
Introduction to Operating System (OS)
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Chapter 2: Operating-System Structures
Introduction to Operating Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Chapter 2: Operating-System Structures
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.

 What is an Operating System?  The software interface between hardware and its users  Operating systems:  Execute user and system programs  Manage and coordinate computer hardware  Serve as resource allocators  Provide system security for programs and data

 System calls (for programmers)  System programs (for general users)  Commands (for superusers)  Filesystem (for all users)  Includes devices, network connections, etc.

 From a user’s perspective:  easy to use  easy to learn  reliable  safe  fast  etc.  System goals:  reliability  flexibility  extensibility  speed(y)  efficiency  maintainability  etc.

 An operating system provides services:  Program execution ▪ Load programs into memory, run/suspend/halt programs, handle/display errors  I/O operations ▪ Seamlessly interact with I/O devices, including disks, networks connection, etc.  Filesystem manipulation ▪ Read/write/traverse filesystem directories, read/write files, enforce permissions, search for files

 Other operating system services:  Inter-Process Communications (IPC) ▪ Processes exchange information via shared memory, message passing, sockets, pipes, files, etc. ▪ Often spans multiple computers and networks  Error detection and recovery ▪ Detect errors in CPU, memory, I/O devices, processes, network connections, etc. ▪ Recover from errors gracefully, ensuring correct and consistent operations

 Other operating system services:  Resource allocation ▪ Process scheduling, memory management  Account and resource protection ▪ Users, groups, account verification, memory protection, synchronization, etc.  Usage monitoring ▪ Processes, users, networks ▪ Log files

 In the beginning......the 1940s

 Automation in the 1950s with punch cards

 A job is a unit of work submitted by a user to the operating system  Jobs typically consist of:  a program either in a source language or in “executable” binary form  input data used by the program when it executes  Purpose is to produce output

 IBM 360 introduced (in 1964) a computing revolution! what’s so revolutionary?

 In multiprogramming, several processes reside in memory at the same time  CPU is shared and managed by the operating system  Addresses the problem of the CPU being underutilized (use context switching)

 Computer is often idle – why?  CPU and hardware significantly faster than I/O  When a user or process is blocked waiting for I/O, the operating system switches to another process  A subset of processes is stored in memory, awaiting CPU or I/O

 Multiprogramming provides efficient use of the computer (CPU) and its resources (I/O)  One user cannot keep the CPU and I/O devices busy at all times  Multiprogramming attempts to organize processes so that the CPU is as busy as possible  By overlapping I/O with computation, we need interrupts and interrupt handlers

 Interrupts are handled much like calling a function in a programming language I/O is typically buffered

interrupt processing times vary......and so do I/O transfer times

Synchronous Asynchronous

 To ensure fairness, use timesharing in which the CPU cycles through all processes  Each process is given a fixed amount of CPU time (a CPU burst)  Switching from one running process to another is called a context switch  A process relinquishes its time when requesting I/O

 Program instructions run either in user mode or in kernel mode  Kernel mode allows the operating system to protect itself and its system components switch modes via system calls

 Text CRTs (1970s) to an early Mac (1984)

 Personal computer revolution (1970s/80s)

 The battle begins...

 World Wide Web and Internet revolution (1990s/2000s)  Sir Tim Berners-Lee

 Mobile revolution (2010s)

very small very large very fast very slow volatile non-volatile

 Caching is a technique in which data is temporarily stored in a smaller and faster memory component  Why implement caching in an operating system?

 A key goal in operating system design is achieving fast and efficient performance

 What’s the caching algorithm?  When the operating system attempts to read from memory, check to see if the requested data is already in the cache  If it is, data is read from the cache (fast!)  If not, data is copied from memory to the cache (maybe next time...)

 When a running program reads from memory location X, the principle of locality predicts that the next memory location requested will be near X  Store pages of data in a cache, where each page is typically the same size (e.g. 16MB) memory location X

 Implement a program to simulate caching:  Write a function called calculateAnswer() that takes integer n as input and calculates (and returns) the sum ( … + n) ▪ Pretend this method is computationally costly!  Initially, the cache (holds only 11 elements) is empty ▪ Ask the user to input a number in range ▪ If the answer is not in the cache, call calculateAnswer() and display the resulting sum; store the result in the cache ▪ If the answer is in the cache, simply display the answer