You are on page 1of 15

THE MINISTRY OF EDUCATION AND SCIENCE OF NIGERIA

CRESCENT UNIVERSITY

“CUAB”

Computer Science Department

Task № 1
from discipline «CPS 205»

Topic: «OPERATING SYSTEM INTERFACE WITH THE


HARDWARE; INTERRUPTS I/O CHANNEL,
MULTIPLEXER, REGISTERS AND STATUS WORD»

MATRIC NO: S1022202067

Executed by the student of 200 level:


__________Adepoju Faiz Oladimeji
(sign, date) (name, surname)

Supervisedby: ___________________

(sign, date) (name, surname)

2022
What is an OS?
• Interface between application programs and hardware
• Ultimate control program – Exploits hardware resources of one or
more processors to provide a set of services to users – Coordinates the
use of hardware among various application programs for different
users – Manages secondary memory and I/O devices on behalf of its
users
• Two different views of an OS
1. Extended machine view – Virtual machine that is easier to
understand and program – Tool to make programmer’s job easy
2. Resource manager view – Tool to facilitate efficient operation of
computer system – Provides services to users; processor, memory,
I/O, system bus – Must be fair; not partial to any process, specially for
process in the same class – Must discriminate between different class
of jobs with different service requirements – Do the above efficiently
* Within the constraints of fairness and efficiency, an OS should
attempt to maximize throughput, minimize response time, and
accommodate as many users as possible

A modern computer consists of the following −


One or more processors
Main memory
Disks
Printers
Various input/output devices.
So, to manage all these components, we require a layer of software in
the computer system, that layer we call the Operating System (OS).
An Operating System is a program that acts as an intermediary or
interface between a user of a computer and the computer hardware.
It is the most important type of system software in computer systems.
Without an operating system the user cannot run application programs
on the computer system.

Given below is the structure of an operating system −

The operating system acts like a government in a country, just like the
government controlling, monitoring, helping the country, the
operating system managing all the computer components and helping
to execute programs correctly. And also to avoid conflicts that occur
when users use the same resource, the operating system regulates
which users can access a resource.
Operating systems work as an interface between the user and the
computer hardware. It is a software which performs the basic tasks
like input, output, disk management, controlling peripherals etc.
Windows, Linux etc. are some examples of operating systems.
Tasks of Operating Systems
These are some important tasks of the OS by which it manages the
system hardware efficiently, which are as follows −

Memory management

Memory management refers to the management of the primary


memory each executing process resides in main memory. OS keeps
track of memory, allocates memory between processes, and
deallocates the memory when the process does not require the
memory.
Device management
OS can communicate between devices using drivers in order to use
the devices efficiently the OS keeps track of devices and then
allocates and deallocates these devices to different processes as per
the request made by the processes.
Processor management
Like memory and devices, managing the processor is one of the
important tasks of an OS. It allocates the processor to different
processes in main memory to do so the OS uses some scheduling
algorithms also these are like First Come First Serve, Priority
Scheduling, Shortest job first, etc.

File Management
The operating system also keeps track of the file system of a
computer normally the file system is divided in directories which can
be handled by the OS.
I/O
I/O management is one of the important tasks of the operating system.
OS manages the IO devices like mouse, keyboard, printer, display,
LED's etc.
I/O devices can be of two types which are as follows −
Synchronous I/O − Here, the CPU waits for the i/o device
Asynchronous I/O − Here, the CPU execution takes place parallel to
the IO device.
The operating system helps the processor in communicating to the IO
devices. These communications are Special instruction I/O, Memory-
mapped I/O, Direct memory access.

Fans and Cooling


In a computer system, one of the important hardware components is
the cooling system. The CPU fan helps the CPU from overheating.
Overheating sometimes causes permanent damage to a CPU. The
operating system plays role in communicating with both the CPU and
the fan which helps to ensure that the system stays cool. This process
is also done by the motherboard's internal controls, called the BIOS,
and can be overwritten by applications running in the OS.

Networking
Networking plays an important role in distributed system environment
where a group of processors can memory, hardware devices, or a
clock. The processors communicate with one another with the help of
the network only.

I/O interrupts
These interrupts occur when the channel subsystem signals a change
of status, such as an input/output (I/O) operation completing, an error
occurring, or an I/O device such as a printer has become ready for
work.
External interrupts
These interrupts can indicate any of several events, such as a time
interval expiring, the operator pressing the interrupt key on the
console, or the processor receiving a signal from another processor.
Restart interrupts
These interrupts occur when the operator selects the restart function at
the console or when a restart SIGP (signal processor) instruction is
received from another processor.
Program interrupts
These interrupts are caused by program errors (for example, the
program attempts to perform an invalid operation), page faults (the
program references a page that is not in central storage), or requests to
monitor an event.
Machine check interrupts
These interrupts are caused by machine malfunctions.
When an interrupt occurs, the hardware saves pertinent information
about the program that was interrupted and, if possible, disables the
processor for further interrupts of the same type. The hardware then
routes control to the appropriate interrupt handler routine. The
program status word or PSW is a key resource in this process.

The program status word (PSW) is a 128-bit data area in the processor
that, along with a variety of other types of registers (control registers,
timing registers, and prefix registers) provides details crucial to both
the hardware and the software. The current PSW includes the address
of the next program instruction and control information about the
program that is running. Each processor has only one current PSW.
Thus, only one task can execute on a processor at a time.
The PSW controls the order in which instructions are fed to the
processor, and indicates the status of the system in relation to the
currently running program. Although each processor has only one
PSW, it is useful to think of three types of PSWs to understand
interrupt processing:

Current PSW
New PSW
Old PSW
The current PSW indicates the next instruction to be executed. It also
indicates whether the processor is enabled or disabled for I/O
interrupts, external interrupts, machine check interrupts, and certain
program interrupts. When the processor is enabled, these interrupts
can occur. When the processor is disabled, these interrupts are ignored
or remain pending.

There is a new PSW and an old PSW associated with each of the six
types of interrupts. The new PSW contains the address of the routine
that can process its associated interrupt. If the processor is enabled for
interrupts when an interrupt occurs, PSWs are switched using the
following technique:

Storing the current PSW in the old PSW associated with the type of
interrupt that occurred.
Loading the contents of the new PSW for the type of interrupt that
occurred into the current PSW.
The current PSW, which indicates the next instruction to be executed,
now contains the address of the appropriate routine to handle the
interrupt. This switch has the effect of transferring control to the
appropriate interrupt handling routine.

Mainframe architecture provides registers to keep track of things. The


PSW, for example, is a register used to contain information that is
required for the execution of the currently active program.

Mainframes provide other registers, as follows:

Access registers
These registers specify the address space in which data is found.
General registers
These registers address data in storage, and also hold user data.
Floating point registers
These registers hold numeric data in floating point form.
Control registers
These registers are used by the operating system itself, for example,
as references to translation tables.
Operating system interface with the hardware: -
Multiplexer
A communications device that multiplexes (combines) several signals
for transmission over a single medium. A de-multiplexer completes
the process by separating multiplexed signals from a transmission
line. Frequently a multiplexer and de-multiplexer are combined into a
single device capable of processing both outgoing and incoming
signals. A multiplexer is sometimes called a mux.

Type of Multiplexer
Time Division Multiplexer
Short for Time Division Multiplexing, a type of multiplexing that
combines data streams by assigning each stream a different time slot
in a set. TDM repeatedly transmits a fixed sequence of time slots over
a single transmission channel. Within T-Carrier systems, such as T-1
and T-3, TDM combines Pulse Code Modulated (PCM) streams
created for each conversation or data stream.

Wavelength Division Multiplexing


Short for wavelength division multiplexing, a type of multiplexing
developed for use on optical fiber. WDM modulates each of several
data streams onto a different part of the light spectrum. WDM is the
optical equivalent of FDM.

1. WDM is the analog multiplexing technique. WDM is conceptually


similar to FDM, in the sense that it combines different signals of
different frequencies into single composite signal and transmit it on a
single link.

2. In WDM the different signals are optical or light signals that are
transmitted through optical fiber. Wavelength of a wave is reciprocal
of its frequency. Therefore, if wavelength goes up, the frequency goes
down and Vice-versa.

3. Thus in WDM, various light waves from different sources are


combined to form a composite light signal that is transmitted across
the channel to the receiver.

4. At the receiver side, this composite light signal is broken into


different light waves by demultiplexer.

5. This combining and the splitting of light waves is done by using a


prism.
6. One prism is used at the sender side to perform multiplexing and
another prism is used at receiver side that performs demultiplexing as
shown in fig.

7. The basic principle behind the usage of prisms is that, the prism
bends a beam of light based on the angle of incidence and the
frequency of light wave. Usage of prisms in WDM

Applications of WDM
WDM is used in SONET (Synchronous Optical Network). It makes
use of multiple optical fiber lines which are multiplexed &
demultiplexed.

Dense Wavelength Division Multiplexer


Dense Wavelength Division Multiplexing, an optical technology used
to increase bandwidth over existing fiber optic backbones.

DWDM works by combining and transmitting multiple signals


simultaneously at different wavelengths on the same fiber. In effect,
one fiber is transformed into multiple virtual fibers. So, if you were to
multiplex eight OC -48 signals into one fiber, you would increase the
carrying capacity of that fiber from 2.5 Gb/s to 20 Gb/s. Currently,
because of DWDM, single fibers have been able to transmit data at
speeds up to 400Gb/s.
A key advantage to DWDM is that it’s protocol- and bit-rate-
independent. DWDM-based networks can transmit data in IP, ATM,
SONET /SDH, and Ethernet, and handle bit rates between 100 Mb/s
and 2.5 Gb/s. Therefore, DWDM-based networks can carry different
types of traffic at different speeds over an optical channel.

Frequency Division Multiplexing


Frequency division multiplexing, a multiplexing technique that uses
different frequencies to combine multiple streams of data for
transmission over a communications medium. FDM assigns a discrete
carrier frequency to each data stream and then combines many
modulated carrier frequencies for transmission. For example,
television transmitters use FDM to broadcast several channels at once.

Statistical Multiplexer
Statistical multiplexers make it possible for multiple RS-232 devices
to share a single data line. They also perform error correction to
insure error-free transmissions. The term “statistical” refers to their
ability to take advantage of the intermittent usage statics of most RS-
232 devices (and all PC and terminal users).

Because keyboards are idle a large part of each second with no one
typing and no data being sent from the computer, each PC or terminal
often averages less than 5% of its potential data rate. Statistical
multiplexers allow the sum of the PC and terminal rates to exceed the
composite link speed between the multiplexers. Statistical multiplexer
needs Buffer.

Operating system interface with the hardware: -


Registers
A register is basically a storage space for units of memory that are
used to transfer data for immediate use by the CPU (Central
Processing Unit) for data processing. Also known as memory
registers, they can actually form part of the computer processor as a
processor register. The register is large enough to hold any kind of
data, such as dates, instruction sets, storage addresses, bits, sequences,
and characters. Some instruction sets are partly formed by registers.
Types of registers include memory address register, memory buffer
register, input output address register, input output buffer register, and
shift register. In this lesson we will be focusing on shift registers.

Operating system interface with the hardware: -


Program Status Word (PSW)
A collection of information that encapsulates the basic execution state
of a program at any instant. It permits an interrupted process to
resume operation after the interrupt has been handled. The
information is held in the program status register, and usually contains
the value of the program counter and bits indicating the status of
various conditions in the ALU such as overflow and carry, along with
the information on supervisor privileged status. The contents of other
processor registers may also need to be preserved in memory after an
interruption of a process and recovered when the interrupted process
is resumed so that the complete process state is reestablished. See also
processor status word.

You might also like