OVERVIEW OF OPERATING SYSTEM Updated
OVERVIEW OF OPERATING SYSTEM Updated
CHAPTER OBJECTIVES
Think of an operating system as the conductor of a grand orchestra, orchestrating the harmony
between your computer's hardware and the applications you love. It's the unsung hero, the maestro behind
the scenes, ensuring everything runs smoothly while you navigate the digital symphony of your device.
In this lesson, we'll unravel the mysteries of operating systems, exploring their role, functions,
and how they shape our digital experiences. From the humble beginnings of punch cards to the sleek
interfaces of modern-day devices, join me in uncovering the secrets that make our computers tick. Get
ready to dive into the core of computing and discover the dynamic world of operating systems!
OPERATING SYSTEM
2. System View
From the computer’s point of view, the operating system is the program most intimately involved
with the hardware. In this context an operating system view as a resource allocator.
The operating system acts as the manager of these resources. Facing numerous and possibly
conflicting requests for resources, the operating system must decide how to allocate them to
specific programs and users so that it can operate the computer system efficiently and fairly.
An operating system is a control program. A control program manages the execution of user
programs to prevent errors and improper use of the computer. It is especially concerned with the
operation and control of I/O devices.
COMPUTER ARCHITECTURE encompasses the features of a system that a programmer can observe
directly or, in other words, those features that directly influence the logical execution of a program. It
constitutes a collection of regulations and approaches defining the operation, structure, and realization of
computer systems. This field involves the design of instruction set architecture, microarchitecture, logic
design, and implementation.
BREAKDOWN OF COMPUTER ORGANIZATION
COMPUTER-SYSTEM OPERATION
Modern general-purpose computer system consists of one or more CPUs and several device
controllers connected through a common bus that provides access to shared memory.
Each device controller oversees a specific type of device.
The CPU and the device controllers can execute in parallel, competing for memory cycles. To ensure
orderly access to the shared memory, a memory controller synchronizes access to the memory.
Initial program is needed for a computer to start running.
Initial program is also known as bootstrap program typically stored within the computer hardware
in read-only memory (ROM) or electrically erasable programmable read-only memory (EEPROM),
known by the general term firmware. It initializes all aspects of the system, from CPU registers to
device controllers to memory contents. The bootstrap program must know how to load the operating
system and how to start executing that system. To accomplish his goal, the bootstrap program must
locate the operating-system kernel and load it into memory.
The kernel is like the brain of an operating system. It's a core component that manages essential tasks.
The kernel is the first program loaded into memory when a computer is booted.
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 to become system processes, or system daemons that run the entire time the kernel is running.
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. The interrupt service routine executes; on completion, the CPU resumes the
interrupted computation.
Interrupts are an important part of a computer architecture. Each computer design has its own
interrupt mechanism. The interrupt must transfer control to the appropriate interrupt service
routine.
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.
A trap or exception is a software-generated interrupt caused either by an error or a user request.
An operating system is interrupt driven.
STRUCTURE - the way in which the components are interrelated. The figure below is the simplest possible
depiction of a computer. The computer interacts in some fashion with its external environment. In
general, all of its linkages to the external environment can be classified as peripheral devices or
communication lines.
TOP-LEVEL STRUCTURE
Basically, we want the programs and data to reside in main memory permanently. This
arrangement is usually 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.
1. Volatile Storage Device – It loses its contents when the power of the device is removed.
2. Non-Volatile Storage device – It does not lose its contents when the power is removed. It holds all the
data when the power is removed.
PRIMARY STORAGE - is also known as the main memory and is the memory directly accessible by the
CPU. Some primary storage devices are:
1. Read-Only Memory (ROM) is immutable; its content remains unaltered and can only be accessed
when needed. Due to its unchangeable nature, ROM is employed for storing data and programs that
experience frequent use but infrequent modifications, such as the system boot program.
2. RAM is random access memory. It is volatile i.e., the data in RAM is lost when the power is switched
off. RAM is the major form of primary memory as it is quite fast. However, it is also quite expensive.
3. Cache is used to store data and instructions that are frequently required by the CPU so it doesn't have
to search them in the main memory. This is a small memory that is also very fast.
SECONDARY STORAGE - Secondary or external storage is not directly accessible by the CPU. The data from
secondary storage needs to be brought into the primary storage before the CPU can use it. Secondary storage
contains a large amount of data permanently. It is used as an extension of main memory.
1. Hard disks are the most famously used secondary storage devices. They are round, flat pieces of
metal covered with magnetic oxide. They are available in many sizes ranging from 1 to 14-inch
diameter.
2. Floppy Disk - they are flexible plastic discs which can bend, coated with magnetic oxide and are
covered with a plastic cover to provide protection. Floppy disks are also known as floppies and
diskettes.
3. Memory Card - his has similar functionality to a flash drive but is in a card shape. It can easily plug
into a port and removed after its work is done. A memory card is available in various sizes.
4. Flash Drive - this is also known as a pen drive. It helps in easy transportation of data from one system
to another. A pen drive is quite compact and comes with various features and designs.
5. CD-ROM - this is short for compact disk - read only memory. A CD is a shiny metal disk of silver
color. It is already prerecorded and the data on it cannot be altered. It usually has a storage capacity of
700 MB.
In this hierarchy all the storage devices are arranged 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.
The storage systems above the solid-state disk are Volatile, whereas those below are Non-Volatile.
An Electronic disk or solid-state disk can be either designed to be either Volatile or Non-Volatile. During
normal operation, the electronic disk stores data in a large DRAM array, which is Volatile. But many
electronic disk devices contain a hidden magnetic hard disk and a battery for backup power. If external
power is interrupted, the electronic disk controller copies the data from RAM to the magnetic disk. When
external power is restored, the controller copies the data back into the RAM.
The design of a complete memory system must balance all the factors. It must use only as much
expensive memory as necessary while providing as much inexpensive, Non-Volatile memory as possible.
Caches can be installed to improve performance where a large access-time or transfer-rate disparity exists
between two components.
1. I/O Channels or Controllers - these are responsible for managing communication between the CPU
and the external devices. They often include specialized circuitry or controllers for specific types of
devices, such as disk controllers, network controllers, etc.
2. Interrupts - are signals sent by devices to the CPU to request attention. When an external device
needs the CPU to perform some action (like receiving data from a keyboard), it sends an interrupt,
and the CPU temporarily stops its current task to address the interrupt.
3. I/O Ports - these are hardware addresses or communication pathways that the CPU uses to
communicate with peripheral devices. Each device connected to a computer is assigned a unique I/O
port.
4. I/O Buffers - Buffers are temporary storage areas used to hold data being transferred between the
CPU and external devices. Buffers help to smooth out any speed differences between the CPU and the
I/O devices.
5. Device Drivers - device drivers are software components that allow the operating system and
applications to communicate with hardware devices. They act as intermediaries, translating high-level
commands into low-level instructions that the device understands.
6. DMA (Direct Memory Access) - DMA is a feature that allows devices to transfer data directly to or
from memory without involving the CPU. This can significantly improve the efficiency of data
transfers.
A well-designed I/O structure is essential for the overall performance and usability of a computer
system. It ensures that data can be efficiently and reliably exchanged between the CPU and external
devices, facilitating user interaction and enabling the computer to perform a wide range of tasks.
The specific structure and design of an operating system can vary based on its type (e.g., Windows,
Linux, macOS) and intended use (e.g., desktop, server, embedded systems). The OS structure is critical
for the efficient and reliable operation of a computer system.
This cycle happens repeatedly for each instruction in a program, creating a continuous loop of
fetching, decoding, executing, and writing back. It's this iterative process that allows a computer to carry
out the sequence of instructions in a program and perform complex tasks.