Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

Operating Systems (CSCI2413) Lecture 2 Overview phones off (please)
Operating System Structures
Chap 2 System Structures.
Operating System Structure
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
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.
3: OS Structures 1 OPERATING SYSTEM STRUCTURES PROCESS MANAGEMENT A process is a program in execution: (A program is passive, a process active.) A process.
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.
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Common System Components
Os31 Chapter 3 Operating-System Structures. os32 Outlines System Components Operating System Services System Calls System Programs System Structure Virtual.
Silberschatz, Galvin and Gagne  Operating System Concepts Common System Components Process Management Main Memory Management File Management.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and.
Input/OUTPUT [I/O Module structure].
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
COMPUTER ARCHITECTURE. Recommended Text 1Computer Organization and Architecture by William Stallings 2Structured Computer Organisation Andrew S. Tanenbaum.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
OS, , Part I Operating - System Structures Department of Computer Engineering, PSUWannarat Suntiamorntut.
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
7. Peripherals 7.1 Introduction of peripheral devices Computer Studies (AL)
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 3 Operating-System Structures Slide 1 Chapter 3 Operating-System Structures.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
 PROCESS MANAGEMENT  A process is a program in execution: (A program is passive, a process active.)  A process has resources (CPU time, files) and.
Von Neumann Machines. 3 The Von Neumann Architecture Model for designing and building computers, based on the following three characteristics: 1)The.
Operating System (Reference : OS[Silberschatz] + Norton 6e book slides)
OPERATING SYSTEM REVIEW. System Software The programs that control and maintain the operation of the computer and its devices The two parts of system.
Find – used to find files corresponding to a certain criteria find starting_dir matching_criteria [options] Examples: find /usr –name startx find /usr.
System Components Operating System Services System Calls.
Operating System Structure Lecture: - Operating System Concepts Lecturer: - Pooja Sharma Computer Science Department, Punjabi University, Patiala.
OPERATING SYSTEMS STRUCTURES Jerry Breecher 2: Operating System Structures 1.
Introduction to Operating Systems Concepts
Module 3: Operating-System Structures
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Operating System Review
Operating System Structure
CS703 - Advanced Operating Systems
Operating System Review
Chapter 3: Operating-System Structures
Operating Systems Chapter 5: Input/Output Management
CS703 - Advanced Operating Systems
Chapter 1 Introduction to Operating System Part 5
Chapter 2: Operating-System Structures
Introduction to Operating Systems
OPERATING SYSTEMS STRUCTURES
Chapter 2: Operating-System Structures
III. Operating System Structures
Presentation transcript:

Operating System - Overview Lecture 2

OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management I/O System Management Secondary Management Networking Protection System Command-Interpreter System

The Modern Computer System Figure 1.1 A computer system consists of hardware, system programs, and application programs.

PROCESS MANAGEMENT –A process is a program in execution: (A program is passive, a process active.) –A process has resources (CPU time, files) and attributes that must be managed. –Management of processes includes:  Process Scheduling (priority, time management,... )  Creation/termination  Block/Unblock (suspension/resumption )  Synchronization  Communication  Deadlock handling  Debugging

MAIN MEMORY MANAGEMENT  Allocation/de-allocation for processes, files, I/O.  Maintenance of several processes at a time  Keep track of who's using what memory  Movement of process memory to/from secondary storage. FILE MANAGEMENT A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. The operating system is responsible for the following activities in connections with file management: –File creation and deletion. –Directory creation and deletion. –Support of primitives for manipulating files and directories. –Mapping files onto secondary storage. –File backup on stable (nonvolatile) storage media.

Os componants I/O MANAGEMENT  Buffer caching system  Generic device driver code  Drivers for each device - translate read/write requests into disk position commands. SECONDARY STORAGE MANAGEMENT  Disks, tapes, optical,...  Free space management ( paging/swapping )  Storage allocation ( what data goes where on disk )  Disk scheduling

Os componants NETWORKING  Communication system between distributed processors.  Getting information about files/processes/etc. on a remote machine.  Can use either a message passing or a shared memory model. PROTECTION  Of files, memory, CPU, etc.  Means controlling of access  Depends on the attributes of the file and user SYSTEM PROGRAMS  Command Interpreters -- Program that accepts control statements (shell, GUI interface, etc.)  Compilers/linkers  Communications (ftp, telnet, etc.)

Input and Output

Introduction 4 main parts that make up computer 1.Processor 2.Memory 3.File system 4.Input and Output I/O device and actions are slow compared to the other 3 parts Wide variation in nature of I/O devices. Operating System must find way of dealing with this.

Simple Computer The organization of a simple computer with one CPU and two I/O devices

I/O Characteristics CharacteristicExamples Data RateDisk: 2Mb/s Keyboard: 10 – 15 bytes/s Unit of TransferDisk: blocks of 512, 1024 bytes Screen: single characters OperationsDisk: read, write, seek etc Printer: write, move paper Error ConditionsDisk: Read errors Printer: paper out

Device Controllers Figure 3-2. A model for connecting the CPU, memory, controllers, and I/O devices.

I/O Operation Computer uses an I/O system bus Each I/O device has controller attached to I/O system bus Devices have unique address so processor can identify device it wishes to communicate Uses interrupts

Interrupts I/O device can work away independantly of processor activity To do this it uses interrupts, I/O device sends a signal to processor to say it has completed part of task. Processor can then assign more work for device. Example 1 playing music in cd player can work independantly, press eject button sends interrupt to processor. Example 2 production line in factory

Interrupts Continued How interrupts happens. Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires

Direct Memory Access (DMA) Most computer systems use DMA This enables much faster data rates The I/O device can access memory directly Processor only involvement is in initiating the transfer after that device accesses memory directly

Direct Memory Access (DMA) Figure 3-4. Operation of a DMA transfer. Operation of a DMA transfer

Objectives of I/O System Efficiency – maintain devices operating at the highest possible rate doing useful work Device independence – we don’t care how system works so long as it does it’s job. Example we don’t care how printer is designed or what rollers cogs etc it has. When we go to file and print we want it to produce a printer page.

Structure of I/O System

Device Drivers When you buy a network card, printer, scanner you receive software to load on your computer so operating system can communicate with the device. More and more operating system have drivers preinstalled.

Device Controllers Device controller is hardware unit which is attached to the I/O bus of the computer and provides a hardware interface between the computer and the I/O device itself. Example ISA or PCI slot in PC, keyboard or mouse port.

Block and Character devices Block devices are complicated, character are relatively simple. Examples –Block: Hard Disk, Floppy Disk –Character: Printer, Network Card Two main types of I/O devices –Block: transfers blocks of data at a time –Character: transfer single character at a time

Device Drivers Logical position of device drivers is shown here Communications between drivers and device controllers goes over the bus

Virtual Devices Virtual device is a simulation of an actual device Most common example is print spooler. This improves efficiency by printing to a file and the actual print off can take place when system is quiet.

Buffering - problem Problem from below diagram we can see time to transfer data from I/O device causes processor P to wait – very inefficient.

Buffering - solution A buffer is an intermediate main memory storage area under the control of the operating system which holds data in transit between the users work area and the device.

I/O Buffering

Buffering - summary Yet a further improvement is to use double buffering i.e. two separate memory stores. I/O devices cannot keep pace with processor, in single process environment processor would be continuously waiting. In practice many processes are competing for processor so that buffering is effective in smoothing out peaks and troughs in I/O data rates and contributes to keeping the processor busy and to working I/O devices at optimum speed.

Windows I/O Windows uses a software module called the Input- Output Manager

Windows O/S I/O system In Windows application programs communicate with devices by making calls to device drivers. These are implemented as Dynamic Link Libraries (DLL’s) which are executable code modules, that can be loaded at run-time as required and which then become effectively part of the operating system.

Benefits of DLL’s Sharable code – loaded into memory only once. Most applications use standard drivers such as display and keyboard drivers. Driver for new device can be implemented without having to modify the o/s Range of optional drivers made available and configured for range of devices eg printers. Only drivers actually required by system need to be loaded saving memory resources.