Chapter 3 Operating Systems. 2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System Architecture 3.3 Coordinating the.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Advertisements

Operating System.
1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is.
Operating System (O.S.) Objectives & Functions
Chapter 3 Operating Systems. Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System.
Operating Systems: Software in the Background
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Operating Systems BTEC IT Practitioners.
Chapter 11 Operating Systems
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Operating system Part three Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
A. Frank - P. Weisberg Operating Systems Evolution of Operating Systems.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Part two. 3.2 operating system architecture  Software have two categories  Application software  System software  Application software: consists of.
CMSC 1041 Operating Systems I An Introduction to Operating System Concepts.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Introduction to Operating Systems
Operating system Part two Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Operating Systems What do you have left on your computer after you strip away all of the games and application programs you bought and installed? Name.
Part II: Software In part II, we focus on topics associated with software. In particular, we will investigate the discovery, representation, and communication.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Eleventh Edition.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
Lecture 8: 9/19/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
1 Sec (3.2) Operating System Architecture OS. 2 Software dividing into two categories: 1. Application software 2. System Software  Operating System 
Chapter 3 Operating Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Operating Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 3: Operating Systems
Operating System Principles And Multitasking
Computer Science/Ch.3 Data Manipulation 3-1 Chapter 3 Data Manipulation.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
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.
CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts.
Chapter 3 Operating Systems. © 2005 Pearson Addison-Wesley. All rights reserved 3-2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Chapter 7 Operating Systems Foundations of Computer Science  Cengage Learning 1.
OPERATING SYSTEM REVIEW. System Software The programs that control and maintain the operation of the computer and its devices The two parts of system.
Operating Systems (Credit to: Rick Graziani of Cabrillo College)
Operating Systems Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
CT101: Computing Systems Introduction to Operating Systems.
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.
Introduction to Operating Systems
Chapter 3: Operating Systems
An Introduction to Operating Systems
Introduction to Operating System (OS)
IS310 Hardware & Network Infrastructure Ronny L
Chapter 3: Operating Systems
What is an Operating System?
Shell & Kernel Concepts in Operating System
Operating System Architecture OS
Operating Systems.
Chapter 3 Operating Systems
Chapter 3: Operating Systems
Chapter 3: Operating Systems
CS149D Elements of Computer Science
Introduction to Operating Systems
Chapter 3: Operating Systems
Chapter 3: Operating Systems Computer Science: An Overview
Chapter 3: Operating Systems
Chapter 3: Operating Systems
Presentation transcript:

Chapter 3 Operating Systems

2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System Architecture 3.3 Coordinating the Machine ’ s Activities 3.4 Handling Competition Among Processes 3.5 Security

3 Some functions of an operating system Control and Oversee operation of computer Store and retrieve files Schedule programs for execution Execute programs Ex:Microsoft Linux(By Linus Torvalds)Open sourcce

4 Evolution of shared computing Single-Processor Systems: Program execution of earlier computers requires significant preparation of equipments. Mounting, placing the punched cards, setting the switches, and so on. Each program execution is referred to as a job, an isolated activity. The next user only gains the full control of the computer after the completion of the current user. [sequentially] Batching processing executes a batch of collected jobs pending in the job queue(first-in, first-out) (FIFO) without further interaction with users.

5 Evolution of shared computing Single-Processor Systems: Interactive processing carries on a dialogue with the user. --It involves real-time processing for the machine to interact with its environment. --Reservation systems, word processing, computer games. To serve more than one user or job at a time, time-sharing technique divides time into time intervals or time slices, each designated to one task. --Time-sharing used in single-user systems is usually called multitasking. --Tradeoffs: The overhead to rapidly shuffle the jobs to gain the illusion of concurrent execution of several jobs. The time wasted to await the completion of peripheral devices or user’s inputs. Multiprocessor Systems: With networks like the Internet, many small machines can flexibly collaborate for computing, in contrast to an expensive large central machine. [Grid Computing]

6 Evolution of shared computing Batch processing Job queue Time-sharing Multi-tasking: multiple tasks for a single user Interactive processing Real-time processing Scheduling multiprocessor machines

7 Figure 3.1 Batch processing

8 Figure 3.2 Interactive processing

9 Types of software Application software  perform specific tasks for users spreadsheets, database systems, word processing systems, program development software, games, and so forth.  System software: perform tasks needed by all computer systems Operating system abstracts the underlying hardware for the rest of software Utility software performs fundamental activities, yet not included in the OS for simplicity.Disk formatting, file copying, dial-up, compression, etc.

10 Figure 3.3 Software classification

11 Components of an operating system Shell: portion that communicates with users Graphical user interface (GUI) pictorially represents the objects on the screen, and accept the commands like mouse-clicking for execution. Textual shells(Borne shell, Korn shell, C shell, TC shell, MS-DOS) is light weighted only accepting the commands issued by a keyboard. Window manager is the component to govern the screen layout of GUI

12 Components of an operating system Kernel: contains components performing basic required functions File manager- -coordinates the use of mass storage facilities.It keeps records of all the files: location (directory, folder, sub-directory, path), access permission and history (file descriptor), free available space, etc. Device drivers-- are installed into the kernel to drive the corresponding peripheral devices using encapsulated activation steps specified for each device. Memory manager Scheduler and dispatcher

13 Components of an operating system Scheduler- - According to some priorities or concerns, it determines which activities should be considered for execution. Dispatcher- -It administrates the allocation of time slices to the activitiesbeing executed.

14 Figure 3.4 The shell as an interface between users and the operating system

15 File Manager Directory or folder: user-created group or bundle of files Path: position of a file in directory hierarchy File descriptor: information needed to access an open file

16 Memory manager Coordinate the machine ’ s use of main memory Total main memory required exceeds available(I.e., 512MB is requires but only 256MB available), it creates the illusion of additional memory space by rotating back and forth of program and data between main memory and mass storage

17 Memory manager Page: divide the required space into units called page (a few kilobytes) and store the content of the page in mass storage Virtual memory: illusionary memory space Created by shuffling units of data, called pages, between actual main memory space and mass storage

18 Getting it started (bootstrapping) Bootstrap: program in read only memory (ROM) Run by the CPU when power is turned on Transfers operating system from mass storage to main memory Executes jump to operating system

19 Figure 3.5 The booting process

20 BIOS(Basic Input/output System) In addition to bootstrap, read only memory (ROM) contains a set of routines for fundamental input/output activities Receive information from keyboard, display message on screen

21 Processes Program = a static set of directions --A program can be run multiple times, each instance/activity called a process. Process = the activity of executing a program --Each process has its own process state, recording the current status of the activity. Process state = current status of the activity Snapshot of relevant parts of the machine state Program counter, other registers, associated main memory

22 Process administration Scheduler Keeps state of all processes in an process table(in main memory) It contains — assigned memory area, priority and ready/waiting Ready if its progress can continue, or waiting if it is awaiting some external events to occur, and so on Priority Non-scheduling information: memory pages, etc.

23 Process administration (continued) Dispatcher Gives one time slice or quantum to a process that is ready Executes a process switch (or context switch) when the running process ’ s time slice is over A timer circuit counts down the quantum and generates an interrupt at the end. Such process switch involves updating the snapshot of the current process, restoring the snapshot of the next process, and then starting its execution. A program, called interrupt handler, is run for scheduler to update the process table, select the next process, …Early termination of quantum is also possible. Interrupt indicates that time slice is over Interrupt handler: part of dispatcher

24 Figure 3.6 Time-sharing between process A and process B

25 Handling competition for a resource System resources are shared among processes. --Some non-shareable resources like printers should not be simultaneously written by more than one process.  Using a flag with the status of set(allocated) and clear(available), there seems to be only one process allowed to write to the very resource.  OS checks the flag and to decide set or clear(note:check and set may require several machine cycle to finish)  Due to process switch, two processes may just be aware of the clear flag right before being preempted.  During the following quantum, they will proceed to write. ⇒ problem occurs!!

26 Handling competition for a resource Remedies: testing and setting the flag must be completed w/o interruption. (atomic) Semaphore = a control flag telling if resource is in use Test and set must be done together for proper function Critical region = sequence of instructions that should be executed by only one process at a time Usually protected by a semaphore Mutual exclusion = requirement for proper implementation of a critical region

27 Deadlock Two processes block each other from continuing Conditions that lead to deadlock 1. Competition for non-sharable resources 2. At least two resources are needed by both processes The resources are requested on a partial basis: having some, while requesting more. 3. An allocated resource can not be forcibly retrieved

28 Deadlock Deadlock ⇔ cyclic wait-for graphs in the process table. The super-users may kill some processes for the rest to be finished. Deadlock avoidance schemes try to alter the first two conditions. To avoid the 2 nd condition, each process is required to request all its resources at a time. To prevent the 1 st condition, non-shareable resources are converted into sharable ones.

29 Figure 3.7 A deadlock resulting from competition for nonshareable railroad intersections

30 Spooling Postpone requested operation until a later time Makes a non-shareable resource appear shareable Technique of deadlock avoidance Printer spooling may be used for processes to write to their own designated disk space, instead of directly to the printer.Then, OS sends these printouts to the printer in series. Multiple read accesses to a file finely coexist, but conflict with any other write access.

31 Security from outside attacks Most common protection: require user name and password Problem: password stealing Problem: automated password guessers Counter measures: Always tell user when he/she last logged in Report repeated bad guesses Log the guesser into a captive account to spy on the guesser

32 Security from attacks from within Operating system prevents illegal access to resources Different memory for different processes Privileged instructions only allowed in kernel All file access passes through the kernel Other devices can only be accessed through the kernel