OS Lecture 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

1.1 What is operating system?

1.2 What operating systems do?


1.3 Computer-System Organization
1.4 Interrupt
1.5 Operating system services
1.6 Operating system types
1.7 Operating system structure
1.8 User and Operating-System Interface
1.9 System call
 An operating system (OS) is a program that
controls the execution of application programs
and acts as an interface between applications
and the computer hardware.
 Operating system having three objectives
 1. Convenience: An OS makes a computer more
convenient to use.
 2. Efficiency: An OS allows the computer system
resources to be used in an efficient manner.
 3. Ability to evolve: An OS should be constructed
in such a way as to permit the effective
development.
 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).
 The CPU and the device controllers can execute in
parallel
 For a computer to start running—for instance,
when it is powered up or rebooted—it needs to
have an initial program to run. This initial
program, or bootstrap program.
 Typically, it is stored within the computer
hardware in read-only memory (ROM)
 The bootstrap program must know how to load
the operating system and how to start executing
that system.
 the bootstrap program must locate the
operating-system kernel and load it into
memory.
 Once the kernel is loaded and executing, it can
start providing services to the system and its
users.
 Some services are provided outside of the kernel,
by system programs that are loaded into memory
at boot time become system processes, or
system daemons
 On UNIX, the first system process is “init” and it
starts many other daemons.
 Once this phase is complete, the system is fully
booted, and the system waits for some event to
occur.
 The occurrence of an event is usually signaled by
an interrupt from either the hardware or the
software.
 Hardware may trigger an interrupt at any time by
sending a signal to the CPU, usually by way of
the system bus.
 Software may trigger an interrupt by executing a
special operation called a system call (also called
a monitor call).
 When the CPU is interrupted, it stops what it is
doing and immediately transfers execution to a
fixed location. The fixed location usually contains
the starting address where the service routine for
the interrupt is located.
 A timeline of this operation is shown in Figure
 Solid vertical lines represent segments of code in a
program.
 Code segments 1, 2, and 3 refer to sequences of
instructions that do not involve I/O.
 The WRITE calls are to an I/O routine.
 The I/O program consists of three sections:
 1. A sequence of instructions, labeled 4, to
prepare for the actual I/O operation.
 2. The actual I/O command.
 3. A sequence of instructions, labeled 5, to
complete the operation.
 The dashed line represents the path of
instructions execution followed by the processor.
 Interrupts are provided primarily to improve CPU
utilization.
 Most I/O devices are much slower than the
processor.
1- User Interfaces: Means by which users can issue
commands to the system. Depending on the system
these interfaces may be:
o Command-line interface: sh, csh, ksh, tcsh, etc.,
o Graphical user interface (GUI): Windows, etc.,
2- Program Execution
3- I/O Operations
4- File-System Manipulation
5- Communications
6- Error Detection
7- Resource Allocation
8- Protection and Security:

You might also like