0% found this document useful (0 votes)
27 views

Chapter - 1

Uploaded by

ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Chapter - 1

Uploaded by

ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Operating Systems-

Systems-1
1- ‫نظم تشغيل‬
3-‫ عال‬251

Operating System Concepts 1.1 Silberschatz, Galvin and Gagne ©2013


Grading Scheme

Assignment Points
Exam-I (Theory) 10

Exam-II (Theory) 10

Practicals (I & II) 15

E-Learning (Assignments, Quizzes) 15

Final Exam 50
Total 100

2
Operating System Concepts 1.2 Silberschatz, Galvin and Gagne ©2013
Chapter 1: Introduction to
Operating system

Operating System Concepts Silberschatz, Galvin and Gagne ©2013


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
Operating System Concepts 1.4 Silberschatz, Galvin and Gagne ©2013
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 Concepts 1.5 Silberschatz, Galvin and Gagne ©2013


Operating System Definition (Cont)

 “The one program running at all times on the

computer” is the kernel. Everything else is


either a system program (ships with the
operating system) or an application program

Operating System Concepts 1.6 Silberschatz, Galvin and Gagne ©2013


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 – define the ways in which the system
resources are used to solve the computing problems of the
users
 Word processors, compilers, web browsers, database
systems, video games
 Users
 People, machines, other computers

Operating System Concepts 1.7 Silberschatz, Galvin and Gagne ©2013


Four Components of a Computer System

Operating System Concepts 1.8 Silberschatz, Galvin and Gagne ©2013


What Operating Systems Do
 The operating system controls the hardware and coordinates its use
among the various application programs for the various users.
 We can also view a computer system as consisting of hardware,
software, and data.
 The operating system provides the means for proper use of these
resources in the operation of the computer system.
 An operating system is similar to a government. Like a government, it
performs no useful function by itself. It simply provides an
environment within which other programs can do useful work.
 To understand more fully the operating system's role, we explore
operating systems from two viewpoints:
 The user
 The system.

Operating System Concepts 1.9 Silberschatz, Galvin and Gagne ©2013


User View
The user's view of the computer varies according to the interface
being used

 Single user computers (e.g., PC, workstations). Such systems


are designed for one user to monopolize its resources. The goal
is to maximize the work (or play) that the user is performing. the
operating system is designed mostly for ease of use and good
performance.
 Multi user computers (e.g., mainframes, computing servers).
These users share resources and may exchange information.
The operating system in such cases is designed to maximize
resource utilization -- to assure that all available CPU time,
memory, and I/O are used efficiently and that no individual users
takes more than their air share.

Operating System Concepts 1.10 Silberschatz, Galvin and Gagne ©2013


User View (Cont.)
 Handheld computers (e.g., smartphones and tablets). The user

interface for mobile computers generally features a touch


screen. The systems are resource poor, optimized for usability
and battery life.

 Embedded computers (e.g., computers in home devices and

automobiles) The user interface may have numeric keypads and


may turn indicator lights on or off to show status. The operating
systems are designed primarily to run without user intervention.

Operating System Concepts 1.11 Silberschatz, Galvin and Gagne ©2013


Evolution of Computer Systems

Users

Applications

Database System
Operating System
Hardware

Operating System Concepts 1.12 Silberschatz, Galvin and Gagne ©2013


Computer-System Organization
 A modern general-purpose computer system consists of one or
more CPUs and a number of device controllers connected
through a common bus that provides access to shared memory.
 Each device controller is in charge of a specific type of device
(for example, disk drives, audio devices, or video displays). Each
device controller has a local buffer.
 CPU moves data from/to main memory to/from local buffers.
 The CPU and the device controllers can execute in parallel,
competing for memory cycles. To ensure orderly access to the
shared memory, a memory controller synchronizes access to the
memory.

Operating System Concepts 1.13 Silberschatz, Galvin and Gagne ©2013


Modern Computer System

Operating System Concepts 1.14 Silberschatz, Galvin and Gagne ©2013


Storage Structure
 Main memory – the only large storage media that the CPU can access
directly
 Random access
 Typically volatile
 Secondary storage – extension of main memory that provides large
nonvolatile storage capacity
 Hard disks – rigid metal or glass platters covered with magnetic recording
material
 Disk surface is logically divided into tracks, which are subdivided into
sectors
 The disk controller determines the logical interaction between the
device and the computer
 Solid-state disks – faster than hard disks, nonvolatile
 Various technologies
 Becoming more popular
 Tertiary storage

Operating System Concepts 1.15 Silberschatz, Galvin and Gagne ©2013


Storage Definition

 The basic unit of computer storage is the bit. A bit


can contain one of two values, 0 and 1. All other
storage in a computer is based on collections of bits.
 A byte is 8 bits, and on most computers it is the
smallest convenient chunk of storage.
 A less common term is word, which is a given
computer architecture’s native unit of data. A word is
made up of one or more bytes.

Operating System Concepts 1.16 Silberschatz, Galvin and Gagne ©2013


Storage Definition (Cont.)
 Computer storage, along with most computer throughput, is
generally measured and manipulated in bytes and collections of
bytes.
 A kilobyte, or KB, is 1,024 bytes
 a megabyte, or MB, is 1,0242 bytes
 a gigabyte, or GB, is 1,0243 bytes
 a terabyte, or TB, is 1,0244 bytes
 a petabyte, or PB, is 1,0245 bytes
 exabyte, zettabyte, yottabyte
 Computer manufacturers often round off these numbers and say
that a megabyte is 1 million bytes and a gigabyte is 1 billion bytes.
Networking measurements are an exception to this general rule;
they are given in bits (because networks move data a bit at a
time).

Operating System Concepts 1.17 Silberschatz, Galvin and Gagne ©2013


Storage Hierarchy
 Storage systems organized in hierarchy
 Speed
 Cost
 Volatility
 Caching – copying information from “slow” storage into faster
storage system;
 Main memory can be viewed as a cache for secondary storage
 Device Driver for each device controller to manage I/O
 Provides uniform interface between controller and kernel

Operating System Concepts 1.18 Silberschatz, Galvin and Gagne ©2013


I/O Structure
 A general-purpose computer system consists of CPUs and
multiple device controllers that are connected through a common
bus.
 Each device controller is in charge of a specific type of device.
More than one device may be attached. For instance, seven or
more devices can be attached to the small computer-systems
interface (SCSI) controller.
 A device controller maintains some local buffer storage and a set
of special-purpose registers.
 The device controller is responsible for moving the data between
the peripheral devices that it controls and its local buffer storage.
 Typically, operating systems have a device driver for each device
controller. This device driver understands the device controller
and provides the rest of the operating system with a uniform
interface to the device.

Operating System Concepts 1.19 Silberschatz, Galvin and Gagne ©2013


I/O Structure (Cont.)
 To start an I/O operation, the device driver loads the
appropriate registers within the device controller.
 The device controller, in turn, examines the contents of
these registers to determine what action to take (such
as “read” a character from the keyboard).
 The controller starts the transfer of data from the device
to its local buffer. Once the transfer of data is complete,
the device controller informs the device driver via an
interrupt that it has finished its operation.
 The device driver then returns control to the operating
system, possibly returning the data or a pointer to the
data if the operation was a read.
 For other operations, the device driver returns status
information.

Operating System Concepts 1.20 Silberschatz, Galvin and Gagne ©2013


Computer-System Architecture
 Single general-purpose processor
 Most systems have special-purpose processors as well
 Multiprocessors systems
 Also known as parallel systems, tightly-coupled systems
 Advantages include:
 Increased throughput
 Economy of scale
 Increased reliability – graceful-degradation/fault-tolerance
 Two types:
 Symmetric Multiprocessing – each processor performs all
tasks
 Asymmetric Multiprocessing – each processor is assigned
a specific task.

Operating System Concepts 1.21 Silberschatz, Galvin and Gagne ©2013


Computer-System Architecture

Operating System Concepts 1.22 Silberschatz, Galvin and Gagne ©2013


Computer System Architecture:
Single processor systems
 Most systems use a single general-purpose processor
 (PDAs through mainframes)
 Most systems have special-purpose processors as well

Operating System Concepts 1.23


23
Silberschatz, Galvin and Gagne ©2013
Computer System Architecture:
Multiprocessor systems
 Multiprocessor systems growing in use and importance
 Also known as parallel systems, tightly-coupled systems

 Advantages include
1. Increased throughput
2. Economy of scale (cheaper than using multiple computers)

3. Increased reliability – graceful degradation or fault tolerance

 Two types
1. Asymmetric Multiprocessing
2. Symmetric Multiprocessing

Operating System Concepts 1.24


24
Silberschatz, Galvin and Gagne ©2013
Clustered Systems
Like multiprocessor systems, but multiple systems working together
 Usually sharing storage via a storage-area network (SAN)
 Provides a high-availability service which survives failures
 Asymmetric clustering has one machine in hot-standby mode
 Symmetric clustering has multiple nodes running applications,
monitoring each other
 Some clusters are for high-performance computing (HPC)
 Applications must be written to use parallelization
 Some have distributed lock manager (DLM) to avoid conflicting
operations

Operating System Concepts 1.25 Silberschatz, Galvin and Gagne ©2013


Clustered Systems

Operating System Concepts 1.26 Silberschatz, Galvin and Gagne ©2013


Distributed Systems
 Distribute the computation among several physical processors.
 Loosely coupled system – each processor has its own local
memory; processors communicate with one another through various
communications lines, such as high-speed buses or telephone lines.
 Advantages of distributed systems.
 Resources Sharing
 Computation speed up – load sharing
 Reliability
 Communications

Operating System
Operating System Concepts 1.27 Silberschatz, Galvin and Gagne ©2013
Distributed Systems (Cont.)

 Network Operating System


 provides file sharing
 provides communication scheme
 runs independently from other computers on
the network
 Distributed Operating System
 less autonomy between computers
 gives the impression there is a single
operating system controlling the network.

Operating System Concepts 1.28 Silberschatz, Galvin and Gagne ©2013

You might also like