CSC 322 Operating Systems Concepts Lecture - 3: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,

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.
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Chapter 1: Introduction
OPERATING SYSTEM LESSON 2. INTRODUCTION TO OPERATING SYSTEM Computer Hardware’s complexity Operating Systems (OS) hide this complexity from users OS manages.
Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 I/O Devices Controller: physically controls the devices Devices are diverse and complicated Present simpler interface to OS E.g, convert a linear sector.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
1 What is an operating system? CSC330Patricia Van Hise.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Computer Organization
hardware and operating systems basics.
How Hardware and Software Work Together
Operating System. Architecture of Computer System Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs (e.g. WORD, EXCEL)
Ch Review1 Review Chapter Microcomputer Systems Hardware, Software, and the Operating System.
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction n What is an Operating System? n Mainframe Systems.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
A+ Guide to Software Managing, Maintaining and Troubleshooting THIRD EDITION Chapter 2 How an OS Works with Hardware and Other Software.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 CS503: Operating Systems Spring 2014 Dongyan Xu Department of Computer Science Purdue University.
CSC 322 Operating Systems Concepts Lecture - 25: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CSC 322 Operating Systems Concepts Lecture - 23: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
MODERN OPERATING SYSTEMS Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Chapter 1 Intro to Computer Department of Computer Engineering Khon Kaen University.
1.1 Operating System Concepts Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
1.4 Hardware Review. CPU  Fetch-decode-execute cycle 1. Fetch 2. Bump PC 3. Decode 4. Determine operand addr (if necessary) 5. Fetch operand from memory.
© Paradigm Publishing, Inc. 4-1 Chapter 4 System Software Chapter 4 System Software.
CSC 322 Operating Systems Concepts Lecture - 7: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
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.
MODERN OPERATING SYSTEMS Chapter 1 Introduction
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1.1 Sandeep TayalCSE Department MAIT 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming Batched Systems Time-Sharing Systems.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
1 OPERATING SYSTEMS. 2 CONTENTS 1.What is an Operating System? 2.OS Functions 3.OS Services 4.Structure of OS 5.Evolution of OS.
Applied Operating System Concepts
Chapter Objectives In this chapter, you will learn:
Operating System Review
Operating System.
Operating Systems (CS 340 D)
Technology Literacy Hardware.
Operating System Review
An Overview of the Computer System
Operating System Concepts
Today’s agenda Hardware architecture and runtime system
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Operating System Introduction
Operating System Concepts
Chapter 5 Input/Output Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Presentation transcript:

CSC 322 Operating Systems Concepts Lecture - 3: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. (Chapter-1) Ahmed Mumtaz Mustehsan, CIIT, Islamabad

I/O Devices The I/O devices Interact heavily with the OS. Generally consist of two parts: Controller (Having its own processor) The I/O Device itself. The physical control of the device is with its controller. Controller accepts commands from OS and executes. Controller has its own registers which are used to communicate with the driver Commands are complex and device dependent. Lecture 32Ahmed Mumtaz Mustehsan, CIIT, Islamabad

I/O Devices Example: Controller gets a command to read sector x on disk y. it converts the sector address into cylinder no., head no., and sector no. on the track. Moves the arm to correct cylinder position. Waits for the sector to rotate under the head. Reads and store bits coming off the drive. compute checksum. Store the bits by converting them to words in the memory Lecture 33Ahmed Mumtaz Mustehsan, CIIT, Islamabad

Device Driver Is a software, part of OS; that talks to the controller gives commands and accepts responses. The controller manufacturer supplies the DD for each OS Becomes the part of OS by Re-link, make an entry, or on-the-fly It runs in kernel mode I/O address space either the part of memory address space or separate I/O address space. If separate address space then requires separate instructions to read and write. Three modes of communication 1. Polling2. Interrupts3. DMA Lecture 34Ahmed Mumtaz Mustehsan, CIIT, Islamabad

I/O by Polling device A user program invoke a system call Transfer control from user space to kernel space. The driver then starts the I/O and sits in a tight loop continuously polling the device to see if it is done (Some bit that indicates that the device is still busy) CPU busy waiting, big use of CPU When the I/O has completed, the driver puts the data where they are needed and sets the required bit indicating that the task is completed. It is called programmed I/O, not really used any more as big wastage of CPU time. Lecture 35Ahmed Mumtaz Mustehsan, CIIT, Islamabad

I/O using Interrupt hardware aspect. 1.The driver request the controller for I/O by writing into its device registers. 2.The controller then starts the device. 3.Controller after finishing reading or writing signals the interrupt controller chip using certain bus lines. 4.If controller accepts the interrupt then it puts the device on the bus so the CPU can read it from the device ready for service. Lecture 36Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The I/O using Interrupt processing s/w aspect 1.Once the CPU calls the interrupt 2.The PC and PSW and other registers and data then pushed/saved into the stack. 3.CPU switched into kernel mode. And starts the handler. 4.When the handler completes I/O, CPU returns back to the previously running user program. Lecture 37Ahmed Mumtaz Mustehsan, CIIT, Islamabad

I/O by DMA Special (controller) chip called Direct Memory Access (DMA) Avoids using the CPU as part of the transfer to or from the memory The CPU sets up the DMA chip, telling it how many bytes to transfer, the device and memory addresses involved. DMA Chip does the job and interrupts CPU when it is finished. Spares the CPU to do some useful tasks. Lecture 38Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The bus hierarchy In the beginning there was only one bus ISA (Industry Standard Architecture ): It couldn’t handle the traffic when CPU and memories got faster and bigger. A hierarchy of faster and specialized buses introduced. PCI (Peripheral Component Interconnect) SCSI (Small Computer System Interface) USB (Universal Serial Bus) Ahmed Mumtaz Mustehsan, CIIT, Islamabad Lecture 39

The structure of a large Pentium system Pentium System Buses Lecture 310Ahmed Mumtaz Mustehsan, CIIT, Islamabad

Boot Sequence of a Computer Typical Pentium boot process: On the Parent-board/ motherboard is a program called the System BIOS (Basic Input Output System) The BIOS contains low level I/O software, including procedures to read the keyboard, write to the screen, and do disk I/O, etc. (Now BIOS is held in a flash RoM) When the computer is booted, the BIOS is started. Which checks RAM, keyboard and other basic devices. Then starts scanning ISA and PCI buses to detect all the devices attached, These devices are recorded. The plug and play devices are also recorded. If the devices present are different from when the system was last booted, the new devices are configured. Lecture 311Ahmed Mumtaz Mustehsan, CIIT, Islamabad

Boot Sequence of a Computer The BIOS then determines the boot device The first sector of the boot device is read and executed. This sector contains a program that normally examines the partition table at the end of the boot sector to determine which partition is active. A secondary boot loader is read from active partition. This loader reads in the operating system from the active partition and starts that. The OS queries the BIOS to get the configuration info. For each device, it checks its device driver. OS then loads all the device drivers, into the kernel. OS initializes its tables, creates background processes and starts up a login program or GUI. Ahmed Mumtaz Mustehsan, CIIT, Islamabad Lecture 312

The Operating System Zoo Mainframe operating systems Big thousands of disks…. Lots of jobs with lots of I/O Services-batch (payroll) transactions (airline reservations, timesharing (query database) IBM/360, Elderly-Unix, Linux replacing them Lecture 313Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The Operating System Zoo Server operating systems Large computers, workstations, or even mainframes. They serve multiple users over network Share resources e.g. File, print, web services Examples: FreeBSD, Linux and Windows Server 200x. Multiprocessor operating systems Connect multiple CPUs into a single system called parallel computers, multi computers, or multiprocessors They need special operating systems, which are variant of server operating systems Popular OS are Windows and LINUX Lecture 314Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The Operating System Zoo PC operating systems Provide good support to a single user but modern OS also support multiprogramming. Examples: Linux, FreeBSD, Windows Vista, and the Macintosh operating system Smart phone operating systems A handheld computer or PDA (Personal Digital Assistant) Only differ from PC in size, weight, and user interface. No hard disk Examples of computers : Android, iPhone, Blackberry Examples of OS : Palm, Symbian Lecture 315Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The Operating System Zoo Embedded operating systems Computers that control devices but are not generally considered as computers TV sets, cars, DVDs, MP3s Everything is in ROM (no apps can run on it) QNx, Vxworks Lecture 316Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The Operating System Zoo Real time operating systems Hard real-time system; Found in industrial process control, avionics, military, and similar application areas. These systems must provide absolute guarantees that a certain action will occur by a certain time. Soft real-time system; in which missing an occasional deadline is acceptable. Digital audio or multimedia The categories of handhelds, embedded systems, and real-time systems greatly overlap. Example of real-time system is e-Cos. Lecture 317Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The Operating System Zoo Smart card OS ; The smallest operating systems run on smart cards, which are credit card sized devices containing a CPU chip. Have severe processing and memory constraints. Powered by contacts with reader when inserted. Some smart cards are Java oriented. i.e ROM on the smart card holds an interpreter for the Java Virtual Machine (JVM). Java applets (small programs) are downloaded to the card and are interpreted by the JVM interpreter. Resource management and protection becomes issue when two or more applets are present simultaneously. Lecture 318Ahmed Mumtaz Mustehsan, CIIT, Islamabad

The Operating System concept revolves around some basic fundamental concepts related to : Processes Address spaces Files System Call I/O devices and protection mechanisum Will be discussed in details. Very brief introduction now. Operating System Concepts Lecture 319Ahmed Mumtaz Mustehsan, CIIT, Islamabad