OPERATING SYSTEM CONCEPT AND PRACTISE
Download
Report
Transcript OPERATING SYSTEM CONCEPT AND PRACTISE
OPERATING SYSTEM CONCEPT
AND PRACTISE
CSC633
INTRODUCTION
A computer is an electronic machine which
consists of hardware and software resources.
Hardware components refers to physical parts
of computer.
Software means computer instructions or data
that is stored electronically on computer.
A system refers to a complete working
computer.
Input devices are what is used to put data into
computer example mouse, keyboard
microphone etc.
Output devices are through which the
computer gives information to user example
printers, monitors, loudspeakers etc
There are two types of memory in Computer:
• Primary Memory
•
Secondary Memory
Primary memory is internal memory of
computer and provides main working space to
computer.
Terms under Primary memory
• Random Access Memory
• Read Only Memory
• Programmable Read Only
Memory(PROM)
• Cache Memory
• Erasable Programmable Read Only
Memory(EPROM)
Random Access Memory (RAM) is that can be
accessed randomly ,a common type of
memory found in computer and devices like
printers.
Read Only Memory(ROM) refers to special
memory used to store programs.
• In a programmable read only memory (PROM)
programs or instructions written cannot be
changed.
• In Erasable programmable read only
memory(EPROM) chip can be written again by
erasing the information stored earlier in it.
CPU is made up of 3 main parts :
Arithmetic Logic Unit(ALU)
Registers
Control Unit
Arithmetic Logic Unit (ALU) is a part of
computer in CPU used to perform all
arithmetic computations.
A Register is a high speed storage area in the
CPU
Control Unit is a component of CPU, it controls
and coordinates between input and output
devices.
The Motherboard serves to connect all of the
parts of a computer together.
A Motherboard is the piece of computer
hardware that can be thought of as the
“backbone” of pc.
Main memory is where anything that the
computer is working with is kept.
A Buffer is used for temporary storage of data
that is waiting to be sent to a device.
A Central Processing Unit (CPU) is the most
important element of computer system
where most calculations takes place.
The number of registers that a CPU has and
the size of each help determine the power and
speed of Central Processing Unit(CPU)
A Register is a high-speed storage area within the
Central Processing Unit(CPU). All data must be
represented in a register before it is processed.
The Register contains address of memory location
where data is stored.
Sometimes the speed of CPU is high compared to
access time of main memory, therefore the
performance of CPU decreases. To decrease this
mismatch a small memory chip is attached
between CPU and main memory known as cache.
What is an Operating System?
A program that acts as an intermediary
between a user of a computer and the
computer hardware.
The operating system is a chief piece of
software that manages all the hardware and
software resources.
Use the computer hardware in an efficient
manner.
Tasks of Operating system:
Memory Management
Human computer Interface
Error Reporting
File management
System software is a term given to set of
computer programs that make the hardware
work properly.
Four Components of a Computer
System
Computer system can be divided into 4
components:
Users: People, machines, other computers
Compiler: It is a computer program that
translates source code from a high level
programming language to a lower level
language
An assembler is a program that takes basic
computer instructions and converts them
into a pattern of bits.
A text editor is a type of program used for
editing plain text files
A Database is an organized collection of
data.
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
Hardware provides basic computing devices
like CPU, memory, I/O devices.
Operating System controls the use of
hardware among various applications and
users.
User View of Computer
• Most systems are designed for one user.
• Main goal is to maximize the work the user
performs.
• In some cases user is connected through a
minicomputer and other users access same
computer to exchange information.
• Some cases users sit at workstation connected
to a network of other stations
System View
• From computer's point of view, the operating
system is the program most intimately
involved with the hardware.
• Operating system is a resource allocator.
• A operating system is mainly to control
program.
COMPUTER SYSTEM ORGANIZATION
One or more CPUs, device controllers
connect through common bus providing
access to shared memory.
Each device controller is in charge of a
specific type of device (for example, disk
drives, audio devices, and video displays)
Central Processing Unit known as CPU is
the hardware within the computer.
For a computer to start running , when it is
rebooted it needs initial program named
bootstrap program.
Bootstrap must know how to load the
operating system and start executing.
It locates and load into memory the operating
system kernel.
The operating system executes the first
process such as Init.
The occurrence of event is signaled by an
interrupt.
When CPU is interrupted it stops and
immediately and transfers execution to fixed
location.
The location contains starting address where
service routine is located.
The fixed location usually contains the starting
address where the service routine for the
interrupt is located.
Common Functions of Interrupts
Interrupt transfers control to the interrupt service
routine generally, through the interrupt vector,
which contains the addresses of all the service
routines.
Interrupt architecture must save the address of
the interrupted instruction.
Incoming interrupts are disabled while another
interrupt is being processed to prevent a lost
interrupt.
A trap is a software-generated interrupt caused
either by an error or a user request.
An operating system is interrupt driven.
I/O Structure
A general computer system consists of CPU
and multiple devices connected through a
common bus.
Each device controller is in charge of a specific
type of device
A device controller maintains some local
buffer storage and a set of special-purpose
registers.
Operating systems have a device driver for
each device controller.
To start a I/O operation the following steps
takes place:
Device driver loads appropriate registers within
device controller.
Device controller examines the contents of
registers
The controller transfers data from device to local
buffer
Once transfer is complete the device controller
informs device driver via interrupt.
Device driver returns control to OS.
Direct Memory Access (DMA)used for highspeed I/O devices able to transmit information
at close to memory speeds.
Device controller transfers blocks of data from
buffer storage directly to main memory
without CPU intervention.
Only one interrupt is generated per block,
rather than the one interrupt per byte.
COMPUTER SYSTEM OPERATION
A trap (or an exception) is a software-generated
interrupt caused either by an error or by a
specific request from a user program that an
operating-system service be performed.
For each type of interrupt, separate segments of
code in the operating system determine what
action should be taken.
A properly designed operating system must
ensure that an incorrect (or malicious) program
cannot cause other programs to execute
incorrectly.
Dual-Mode Operation
we need two separate modes of operation:
user mode
kernel mode
A bit, called the mode bit, is added to the
hardware of the computer to indicate the
current mode.
When the computer system is executing on
behalf of a user application, the system is in
user mode.
When a user application requests a service
from the operating system it must transition
from user to kernel mode to fulfill the request.
At system boot time, the hardware starts in
kernel mode. The operating system is then
loaded and starts user applications in user
mode.
Whenever a trap or interrupt occurs, the
hardware switches from user mode to kernel
mode.
The system always switches to user mode
before passing control to user program
COMPUTER SYSTEM ARCHIECTECTURE
It can be categorized with respect to number
of processors used.
Single-Processor System: There is one main
CPU capable of executing a general-purpose
instruction set.
Multiprocessor Systems :Systems have two or
more processors in close communication
sharing the computer bus.
• Clustered Systems: Clustered computers share
storage and are closely linked via a local-area
network (LAN).
OPERATING SYSTEM STRUCTURE
Important aspect of operating system is multiprogramming.
The operating system keeps several jobs in
memory.
The operating system picks and begins to
execute one of the jobs in memory.
Eventually, the job may have to wait for some
task, such as an I/O operation, to complete.