CH - 1
CH - 1
LECTURE NOTES
Prepared by
Shreeya Swagatika Sahoo
Assistant Professor
Lecture-1 PO 1
• Operating system: Controls and coordinates use of hardware among various appli-
cations and users
• 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
1
Figure 1.1: The components of a computer system
• Users want convenience, ease of use and good performance. Don’t care about
resource utilization
• Shared computer such as mainframe or minicomputer must keep all users happy
• Users of dedicate systems such as workstations have dedicated resources but fre-
quently use shared resources from servers
• Handheld computers are resource poor, optimized for usability and battery life
System View:
• From the computer’s point of view, operating system acts as a resource allocator.
• A computer system solve several problems such as CPU time, memory space, file-
storage space, I/O devices etc. It acts as the manager of these resources.
• It must decide how to allocate them to specific programs and users so that it can
operate the computer system efficiently and fairly
2
1.1.3 Computer-System Operation
• 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, competing for mem-
ory cycles. To ensure orderly access to the shared memory, a memory controller
synchronizes access to the memory.
• When the system is fully booted, the system waits for some event to occur.
• Each device controller is in charge of a specific type of device (for example, disk
drives, audio devices, or video displays).
3
• The CPU and the device controllers can execute in parallel, competing for mem-
ory cycles. To ensure orderly access to the shared memory, a memory controller
synchronizes access to the memory.
Interrupt
• Hardware may trigger an interrupt at any time by sending a signal to the CPU
through the system bus.
• When the CPU is interrupted, it stops current execution 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.
Storage Structure
The CPU can load instructions only from memory. Basic unit of computer storage
is the bit. A bit can contain one of two values, 0 and 1.A byte is 8 bits, and on most
computers it is the smallest convenient chunk of storage. Computer storage measured
in collection of bytes. A kilobyte, or KB, is 1,024 bytes (210 ), a megabyte, or MB, is
1, 0242 bytes(220 ), a gigabyte, or GB, is 1, 0243 bytes (230 ), a terabyte, or TB, is 1, 0244
bytes(240 ), a petabyte, or PB, is 1, 0245 bytes(250 ).
• Main Memory
– Main memory is usually too small to store all needed programs and data
permanently.
– Main memory is a volatile storage device.
4
• Secondary Memory
– The main requirement for secondary memory is that it be able to hold large
quantities of data permanently.
– The most common secondary-storage device is hard disk, solid state disk,
magnetic disk, which provides storage for both programs and data
I/O Structure
• Each device controller is in charge of a specific device and is responsible for moving
the data between the peripheral device and the local buffer.
• OS have a device driver for each device controller. To start an I/O, device driver
loads the appropriate register within the device controller.
• Once complete, it informs the device driver via an interrupt and the driver then
returns the control to the OS. It is called interrupt driven data transfer
• The interrupt driven data transfer produce high overhead when used for bulk data
transfer as the processor is blocked.
5
• To avoid this problem Direct Memory Access (DMA) is used
– Used for high-speed I/O devices able to transmit information at close to mem-
ory speeds
– Device controller transfers entire 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
6
2. Multiprocessor Systems: The system have two or more processors in close communi-
cation, sharing the computer bus and sometimes the clock, memory, and peripheral
devices.
3. Clustered Systems: Clustering systems are similar to parallel systems as they both
have multiple CPUs. However a major difference is that clustered systems are
created by two or more individual computer systems merged together. There are
two types of Clustering systems i.e. asymmetric and symmetric clustering systems.
7
by the master node. A distributed cache is used in asymmetric clustering to improve
the performance of the system. Resources such as memory, peripheral devices etc. are
divided between the nodes of the asymmetric clustering system at boot time.
• Since many computer systems are connected together and the processors work in
parallel, this reduces the cost of having separate peripheral devices and memory.
• The asymmetric clustering system has increased reliability as even if one nodes fails,
the others can pick up the slack.
• All the nodes in the asymmetric clustering system have their own kernels and can
operate on different operating systems.
• All the processors in the asymmetric clustering system are independent and only
share memory for inter process communications.
8
• The symmetric clustering system is quite reliable. This is because if one nodes fails,
the others can pick up the slack.This will not not result in the failure of the system
but will lead to graceful degradation.
• Many computer systems are connected together and work in parallel in the sym-
metric clustering system. This reduces the overall cost as there is shared peripheral
devices and memory.
• Symmetric clustering systems are quite scalable as it is easy to add a new node to
the system. There is no need to take the entire cluster down to add a new node.
9
Faculty of Engineering and Technology (ITER)
SIKSHA ‘O’ ANUSANDHAN (DEEMED TO BE) UNIVERSITY
Bhubaneswar, ODISHA