Professional Documents
Culture Documents
CRESCENT UNIVERSITY
“CUAB”
Task № 1
from discipline «CPS 205»
Supervisedby: ___________________
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
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
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.
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.
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.
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.
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.
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.