You are on page 1of 42

What’s this course about?

This course introduces


The tasks and components of an operating system and
how they influence the operation of user-level programs,
How the computer architecture and programming
languages interact with the OS to manage concurrent
activities and
Android and iOS mobile operating systems,
Multicore systems
How the OS manages resources and provides protection
and security

Operating System Concepts – 9th Edition 1.1 Silberschatz, Galvin and Gagne ©2013
Why Study Operating Systems?
Simply because, as almost all code runs on top of an
operating system,
Knowledge of how operating systems work is crucial
to proper, efficient, effective, and secure
programming.

Understanding the fundamentals of operating


systems, how they drive computer hardware, and
what they provide to applications is not only essential
to those who program them but also highly useful to
those who write programs on them and use them.

Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013
Course Contents
Introduction to Operating System :
Operating system definition, simple batch systems, multiprogramming, time-sharing, personal
computer systems, parallel systems.
Computer-System Structures & Operating-System Structures :
Computer System Operation, I/O Structure , storage Structure, Storage Hierarchy, Hardware
Protection, General System Architecture, System Components, Operating System Services,
System Calls, System Programs, System Structure, Virtual Machines, System Design and
Implementation, System Generation
Processes :
Introduction to process, process scheduling, operations on processes, cooperating processes,
interprocess communications, interrupts.
Process synchronization:
Critical-section problem, synchronizing hardware, semaphores, synchronization problems, critical
regions, process monitors
CPU scheduling :
Criteria and algorithms, multiple process and real-time scheduling, algorithm evaluation
Deadlocks: Methods for Handling Deadlocks, Deadlock Avoidance, Deadlock Detection, Deadlock
Prevention, Recovery from Deadlock
Memory Management

Operating System Concepts – 9th Edition 1.3 Silberschatz, Galvin and Gagne ©2013
Textbook

Abraham Silberschatz, Peter Baer Galvin


and Greg Gagne: Operating System
Concepts with Java, 10th edition, John
Wiley & Sons, Inc., 2018. ISBN: 978-1-
119-32091-3

Operating System Concepts – 9th Edition 1.4 Silberschatz, Galvin and Gagne ©2013
Chapter 1: Introduction

Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
Chapter 1: Introduction
What Operating Systems Do
Computer-System Organization
Computer-System Architecture
Operating-System Operations
Resource Management
Security and Protection
Virtualization
Distributed Systems
Kernel Data Structures
Computing Environments

Operating System Concepts – 9th Edition 1.6 Silberschatz, Galvin and Gagne ©2013
Computer System Overview
A computer system consists of HW& SW that
are combined to provide a tool to solve
specific problems
Application SW: a tool to solve specific problem
System SW: a general environment to create
specific application
General shape of the system

Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition
An OS is a program which acts as an interface between
computer system users and the computer hardware.
It provides a user-friendly environment in which a user
may easily develop and execute programs.
Otherwise, hardware knowledge would be mandatory
for computer programming.
So, it can be said that an OS hides the complexity of
hardware from uninterested users.

Operating System Concepts – 9th Edition 1.8 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

In general, a computer system has some resources


which may be utilized to solve a problem. They are
Memory
Processor(s)
I/O
File System
etc.

Operating System Concepts – 9th Edition 1.9 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

Mainboard

Operating System Concepts – 9th Edition 1.10 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

Operating System Concepts – 9th Edition 1.11 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

mainboard

Operating System Concepts – 9th Edition 1.12 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

processor

Operating System Concepts – 9th Edition 1.13 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

RAM

Operating System Concepts – 9th Edition 1.14 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

 The OS manages these resources and allocates them to specific programs


and users.
 With the management of the OS, a programmer is rid of difficult hardware
considerations.
 An OS provides services for
 Processor Management
 Memory Management
 File Management
 Device Management
 Concurrency Control

Operating System Concepts – 9th Edition 1.15 Silberschatz, Galvin and Gagne ©2013
1.1 General Definition

Another aspect for the usage of OS is


that; it is used as a predefined library for
hardware-software interaction. Application Programs

This is why, system programs apply to


the installed OS since they cannot reach System Programs
hardware directly.
Operating System

Machine Language

HARDWARE

Operating System Concepts – 9th Edition 1.16 Silberschatz, Galvin and Gagne ©2013
Hardware
Hardware resources
Processor
Memory
I/O controller

Operating System Concepts – 9th Edition 1.17 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

It all started with computer hardware in about 1940s.

ENIAC 1943
Operating System Concepts – 9th Edition 1.18 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

ENIAC (Electronic Numerical Integrator and Computer),


at the U.S. Army's Aberdeen Proving Ground in
Maryland.
built in the 1940s,
weighted 30 tons,
was eight feet high, three feet deep, and 100 feet
long
contained over 18,000 vacuum tubes that were
cooled by 80 air blowers.

Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Computers were using vacuum tube technology.

ENIAC’s vacuum tubes

Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

ENIAC’s backside

Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Programs were loaded into memory manually using switches,


punched cards, or paper tapes.

ENIAC : coding by cable connections


Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

punch card

Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Paper tape

Operating System Concepts – 9th Edition 1.25 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Operating System Concepts – 9th Edition 1.26 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Babbage’s analytical engine


(designed in 1840’s by Charles Babbage)
An earlier and simpler version is constructed in 2002, in London )

http://www.computerhistory.org/babbage/
Operating System Concepts – 9th Edition 1.27 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Ada Lovalence (at time of Charles Babbage) wrote code for analytical
engine to compute Bernulli Numbers

Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013
History of Operating Systems
Operating systems have been evolving through the years. Following table
shows the history of OS.

Operating System Concepts – 9th Edition 1.29 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

As time went on, card readers, printers, and magnetic


tape units were developed as additional hardware
elements.
Assemblers, loaders and simple utility libraries were
developed as software tools.
Later, off-line spooling and channel program methods
were developed sequentially.

Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Finally, the idea of multiprogramming came.


Multiprogramming means sharing of resources
between more than one process.
By multiprogramming the CPU time is not wasted,
because, while one process moves on some I/O work, the
OS picks another process to execute till the current one
passes to I/O operation.

Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

With the development of interactive computation in 1970s,


time-sharing systems emerged.
In these systems, multiple users have terminals (not
computers) connected to a main computer and execute
their tasks in the main computer.

Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Main computer; having a


CPU executing processes by
utilization of the OS, (e.g.
UNIX).

Terminals are
connected to the main
computer and used for
input and output. No
processing is made.
They do not have
CPUs.

Operating System Concepts – 9th Edition 1.33 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Another computer system is the multiprocessor system


having multiple processors sharing memory and
peripheral/terminal devices.
With this configuration, they have greater computing power
and higher reliability.

Operating System Concepts – 9th Edition 1.34 Silberschatz, Galvin and Gagne ©2013
1.2 History of Operating Systems

Multiprocessor systems are classified into two types as


tightly-coupled and loosely-coupled (distributed).
In the tightly-coupled one, each processor is
assigned a specific duty but processors work in close
association, possibly sharing the same memory.
In the loosely coupled one, each processor has its
own memory and copy of the OS.

Operating System Concepts – 9th Edition 1.35 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 – 9th Edition 1.36 Silberschatz, Galvin and Gagne ©2013
What is an Operating System?

The operating system must support the following


tasks:
1. Provides the facilities to create, modification
of program and data file using and editor
2. Access the complier for translating the user
program from high level language to machine
language
3. Provides loader program to move the
complied program code to the computers
memory for execution
4. Provide routines that handle details of I/O
programming

Operating System Concepts – 9th Edition 1.38 Silberschatz, Galvin and Gagne ©2013
Computer Startup

bootstrap program is loaded at power-up or reboot


Typically stored in ROM or EPROM, generally known
as firmware
 permanent software programmed into a read-only
memory.

Initializes all aspects of system


Loads operating system kernel and starts execution

program always
running on the
computer

Operating System Concepts – 9th Edition 1.44 Silberschatz, Galvin and Gagne ©2013
Storage-Device Hierarchy

Operating System Concepts – 9th Edition 1.54 Silberschatz, Galvin and Gagne ©2013
Process Management
A process is a program in execution. It is a unit of work within the
system. Program is a passive entity, process is an active entity.
Process needs resources to accomplish its task
CPU, memory, I/O, files
Initialization data
Process termination requires reclaim of any reusable resources
Single-threaded process has one program counter specifying
location of next instruction to execute
Process executes instructions sequentially, one at a time,
until completion
Multi-threaded process has one program counter per thread
Typically system has many processes, some user, some
operating system running concurrently on one or more CPUs
Concurrency by multiplexing the CPUs among the processes
/ threads

Operating System Concepts – 9th Edition 1.71 Silberschatz, Galvin and Gagne ©2013
Process Management Activities

The operating system is responsible for the following activities in


connection with process management:
Creating and deleting both user and system processes
Suspending and resuming processes
Providing mechanisms for process synchronization
Providing mechanisms for process communication
Providing mechanisms for deadlock handling

Operating System Concepts – 9th Edition 1.72 Silberschatz, Galvin and Gagne ©2013
End of Chapter 1

Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013

You might also like