Operating Systems Chapter 1.

Slides:



Advertisements
Similar presentations
Interactive lesson about operating system
Advertisements

Processes Management.
Operating System Structures
Dr. Kalpakis CMSC 421, Operating Systems. Fall Introduction.
Operating Systems Chapter 1.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 12, 2005 Chapter 1: Introduction What.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 1: Introduction.
Chapter 1: Introduction
Lecture 1: Introduction CS170 Spring 2015 Chapter 1, the text book. T. Yang.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Objectives To provide a grand tour of the major operating.
Chapter 1 Introduction to Operating System Bernard Chen Spring 2007.
What do operating systems do? manage processes manage memory and computer resources provide security features execute user programs make solving user.
General Information Class time (NC 441)
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts What is an Operating System? A program that acts as an intermediary.
Chapter 1: Introduction. 1.2AE4B33OSS Silberschatz, Galvin and Gagne ©2005 The textbook Operating System Concepts, 7th Edition Abraham Silberschatz, Yale.
Process Management A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity.
Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do Computer-System Organization.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 1: Introduction.
Information Assurance. Information Instructor – Johnson Thomas 325 North Hall Tel: Office hours: –Monday 5-7pm.
Chapter 1: Introduction
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Introductory Lecture Operating Systems.
Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization.
Computer System Organization and Operating Systems.
Four Components of a Computer System. Computer System Components Users (people, machines, other computers) Applications programs – define the ways in.
Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 1: Introduction.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do Computer-System.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Operating Systems CSCI 411.
Chapter 1: Introduction March 5 th, 2009 Instructor: Hung Q. Ngo Kyung Hee University.
Chapter 1: Introduction
1 Chapter 1: Introduction. 2 What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 1: Introduction What Operating Systems Do Computer-System.
Company Confidential 1 Operating Systems. Chapter 1: Introduction What Operating Systems Do Computer-System Organization Computer-System Architecture.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Caching Important principle, performed at many levels in a computer (in.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 12, 2005 Chapter 1: Introduction What.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do Computer-System.
Welcome to The University of Lahore Sargodha Campus.
Chapter 1. Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 12, 2005 Introduction Introduction What.
Operating Systems Introduction to Operating System (OS)
Chapter 1: Introduction. 1.2 What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware.
CSE Operating System Principles
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do Computer-System.
Introduction to Operating System. 1.1 What is Operating System? An operating system is a program that manages the computer hardware. It also provides.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 12, 2005 Chapter 1: Introduction What.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 12, 2005 Chapter 1: Introduction What.
Operating System (Reference : OS[Silberschatz] + Norton 6e book slides)
Chapter 1: Introduction Narzu Tarannum(NAT) Reff: BIS.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 1: Introduction.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Objectives To provide a grand tour of the major operating.
Nadeem Majeed Choudhary
Unit 2 Computer Systems HND in Computing and Systems Development
Chapter 1: Introduction
Chapter 1: Introduction Lecture 1 Part 1
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1 Introduction to Operating System
Chapter 1: Introduction
Chapter 1: Introduction Lecture 1 Part 1
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Operating Systems Structure
Chapter 1: Introduction
Presentation transcript:

Operating Systems Chapter 1

Chapter outline 1 Introduction 1.1 What Operating Systems Do 1.4 Operating System Structure 1.5 Operating System Operations 1.6 Process Management 1.7 Memory Management 1.8 Storage Management 1.8.1, 1.8.2, 1.8.4 1.9 Protection and Security 1.11 Special-Purpose Systems

Objectives what an operating system is. core operating system components. core operating system operations.

Take a moment to Contemplate!

Computing Devices Everywhere

Computing Devices Everywhere Operating Systems drive the inner workings of virtually every computer in the world today PCs, servers, iPods, cell phones, missile guidance systems, etc. all have an OS that dictate how they operate. The OS manages many aspects of how programs run, and how they interact with hardware and the outside world.

1.1 What Operating System do?

What Operating Systems DO? The computer system can be divided roughly into four components: The hardware The operating system The application software The Users

What Operating Systems DO?

What does an Operating System do? Silberschatz and Gavin: “An OS is Similar to a government” Coordinator and Traffic Cop (i.e. Control Program): Manages all resources Settles conflicting requests for resources Prevent errors and improper use of the computer Facilitator (i.e. Resource Allocator): Provides facilities that everyone needs Standard Libraries, Windowing systems Make application programming easier, faster, less error-prone Some features reflect both tasks: e.g. File system is needed by everyone (Facilitator) But File system must be Protected (Traffic Cop)

What is an Operating System,… Really? Most Likely: Memory Management I/O Management CPU Scheduling Communications? (Does Email belong in OS?) What about? File System? Multimedia Support? User Interface? Internet Browser?

Operating System Definition No universally accepted definition “Everything a vendor ships when you order an operating system” is good approximation But varies wildly “The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program

What if we didn’t have an OS? Source CodeCompilerObject CodeHardware How do you get object code onto the hardware? How do you print out the answer? Once upon a time, had to Toggle in program in binary and read out answer from LED’s! Altair 8080

1.4 Operating System Structure

Operating System Structure Multiprogramming needed for efficiency Single user cannot keep CPU and I/O devices busy at all times Multiprogramming organizes jobs (code and data) so CPU always has one to execute A subset of total jobs in system is kept in memory One job selected and run via job scheduling When it has to wait (for I/O for example), OS switches to another job

Memory Layout for Multiprogrammed System

Operating System Structure Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing Response time should be < 1 second Each user has at least one program executing in memory process If several jobs ready to run at the same time  CPU scheduling If processes don’t fit in memory, swapping moves them in and out to run Virtual memory allows execution of processes not completely in memory

1.5 Operating-System Operations

Operating-System Operations Interrupt driven by hardware Software error or request creates exception or trap Division by zero, request for operating system service Other process problems include infinite loop, processes modifying each other or the operating system

Dual Mode Operation Hardware provides at least two modes: “Kernel” mode (or “supervisor” or “protected”) “User” mode: Normal programs executed Some instructions/ops prohibited in user mode: Example: cannot modify page tables in user mode Attempt to modify  Exception generated Transitions from user mode to kernel mode: System Calls, Interrupts, Other exceptions

Dual Mode Operation (2) Operating system runs in Kernel mode and user programs run in User mode Kernel Mode Full access to machine instruction set Direct access to hardware, memory, and input/output devices OS and device drivers must run in Kernel mode User Mode Access to a limited set of machine instructions No direct access to hardware, memory and input/output devices Device access is coordinated by OS (must be privileged)

Process Management (1) A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. Process needs resources to accomplish its task CPU, memory, I/O, files Initialization data Process termination requires reclaim of any reusable resources

Process Management (2) Single-threaded process has one program counter specifying location of next instruction to execute Process executes instructions sequentially, one at a time, until completion Multi-threaded process has one program counter per thread Typically system has many processes, some user, some operating system running concurrently on one or more CPUs Concurrency by multiplexing the CPUs among the processes / threads

Process Management Activities The operating system is responsible for the following activities in connection with process management: Creating and deleting both user and system processes Suspending and resuming processes Providing mechanisms for process synchronization Providing mechanisms for process communication Providing mechanisms for deadlock handling

Memory Management (1) All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is in memory when Optimizing CPU utilization and computer response to users

Memory Management (2) Memory management activities Keeping track of which parts of memory are currently being used and by whom Deciding which processes (or parts thereof) and data to move into and out of memory Allocating and deallocating memory space as needed

Storage Management (1) OS provides uniform, logical view of information storage Abstracts physical properties to logical storage unit - file Each medium is controlled by device (i.e., disk drive, tape drive) Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random)

Storage Management (2) File-System management Files usually organized into directories Access control on most systems to determine who can access what OS activities include Creating and deleting files and directories Primitives to manipulate files and dirs Mapping files onto secondary storage Backup files onto stable (non-volatile) storage media

Mass-Storage Management (1) Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time. Proper management is of central importance Entire speed of computer operation hinges on disk subsystem and its algorithms

Mass-Storage Management (2) OS activities Free-space management Storage allocation Disk scheduling Some storage need not be fast Tertiary storage includes optical storage, magnetic tape Still must be managed Varies between WORM (write-once, read-many-times) and RW (read-write)

I/O Subsystem One purpose of OS is to hide peculiarities of hardware devices from the user I/O subsystem responsible for Memory management of I/O including buffering (storing data temporarily while it is being transferred), caching (storing parts of data in faster storage for performance), spooling (the overlapping of output of one job with input of other jobs) General device-driver interface Drivers for specific hardware devices

Protection and Security (1) Protection – any mechanism for controlling access of processes or users to resources defined by the OS Security – defense of the system against internal and external attacks Huge range, including denial-of-service, worms, viruses, identity theft, theft of service

Protection and Security (2) Systems generally first distinguish among users, to determine who can do what User identities (user IDs, security IDs) include name and associated number, one per user User ID then associated with all files, processes of that user to determine access control Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file Privilege escalation allows user to change to effective ID with more rights

OS Operations a snapshot User Application User Application User Application Protection Boundary Kernel Memory Management CPU Scheduling File System Disk I/O Process Mang. Device Drivers Networking Multitasking Hardware/ Software interface Hardware

1.11 Special-Purpose Systems

Special-Purpose OS Real-Time Embedded Useful for special-purpose applications, typically managing custom hardware Generally work in an environment with fixed time-constraints Interrupt Driven (more on this later) Embedded Special purpose systems Cell phones, wireless routers, TV’s, space vehicles, etc. Requirements High reliability, difficult or impossible to upgrade after deployed, run in hostile environments, self-diagnosis and repair, unattended operation.

Special-Purpose OS (2) Multimedia systems Handheld systems Online radio Handheld systems Physical Memory Speed I/O Examples Windows Mobile Palm Linux Symbian

Chapter Conclusion

Conclusion Operating systems provide a virtual machine abstraction to handle diverse hardware Operating systems coordinate resources and protect users from each other Operating systems simplify application development by providing standard services

References Pictures & some slides Content Prof. Kubiatowicz & Prof. Anthony, Berkeley university, Prof. Welsh, Harvard University OS slides by A. Detiel et. al Content Text book Modern OS Book Wikipedia http://en.wikipedia.org/wiki/History_of_the_Linux_kernel http://en.wikipedia.org/wiki/Operating_system And much more