0% found this document useful (0 votes)
3 views36 pages

Os Chapter One

The document is a lecture on Operating Systems (OS) prepared by Haftu Meresa, covering the overview, history, objectives, and types of operating systems. It explains the role of an OS as an intermediary between users and hardware, the structure of computer systems, and the essential services provided by an OS. Additionally, it discusses components of OS, including the shell and kernel, and categorizes operating systems into five types.
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)
3 views36 pages

Os Chapter One

The document is a lecture on Operating Systems (OS) prepared by Haftu Meresa, covering the overview, history, objectives, and types of operating systems. It explains the role of an OS as an intermediary between users and hardware, the structure of computer systems, and the essential services provided by an OS. Additionally, it discusses components of OS, including the shell and kernel, and categorizes operating systems into five types.
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

Dire Dawa University Institute of Technology (DDUIoT)

School of Electrical and Computer Engineering (SECE)


Computer Engineering Chair
Operating Systems [ECEg-5192]

Lecture One: Introduction to OSs


Prepared by: Haftu Meresa, Sep, 2023
Outline 11/14/2023

 Overview of Operating System


 Computer System Organization

 Operating System Structures

 Objectives of OS

 Services Provided by OS

 Types of Operating Systems

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 2


Overview of Operating System 11/14/2023

 An operating system acts as an intermediary between the user of a


computer and the computer hardware.
 The purpose of an operating system is to provide an environment in
which a user can execute programs in a convenient and efficient manner.
 An operating system is software that manages the computer hardware.
 The hardware must provide appropriate mechanisms to ensure the
correct operation of the computer system and to prevent user programs
from interfering with the proper operation of the system.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 3


Overview of Operating System… 11/14/2023

 An Operating System (OS) is a software that acts as an interface


between computer hardware components and the user.

 Every computer system must have at least one operating system to run
other programs.

Applications like Browsers, MS Office, Notepad Games, etc., need some


environment to run and perform its tasks.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 4


Overview of Operating System… 11/14/2023

 An operating system is a software/program that manages computer’s


hardware and App programs.
 HWs: CPU, Memory and I/O devices provide computing resources
 App programs: games, compilers, & Web browsers define ways these
resources are used to solve computing problems
 OS: Unix, Linux, Windows, Android, Mac OS - controls and allocates
hardware and coordinates its use among applications programs for
various users
 Users: Us, applications, Robot etc...
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 5
Overview of Operating System… 11/14/2023

 OS is a program that controls the execution of a program and acts as an


intermediary between a user of a computer and the computer hardware.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 6


History of Operating Systems… 11/14/2023

 First generation 1945 - 1955


 Vacuum tubes, plug boards
 Operating systems were unheard of
 Second generation 1955 - 1965
 Transistors, assembly and FORTRAN
 Batch system was introduced
 Third generation 1965 – 1980
 ICs and multiprogramming
 Fourth generation 1980 – present
 Personal computers
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 7
Overview of Computer System 11/14/2023

 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.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 8


Overview of Computer System… 11/14/2023

 Basic Elements of computer system are:


 Processor
 Main Memory
 Volatile and is the primary memory.
 I/O modules
 Secondary memory devices
 Communications equipment
 Terminals
 System bus
 Communication among processors, memory, and I/O modules.
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 9
Overview of Computer System… 11/14/2023

 Top-Level Components

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 10


Overview of Computer System… 11/14/2023

 Whenever a computer starts, it needs to have an initial program to run.


 The initial program is also known as a bootstrap program.

 Bootstrap:

 Is stored in ROM

 Is an initial program runs when computer power is up or reboot.

 It locates and loads OS kernel into memory. (OS in HDD)

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 11


Overview of Computer System… 11/14/2023

 OS is interrupt driven and will be idle until some events occur.


The occurrence of an event is usually signaled by an interrupt(signaling the
CPU that some events occur).

 HW interrupt: trigger an interrupt at any time by sending a signal to the CPU

 SW interrupt: trigger an interrupt by executing a special operation called a


system call.

 Each interrupt has its own interrupt handler => Interrupt Service Routine.

ISR => interrupt handler.


OS Lecture 1 [by Haftu Meresa on Sep, 2023] 12
Overview of Computer System… 11/14/2023

 The CPU can load instructions only from memory, so any programs to run
must be stored there.

 General-purpose computers run most of their programs from rewritable


memory, called main memory (also called random-access memory, or
RAM).

 Main memory commonly is implemented in a semiconductor technology


called dynamic random-access memory (DRAM).

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 13


Overview of Computer System… 11/14/2023

 Computers use other forms of memory as well like read-only memory


(ROM) and electrically erasable programmable read-only memory,
(EEPROM).

 Because ROM cannot be changed, only static programs, such as the


bootstrap program described earlier, are stored there.

 EEPROM can be changed but cannot be changed frequently and so


contains mostly static programs. For example, smartphones have
EEPROM to store their factory-installed programs.
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 14
Overview of Computer System… 11/14/2023

 All forms of memory provide an array of bytes. Each byte has its own
address. Interaction is achieved through a sequence of load or store
instructions to specific memory addresses.

 The load instruction moves a byte or word from main memory to an


internal register within the CPU, whereas the store instruction moves the
content of a register to main memory.

 Aside from explicit loads and stores, the CPU automatically loads
instructions from main memory for execution.
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 15
Overview of Computer System… 11/14/2023

 Ideally, we want the programs and data to reside in main memory


permanently. This arrangement usually is not possible for the following
two reasons:

1. Main memory is usually too small to store all needed programs and data
permanently.

2. Main memory is a volatile storage device that loses its contents when
power is turned off or otherwise lost.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 16


Overview of Computer System… 11/14/2023

 Most computer systems provide secondary storage as an extension of


main memory.
The main requirement for secondary storage is that it be able to hold
large quantities of data permanently.
 The most common secondary-storage device is a magnetic disk, which
provides storage for both programs and data.
 Most programs (system and application) are stored on a disk until they
are loaded into memory.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 17


Overview of Computer System… 11/14/2023

 Many programs then use the disk as both the source and the destination
of their processing. Hence, the proper management of disk storage is of
central importance to a computer system

 The wide variety of storage systems can be organized in a hierarchy


according to speed and cost.

 The higher levels are expensive, but they are fast. As we move down the
hierarchy, the cost per bit generally decreases, whereas the access time
generally increases.
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 18
Overview of Computer System… 11/14/2023

 Storage-device hierarchy:

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 19


Computer System Architectures 11/14/2023

How a modern computer system works


OS Lecture 1 [by Haftu Meresa on Sep, 2023] 20
Computer System Architectures 11/14/2023

 A computer system can be organized in a number of different ways,


which we can categorize roughly according to the number of general-
purpose processors used.
 We have three computer systems based on number of general-purpose
processors they contain:
 Single-Processor Systems: Only one CPU.

 Multiprocessor Systems: More than one CPU.


 Clustered Systems: Composed of two or more individual systems.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 21


Operating System Structures 11/14/2023

 OS provides the env’t within which programs are executed.


 OS has the ability to multiprogram which increases CPU utilization.

 The fig in the left shows mem layout for multiprogramming.

 The OS picks and execute one of the jobs in memory, say job4.

 Eventually job4 may have to wait an input data from user, in

this case the OS will execute another job, job2.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 22


Operating Systems Objectives 11/14/2023

 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.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 23


Services Provided by the OS 11/14/2023

 Program development
 Utility programs like editors and debuggers.

 Program execution

 Handles the scheduling duties like loading instructions and data into
main memory, initializing I/O devices and files, and preparing other
resources must be prepared

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 24


Services Provided by the OS… 11/14/2023

 Access to I/O devices


 OS provides a uniform interface that hides details of I/O operations to the
devices so that programmers can access them using simple reads and writes.

 Controlled access to files


 Reflects detailed understanding structure of the data contained in the
files on the storage medium.
 In case of multiple users, the OS may provide protection mechanisms
to control access to the files.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 25


Services Provided by the OS… 11/14/2023

 System access

 Provides protection of resources and data from unauthorized users


and must resolve conflicts for resource contention.
 Error detection and response
 Errors that may occur due to different reasons:
 Internal and external hardware errors
 Software errors

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 26


Services Provided by the OS… 11/14/2023

 Errors:

 Internal and external hardware errors

 Memory error

 Device failure

 Software errors

 Arithmetic overflow

 Access forbidden memory locations

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 27


Services Provided by the OS… 11/14/2023

 Errors…

 OS must provide a response that clears the error condition with the least
impact on running applications. The response may include:

 Ending the program that caused the error

 Retrying the operation or

 Simply reporting the error to the application.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 28


Services Provided by the OS… 11/14/2023

 Accounting

 Collect usage statistics

 Monitor performance

 Used to anticipate future enhancements

 Used for billing purposes.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 29


Operating system subsystems 11/14/2023

 OS includes five essential subsystem managers:


 Memory Manager

 Processor Manager

 Device Manager

 File Manager

 Network manager

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 30


Components of an Operating Systems 11/14/2023

 There are two basic components of an Operating System.


 Shell

 Kernel
Operating system
Shell Kernel

Monolithic Micro Hybrid Exo

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 31


Components of an Operating Systems… (Shell) 11/14/2023

 Shell is the outermost layer of the Operating System and it handles the
interaction with the user.
 The main task of the Shell is the management of interaction between the
User and OS.
 Shell provides better communication with the user and the Operating
System Shell does it by giving proper input to the user it also interprets
input for the OS and handles the output from the OS.
 It works as a way of communication between the User and the OS.

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 32


Components of an Operating Systems… (kernel) 11/14/2023

 The kernel is the core component of the operating system.


 The rest of the components depends on Kernel for the supply of the
important services that are provided by the Operating System.
 The kernel is the primary interface between the Operating system and
Hardware.
 Kernel loads first into memory when an operating system is loaded and
remains into memory until operating system is shut down again.
 It is responsible for various tasks such as disk management, task
management, and memory management.
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 33
Components of an Operating Systems… (kernel) 11/14/2023

 The following functions are to be performed by the Kernel.


 It helps in controlling the System Calls.
 It helps in I/O Management.
 It helps in the management of applications, memory, etc.
There are four types of Kernel that are mentioned below.
 Monolithic Kernel: Unix, Linux, Open VMS, XTS-400 etc.
 Microkernel: Mach, L4, AmigaOS, Minix, K42 etc.
 Hybrid Kernel: Windows NT, Netware, BeOS etc
 Exokernel: Nemesis, ExOS etc.
OS Lecture 1 [by Haftu Meresa on Sep, 2023] 34
Types of Operating Systems 11/14/2023

 Five categories:
 Batch

 Interactive

 Real-time

 Hybrid

 Embedded

OS Lecture 1 [by Haftu Meresa on Sep, 2023] 35


11/14/2023

End of Lecture One,


Thank You for Your Attention!!
Lecture 2: Processes
[…Coming Soon]

OS Lecture 1 Ended!! 36

You might also like