Introduction to Operating Systems Concepts

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
Advertisements

Operating System Structures
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
1/21/2010CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
OS Concepts An Introduction operating systems. At the end of this module, you should have a basic understanding of what an operating system is, what it.
Abhinav Kamra Computer Science, Columbia University 3.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 3: Operating-System Structures.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
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.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
2.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 2: Computer-System Structures Computer System Operation I/O Structure.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
3.1 Operating System Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual.
Processes Introduction to Operating Systems: Module 3.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 3: Operating-System Structures
Computer System Structures
OPERATING SYSTEM CONCEPT AND PRACTISE
Module 3: Operating-System Structures
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Chapter 2: Operating-System Structures
Chapter 1: Introduction
Operating System Structure
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Operating-System Structures
Threads, SMP, and Microkernels
Chapter 2: System Structures
Chapter 3: Operating-System Structures
Module 2: Computer-System Structures
Mid Term review CSC345.
Chapter 1 Introduction to Operating System Part 5
Basic Concepts Protection: Security:
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 2: Operating-System Structures
Operating Systems Lecture 3.
Introduction to Operating Systems
Module 2: Computer-System Structures
Chapter 2: Operating-System Structures
Operating Systems: A Modern Perspective, Chapter 3
Chapter 2: Operating-System Structures
Outline Operating System Organization Operating System Examples
System calls….. C-program->POSIX call
Chapter 2: Computer-System Structures
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Chapter 2: Operating-System Structures
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Module 2: Computer-System Structures
Presentation transcript:

Introduction to Operating Systems Concepts Chapters 1 and 2 These slides include text, figures, and information from Operating Systems Concepts, by Silberschatz, Galvin, and Gagne. They also include material from the slides that accompany that textbook and from slides made by Dr. Roger deBry.

Four components of a computer system Users User User User Four components of a computer system Programs System and Application Programs API: Language Libraries and System Calls OS Operating System Kernel Hardware CPU

OS as an abstract machine This program does not need to have information about the particular hardware in the computer system. It sees the computer as an abstract machine. Executing Program Operating System Details of the actual hardware and devices are hidden. Hardware Device Device Device

OS as a resource manager This program has no sense of sharing the system’s resources with other programs. It sees an abstract machine that has all of the resources that it needs. Executing Program Resources Memory CPU General purpose registers Status registers Stack Input/Output devices Execution Context Operating System Hardware Device Device Device

Computer system organization app app app cpu memory system bus . . . disk controller device controller device controller printer keyboard

Computer system operation app app app cpu memory The CPU and devices work concurrently. system bus Each device controller is in charge of a particular device type. . . . disk controller device controller device controller printer keyboard

Interrupts An interrupt causes control to branch to an interrupt service routine through an interrupt vector. The address of the interrupted instruction is saved. Incoming interrupts are disabled while an interrupt is being processed. A trap is a software generated interrupt. An operating system is interrupt driven. The operating system saves the state of the CPU (registers, PC), handles the interrupt, and then resumes where it left off.

von Neumann architecture

I/O Processing Synchronous Asynchronous requesting process device driver wait interrupt handler hardware data requesting process device driver interrupt handler hardware data

I/O Processing Synchronous I/O requesting process device driver wait interrupt handler hardware data 1. A process starts an I/O operation 2. The requesting process waits until the I/O completes

I/O Processing Asynchronous I/O requesting process device driver interrupt handler hardware data 1. A process starts an I/O operation. 2. An acknowledgement is returned. 3. The process continues execution. 4. The device interrupts the process when the I/O is complete.

Storage-device hierarchy Speed Cost Volatility Caching Device drivers

Performance of various levels of storage Silberschatz Figure 1.11

Processor Modes Modern computing hardware provides multiple modes of operation: User Mode Cannot execute all machine instructions (e.g. I/O). Can only access memory allocated to the process. Privileged Mode Executes any instruction in the repertoire. Can access protected memory. Only executes trusted software (The OS kernel).

Dual-mode operation User mode Kernel mode Protect the OS and other system components User mode Kernel mode System calls Privileged instructions

Process management Schedules the processor so that each thread/process receives an equitable fraction of the available time, and maintains the execution context for each thread (stack, registers, etc) Allocates resources to processes when they are requested and keeps track of resources when a thread is finished with them. Isolates access to resources or allows sharing of resources as required.

Threads A thread, or thread of execution, is the set of instructions being executed in a process. Single-threaded environment Multi-threaded environment Each thread has its own runtime stack, registers, and state information, but they all share the same address space in memory (program and data), and the same files.

Memory management Keeps track of which parts of memory are currently being used and by whom. Decides which processes (or parts thereof) and data to move into and out of memory. Allocates and deallocates memory space as needed. Provides virtual memory (address space larger than physical memory).

File Management Works with the device managers to give applications a logical view of storage (byte stream, indexed data, text files, etc), and manage the flow of information between the actual storage device and the program.

Device Management The OS manages the allocation, isolation, and sharing of devices. * Terminals * Disk Drives * Printers * Networks * Keyboard * etc

Device Drivers Device Independent Part Application Programming Interface Device Independent Part Device Driver Interface Vendor Specific Part Vendor Specific Part Vendor Specific Part

Operating system services

Command interpreter CLI or command interpreter allows direct command entry Sometimes implemented in kernel, sometimes by systems program Sometimes multiple flavors implemented – shells Primarily fetches a command from user and executes it Sometimes commands built-in, sometimes just names of programs If the latter, adding new features doesn’t require shell modification

System calls

System calls

Standard C library example

Operating System Structure Monolithic: MS-DOS, Unix Layered: iOS Microkernel: Mach (used in macOS) Modules: Solaris, Linux

Monolithic: MS-DOS

Monolithic: Unix

Layered iOS

Microkernel: Mach Move as much as possible from kernel space into user space. Message passing

macOS

Modules: Solaris Kernel modules are loaded as needed. Modules communicate with each other over known interfaces.

Structure summary Structure Examples Advantages Disadvantages Monolithic Unix, MS-DOS, Windows Performance Hard to implement and maintain Layered iOS Modular, easy to implement and debug Hard to define layers, less efficient Microkernel Mach, macOS Easy to extend, easy to port, more stable Performance is not as good Modules Hybrids that include modules: Linux, Solaris, and Windows Modular, more flexible

System boot Bootstrap loader stored in ROM or ROM code loads bootstrap loader from boot block Bootstrap loader loads kernel and starts it running