Vous êtes sur la page 1sur 30

Operating System

McGraw-Hill Technology Education

Copyright 2006 by The McGraw-Hill Companies, Inc. All rights reserved.

Operating System
A program that controls the execution of application programs An interface between applications and hardware 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.

Convenience
Makes the computer more convenient to use

Efficiency
Allows computer system resources to be used in an efficient manner

Ability to evolve
Permit effective development, testing, and introduction of new system functions without interfering with service

Computer System Components


1.Hardware provides basic computing resources (CPU, memory, I/O devices). 2.Operating system controls and coordinates the use of the hardware among the various application programs for the various users. 3. Applications programs define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). 4. Users (people, machines, other computers).

Layers of Computer System

Abstract View of System Components

Functions of Operating Systems


Provide a user interface Run programs Manage hardware devices Organized file storage

7A-8

Providing a User Interface


User interface
How a user interacts with a computer Require different skill sets

Providing a User Interface


Graphical user interface (GUI)
Most common interface
Windows, OS X, Gnome, KDE

Uses a mouse to control objects Uses a desktop metaphor Shortcuts open programs or documents Open documents have additional objects Task switching Dialog boxes allow directed input

Graphical User Interface

Providing a User Interface


Command line interfaces
Older interface
DOS, Linux, UNIX

User types commands at a prompt User must remember all commands Included in all GUIs

Command Line Interface

Running Programs
Many different applications supported System call
Provides consistent access to OS features

Share information between programs


Copy and paste Object Linking and Embedding

Managing Hardware
Programs need to access hardware Interrupts
CPU is stopped Hardware device is accessed

Device drivers control the hardware

Organizing Files and Folders


Organized storage Long file names Folders can be created and nested All storage devices work consistently

Types of Operating Systems


Real-time operating system
Very fast small OS Built into a device Respond quickly to user input MP3 players, Medical devices

Types of Operating Systems


Single user/Single tasking OS
One user works on the system Performs one task at a time MS-DOS and Palm OS Take up little space on disk Run on inexpensive computers

Types of Operating Systems


Single user/Single tasking OS
One user works on the system Performs one task at a time MS-DOS and Palm OS Take up little space on disk Run on inexpensive computers

Single Tasking
Operating System cannot be able to take control back from the running process/task/application In case if a process call an I/O Instruction then Processor must wait for I/O instruction to complete before preceding

Types of Operating Systems


Single user/Multitasking OS
User performs many tasks at once Most common form of OS Windows XP and OS X Require expensive computers Tend to be complex

Multitasking
Operating System can take control back from the running process and can give it to other. When one job needs to wait for I/O, the processor can switch to the other job

Process
A process is a name given to a program instance that has been loaded into memory and managed by the operating system As process executes over time it can be doing either of the activities or is in following states

Scheduling
What exactly is Scheduling? In computer science, scheduling is the method by which threads, processes or data flows are given access to system resources (e.g. processor time, communications bandwidth). This is usually done to load balance a system effectively or achieve a target quality of service.

Why do we need Scheduling? The basic reason behind the implementation of Scheduling Algorithms is that the modern computersystems of today rely on multi-tasking and multiplexing.

Goals of CPU Scheduling A good scheduling algorithm is designed to have the following features: Utilization/Efficiency: Keep the CPU busy 100% of the time with useful work. Throughput: Maximize the number of jobs processed per hour. Turnaround time: From the time of submission to the time of completion, minimize the time batch users must wait for output. Waiting time: Sum of times spent in ready queue, minimize this.

Response Time: Time from submission till the first response is produced, minimize response time for interactive users.
Fairness: Make sure each process gets a fair share of the CPU.

TYPES OF CPU SCHEDULING


The aim of processor scheduling is to assign processes to be executed by the processor or processors over time, in a way that meets system objectives, such as response time, throughput, and processor efficiency. In many systems, this scheduling activity is broken down into three separate functions: Long Medium Short-term

Vous aimerez peut-être aussi