Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating System Concepts

Similar presentations


Presentation on theme: "Operating System Concepts"— Presentation transcript:

1 Operating System Concepts

2 Course Instructor: Samra Irshad
Lecturer CS

3 Objective To develop an understanding of and appreciation for the role of Operating Systems in Computing Environments

4 TEXT Book: Operating System Concepts by Abraham Silberschatz, Peter B. Galvin and Greg Gagne Reference Books: Operating System: Internals and Design principles by William Stallings. Operating Systems by Harvey M. Deitel, Paul J. Deitel, David R. Choffnes No Restriction: Different Books. You can choose the book of your own choice Web Sites & Material: will refer you to different web sites and will provide you with different notes if its required.

5 Course requirements Assignments/Quizes
Written assignments (Small Tasks) (details in coming lectures) Idea is to initiate research oriented writing not “cut-copy-paste” Attendance, Presentations, Quiz & Class Discussion & Participation (as a regular activity) Volunteer presentations (you must not be that familiar with this kind of stuff but you need to respond to it quickly!) Formal Presentations in groups

6 Examination Every thing discussed, during the class or given as reading material, could be part of the exams Questions will be formulated in a way to examine conceptual thinking Other details will be given close to Sessional

7 Course Contents Basic Concepts Structures and Functions
Process Management Threads Management Inter-Process Communication Synchronization Deadlocks Memory Management Virtual Memory Management File Systems I/O Systems

8 Chapter 1: Introduction
Basics of Computer Organization and relation with operating systems Operating System concept and motivation Types of Systems/Operating Systems C0mputer Systems Architecture Important functions of operating systems

9 Lecture 1 Operating System
What is an OPERATING SYSTEM ? Purpose ? Any raw idea… ? Computer System ?

10 Computer System Computer System- why do we use it?
Allows you to solve problems Provides you tools/applications, using those tools you can develop programs which will ultimately solve your needs

11 Computer System Computer system is composed of hardware and software
Hardware components that comprise the physical entity of device CPU RAM I/O devices

12 Computer Organization basics
CPU (Central Processing Unit) : Function of this unit ? ‘Executes a program’ Contains: Arithmetic and Logic Unit for manipulating data A number of registers for storing data Control circuits for fetching and executing instructions

13 CPU Cycle CPU cycle- Fetching, Decoding and Executing
Fetching an instruction- CPU reads an instruction from memory Decoding an instruction- determining what actions the instruction require Executing- carrying out those actions

14 Memory Where all the programs/data is stored ?
Web browsers, word processor etc… Initially data/program is stored in ‘disk storage’, (also known as ‘secondary memory’). For a program to run/execute, it must reside in ‘MAIN MEMORY’ (RAM)

15 Secondary Storage Secondary Storage- as an extension to main memory
Why not store the programs and data all at once in main memory ? Types of storage devices Registers, cache, main memory, electronic disk, magnetic disk, magnetic tapes

16 RAM RAM: Random Access Memory.. Why called Random Access Memory ?
Program is brought into main memory from secondary storage so that it can be executed CPU can access ANY location in memory at random and retrieve information within a fixed interval of time

17 Execution of a program Primary purpose of a computer system is to generate executable programs and execute them. Following are some of the main issues involved in performing these tasks. Storing an executable program on a secondary storage device such as hard disk Loading executable from disk into the main memory CPU state appropriately so that program execution could begin Multiple processes, synchronizing their access to shared data, and allowing them to communicate with each other

18 I/O devices I/O devices: Human interaction with the system through Input/output devices Real-time data Computer Organization: the way hardware components operate and the way they are connected together to form a computer system Hardware components: CPU, Memory and I/O

19 Motivation for OS If we have only the computer hardware system, what we can do with it ? What are the things required to make a computer system ‘ACTUALLY’ useful ?

20 b) Operating System A platform/software needed .. Is it so ?

21 Operating System Basics
Now coming to Operating Systems….. Essential part of a computer system Provides services to computer user To make more effective use of computer Why do we study it?... To get the knowledge of services provided by operating system

22 Layered Structure

23 Multiprogrammed Systems
Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.

24 c) Types of Operating Systems
Early systems Batch systems Multiprogrammed systems Time-sharing systems Real-time embedded systems

25 Multi-programmed Systems
Job pool Job-scheduling CPU scheduling CPU scheduling: The decision making to select a process out of several processes ready for processing is called CPU scheduling.

26 OS Features Needed for Multiprogramming
Memory management – the system must allocate the memory to several jobs. CPU scheduling – the system must choose among several jobs ready to run.

27 Time-Sharing Systems- Interactive Computing
Multi-programmed systems did not provide user interaction The CPU executes multiples jobs by switching among them Switches occur frequently Each job is allocated a small portion of CPU time On-line communication between the user and the system is provided The CPU is multiplexed among several jobs that are kept in memory and on disk The CPU is allocated to a job only if the job is in memory A job is swapped in and out of memory to the disk

28 Real-Time Systems When given an input, O/P must respond in a very well-defined period of time Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Real-Time systems may be either hard (guarantees that critical tasks be completed on time, if not then catastrophe may happen) or soft real-time (no fear of catastrophe)

29 Bootstrap program Bootstrap program: A program whose function is to start the computer software operating when the power is turned on. Loads a portion of OS to main memory and control is then transferred to OS which prepares the computer for general use

30 Interrupts and Traps Interrupts- Interrupting the normal execution of processor… Examples ? Usually produced by I/O devices Must be handled by the processor by interrupting execution of the currently running process Traps- Events produced by execution of certain instructions…. Examples ?

31 Von-neumann Architecture VS Harvard Architecture
Volatile VS Non-volatile

32 Storage Device Hierarchy

33 d) Computer-System Architecture
Single processor systems Single CPU Can also include I/O processor e.g. disk controller processor Multiprocessors systems Also known as parallel systems, tightly-coupled systems Advantages include Increased throughput Economy of scale Increased reliability – graceful degradation or fault tolerance

34 Multi-processing Systems

35 Multiprocessor systems
Two types of Multiprocessing: Asymmetric Multiprocessing assigns certain tasks only to certain processors, Master-slave concept… Master processor schedules and allocates work to the slave processors Symmetric Multiprocessing - treats all of the processing elements in the system identically Key role – the scheduler

36 e) Operating System - A Resource Manager (Important functions)
Resource Manager: Resources- CPU, Memory and I/O

37 Secondary Storage Management
Manage secondary storage devices Allocate appropriate amount of disk space when files are created De-allocate space when files are removed Ensure that a new file does not overwrite an existing file

38 Main Memory Management
Manage primary storage (main memory) Allocate appropriate amount of memory space when programs are to be loaded into the memory for execution De-allocate space when processes terminate Ensure that a new program is not loaded on an existing program Minimize the amount of unused memory space Allow execution of programs larger in size than the available main memory Virtual Memory

39 Processes A program in execution is called a process
Single-user and Multiple users In case of multiple processes, how the CPU will be allocated to those evenly ? Some processes getting maximum of CPU time while others are being allocated less ? CPU-time scheduling

40 Process Management Manage processes
Allow simultaneous execution of processes by scheduling the CPU Prevent deadlocks between processes Ensure integrity of shared data Synchronize executions of cooperating processes

41 References Operating System Concepts by Silberschatz (7th edition)
Computer System Architecture by Morris Mano (3rd edition)


Download ppt "Operating System Concepts"

Similar presentations


Ads by Google