Summary

This document is a lecture on Operating Systems, focusing on fundamental concepts including computer system organization, operating system objectives and functions, and system calls. The lecture covers the basics of how operating systems manage resources and interact with hardware. I/O, storage, and computer startup are explored.

Full Transcript

Operating System Lecture 1 Topics to be covered Introduction to OS Computer system organization OS Objectives and Functions OS Services Evolution of OS System calls Types of System calls What is an Operating System? A program that acts as an interme...

Operating System Lecture 1 Topics to be covered Introduction to OS Computer system organization OS Objectives and Functions OS Services Evolution of OS System calls Types of System calls What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware Operating system goals: – Execute user programs and make solving user problems easier – Make the computer system convenient to use – Use the computer hardware in an efficient manner Computer System Structure Computer system can be divided into four components: – Hardware – provides basic computing resources CPU, memory, I/O devices – Operating system Controls and coordinates use of hardware among various applications and users – Application programs –An application program is a computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end-users. Such as Word processors, media players, – Users People, machines, other computers Four Components of a Computer System What Operating Systems Do Depends on the point of view – User’s view and System’s view Users want convenience, ease of use – Don’t care about resource utilization Users of dedicate systems such as workstations have dedicated resources but frequently use shared resources from servers Handheld computers are resource poor, optimized for usability and battery life Some computers have little or no user interface, such as embedded computers in devices and automobiles Operating System Definition OS is a resource allocator – Manages all resources – Decides between conflicting requests for efficient and fair resource use OS is a control program – Controls execution of programs to prevent errors and improper use of the computer Operating System Definition (Cont.) “The one program running at all times on the computer” is the kernel. Computer System organization Computer System operation Storage structure Input output structure Computer System Operation Computer-system operation – One or more CPUs, device controllers connect through common bus providing access to shared memory – Concurrent execution of CPUs and devices competing for memory cycles – Memory controller synchronizes access to memory Computer Startup bootstrap program is loaded at power-up or reboot – initializes all aspects of system – Typically stored in ROM or EPROM- known as firmware – Loads operating system kernel and starts execution – System process or daemons run the entire time the kernel is running ( for monitoring subsystem) – Occurrence of an event is signaled by interrupt – Interrupts can be hardware or software Common Functions of Interrupts Interrupt is an event external to the currently executing process that causes a change in the normal flow of instruction execution. Possible solutions for checking Interrupts – Polling :CPU periodically checks each device to see if it needs service – Interrupt: Interrupt line is used to signal the processor. Interrupt handler is used to deal with interrupts. Storage Structures Any program to run should be stored in main memory This main memory also called as Random Access Memory (RAM) is implemented using a semi conductor technology called as Dynamic RAM Read Only Memory(ROM) stores static programs such as bootstrap program EEPROM(Electrically Erasable Programmable Read Only Memory) is used in smart phones -factory installed programs Storage Structure RAM is volatile Secondary storage – extension of main memory that provides large nonvolatile storage capacity Magnetic disks – rigid metal or glass platters covered with magnetic recording material – Disk surface is logically divided into tracks, which are subdivided into sectors Storage Hierarchy Storage systems organized in hierarchy – Speed – Cost – Volatility Caching – copying information into faster storage system; main memory can be viewed as a cache for secondary storage Why secondary storage is required? Storage-Device Hierarchy Caching Information in use copied from slower to faster storage temporarily Faster storage (cache) checked first to determine if information is there – If it is, information used directly from the cache (fast) – If not, data copied to cache and used there I/O Structure Devices are attached to small computer systems interface (SCSI) controller Devices are controlled by Device Controller and OS maintains Device Driver for each. Working of device controller Device Controller Registers Local Buffers Device Driver For bulk data movement Direct Memory Access(DMA) is used OS Objectives and functions OS is a layer of software whose job is to manage all devices and provide user programs with a simpler interface to the hardware Objectives of OS – Convenience – Efficiency – Ability to evolve Layers and views of computer system Layered Approach End user views a computer system in terms of a set of applications Applications are developed in a programming language and is developed by application programmer To make the applications reachable to computer hardware system programs or utilities are provided OS comprises of collection of system programs OS masks the details of the hardware from the programmer and provides the programmer with a convenient interface for using the system. OS as User/Computer Interface OS provides services in the following areas: – Program Development- Editors/Debuggers assist programmer in creating programs. These are provided as application program development tool. – Program execution – load program-run program-execute program – Access to I/O devices - OS provides a uniform interface for I/O devices which are hidden from end users – Controlled Access to files - OS needs to understand I/O, structure of file and also provide protection to users in multiuser environment OS as User/Computer Interface – System Access: Provide access to system as whole and to specific system resources. Resolve conflicts for resource contention. – Error detection – OS needs to be constantly aware of possible errors – Accounting - To keep track of which users use how much and what kinds of computer resources OS as resource manager OS controls the basic functions of the computer like movement, storage, processing of data OS as resource manager Contd… kernel Resources managed by the OS OS as resource manager Contd… Resources the OS control are – Main memory – I/O devices and Files – Processor OS controlling main memory – A portion of OS (Kernel) resides in the main memory – Kernel contain Frequently used functions Portions of OS which are currently in use – Main memory = Kernel + user programs + data – Main memory allocation is done by OS and memory management hardware in the processor OS as resource manager Contd… OS controls I/O and files – Decides when an I/O can be used by a program in execution – Controlled access of files OS controls the processor – Determines the processor time for the execution of a program

Use Quizgecko on...
Browser
Browser