You are on page 1of 42

Basic Operating

System Concepts
Ami Tri Cahyadi
Toleransi Keterlambatan : (maks) 15menit
Presensi (kehadiran) : (min) 80%
Komponen Penilaian :
Presensi : 10%
Kuis : 10%
Tugas : 30%
UTS : 25%
UAS : 25%
Learning materials
1.Introduction to Operating Systems
2.Basic Operating System Concepts
3.Process Management
4.Interprocess Communication & Synchronization
5.Memory Management
6.File System Management
7. Device Management
Reference :
Stallings, William, Operating Systems, Second
Edition, Prentice-Hall International Editions,
Englewood Cliffs, New Jersey, 1995.
Tanenbaum, Andrew S., Modern Operating
Systems, Prentice-Hall International Editions,
Englewood Cliffs, New Jersey, 1992.
Personal Computer OS
Mobile Devices
Server
Embedded Devices
What is an Operating
System?
AnOperating systemis basically a intermediary
agent between the user and the computer
hardware.
Manages the computers resources (hardware,
abstract resources, software)
Its a resource allocator.
It is also used to control programs to prevent errors
and improper computer use.
It is interrupt driven.
Operating System Benefits
Simplifies hardware control for
applications
Enforcer of sharing, fairness and
security with the goal of better overall
performance
Trade-off between fairness and
performance
Trade-off between optimal algorithms and
lean algorithms OS is overhead.
Provides abstract resources
Sockets
Inter-process communication
History of Operating
Systems
Earliest computers had no Operating System
Applications loaded manually
Users were experts on the hardware
FirstSystem Softwarewas libraries of code
to manage devices.
This grew to batch processing systems, where
some focused on application programming and
some on systems programming.
Batch Processing
A typical computer in the 1960s and
70s was a large machine.
Its processing was managed by a human
operator.
The operator would organize various
jobs from multiple users into batches.
Timesharing
A timesharing system allows multiple
users to interact with a computer at
the same time
Multiprogrammingallowed multiple
processes to be active at once, which
gave rise to the ability for programmers
to interact with the computer system
directly, while still sharing its resources
In a timesharing system, each user has
his or her own virtual machine, in which
all system resources are (in effect)
available for use
The IBM 650 Magnetic
Drum Data Processing
System Machine
Cray I supercomputer,
introduced in 1976
Current Operating Systems
Research Topics
Symmetric multiprocessing
Allows for several CPUs to process multiple jobs at the same
time. CPUs are independent of one another, but each has
access to the operating system.
Asymmetric multiprocessing
Some operating systems functions are assigned to
subordinate processors, which take their instructions from
the main CPU.
Distributed processing
Processors are placed at remote locations and are connected
to each other via telecom devices. Different from symmetric
multiprocessing systems as they do not share memory.
Computations can be dispersed among several processors.
COMPUTER
ARCHITECTURE
Ami Tri Cahyadi
The computer is in a sense a communication system.
Data is constantly being moved between the CPU,
memory and the various devices.
The CPU uses I/O addresses to direct data to
particular devices.
The devices in turn use interrupts to notify the
CPU and operating system of their needs.
The Von-Neumann
Architecture
CPU Control Unit
Arithmetic Logic Unit
The Von-Neumann Loop
Fetch Phase
Fetch the next instruction and store it in the
instruction register
Execute Phase
The ALU or I/O unit executes the instruction
ALUdoes calculations
I/O unitloads or stores data between
main memory and registers
How Operating
Systems Work
Ami Tri Cahyadi
Role of Interrupts
Interrupts are signals sent to the CPU by external devices, normally I/O
devices. They tell the CPU to stop its current activities and execute the
appropriate part of the operating system.
1.Hardware Interuptsare generated by hardware devices to signal that they
need some attention from the OS.
2.Software Interuptsare generated by programs when they want to request
asystem callto be performed by the operating system.
3.Traps are generated by the CPU itself to indicate that some error or
condition occured for which assistance from the operating system is needed.
CPU Execution Mode
There are two modes of execution,
known as user mode and kernel or
supervisor mode.
User mode is restricted in that certain
instructions cannot be executed, certain
registers cannot be accessed, and I/O
devices can not be accessed.
Kernel mode has none of these
restrictions. A system callwill set the
CPU to kernel mode, as will traps and
interrupts. Application programs cannot
do this.
Supervisor mode
Can execute all machine
instructions
Can reference all memory
locations
User mode
Can only execute a subset of
instructions
Can only reference a subset
of memory locations
CPU Response to
Interrupts
The CPU performs the following
actions in response to an interrupt:
Using the pointer to the current process
control block, the state and all register
values for the process are saved for use
when the process is later restarted.
The CPU mode bit is switched
tosupervisorymode.
Using the pointer to the interrupt
handler table and the interrupt vector, the
location of the kernel code to execute is
determined. The interrupt vector is the IRQ
for hardware interrupts (read from an
interrupt controller register) and an
argument to the interrupt assembly
language instruction for software interrupts.
Processing is switched to the appropriate
portion of the kernel
Interrupt Processing
PARTS OF OPERATING
SYSTEM
Ami Tri Cahyadi
Process Management
Aprocessis an executing program. It has
its code, data, a certain set of resources
allowed to it, and one or more flows of
execution through the code.
The OS manages the allocation of resources
to these processes, and also provides
system calls to manage these processes.
Memory Management
Memory must be shared between the OS and an
application program.
The OS must manage the allocation of memory to
processes and control the memory management
hardware that determines which memory locations a
process may access.
File System Management
Computers process information that must be
transmitted, processed, or stored.
File systems are an abstract organized collection of
file system objects.
The OS provides primitives to manipulate these
objects
Device Management
Information is sent through a computers
input and output devices.
Processes access these devices using
thesystem callinterface.
The OS tries to manage said devices in a
manner that makes them efficiently shared
among all processes requiring them.
Asystem callis a programming interface
to the services provided by the OS,
typically written in C/C++
Evolution of an
Operating System
Hardware upgrades plus new types of
hardware
New services & Tools
Fixes: Any OS has faults. These are
discovered over the course of time and
fixes are made.

You might also like