Assignment On Operating Systems
Assignment On Operating Systems
OPERATING
SYSTEMS
By:
Karthik Mohan
IInd YEAR, CSE B
CONTENTS
1. Computer System Overview
2. Basic Elements
3. Instruction Execution
4. Interrupt
5. Memory Hierarchy
6. I/O
COMPUTER SYSTEM
OVERVIEW
An operating system (OS) is system software that manages computer
hardware and software resources
and
provides
common
services for computer programs. The operating system is a component
of
the system
software in
a
computer
system. Application
programs usually require an operating system to function.
For hardware functions such as input and output and memory allocation,
the operating system acts as an intermediary between programs and the
computer hardware, although the application code is usually executed
directly by the hardware and frequently makes system calls to an OS
function or is interrupted by it. Operating systems are found on many
devices that contain a computerfrom cellular phones and video game
consoles to web servers and supercomputers.
Distributed
A distributed operating system manages a group of distinct computers
and makes them appear to be a single computer. The development of
networked computers that could be linked and communicate with each
other gave rise to distributed computing. Distributed computations are
carried out on more than one machine. When computers in a group work
in cooperation, they form a distributed system.
Templated
In an OS, distributed and cloud computing context, templating refers to
creating a single virtual machine image as a guest operating system,
then saving it as a tool for multiple running virtual machines. The
technique is used both in virtualization and cloud computing
management, and is common in large server warehouses.
Embedded
Embedded operating systems are designed to be used in embedded
computer systems. They are designed to operate on small machines like
PDAs with less autonomy. They are able to operate with a limited
number of resources. They are very compact and extremely efficient by
design. Windows CE and Minix 3 are some examples of embedded
operating systems.
Real-time
A real-time operating system is an operating system that guarantees to
process events or data within a certain short amount of time. A real-time
operating system may be single- or multi-tasking, but when multitasking,
it uses specialized scheduling algorithms so that a deterministic nature
of behaviour is achieved. An event-driven system switches between
tasks based on their priorities or external events while time-sharing
operating systems switch tasks based on clock interrupts.
Library
A library operating system is one in which the services that a typical
operating system provides, such as networking, are provided in the form
of libraries. These libraries are composed with the application and
configuration
code
to
construct unikernels
which
are
specialised, single address space, machine images that can be
deployed to cloud or embedded environments.
HISTORY
BASIC ELEMENTS
Imagine, if you can, that an operating system is broken down into five
layers. In the following list I'll start at the bottom most layer and work my
way up to the very top.
Layer 1: The Kernel.
The kernel is the heart of the operating system. Amongst its
responsibilities are ensuring that each running process is given a fair
amount of time to execute while a controlling the amount of resources
each process can use.
INSTRUCTION
EXECUTION
Step
Description
Update PC
IN DETAIL:
The main purpose of a CPU is to execute instructions. We've already
seen some simple examples of instructions, i.e., add and addi.
The CPU executes the binary representation of the instructions, i.e.,
machine code.
Since programs can be very large, and since CPUs have limited
memory, programs are stored in memory (RAM). However, CPUs do its
processing on the CPU. So, the CPU must copy the instruction from
memory to the CPU, and once it's in the CPU, it can execute it.
The PC is used to determine which instruction is executed, and based
on this execution, the PC is updated accordingly to the next instruction to
be run.
Essentially, a CPU repeatedly fetches instructions and executes them.
The following is a summary of the six steps used to execute a single
instruction.
If we are executing an I-type instruction, then typically, we'll signextend (or zero-extend, depending on the instruction) the
immediate part (i.e., IR15-0) to 32 bits.
Step 3: Perform ALU operation
The ALU has two 32-bit data inputs. It has a 32-bit output. The
purpose of the ALU is to perform a computation on the two 32-bit
data inputs, such as adding the two values. There are some
control bits on the ALU. These control bits specify what the ALU
should do.
For example, they may specify an addition, or a subtraction, or a
bitwise AND.
Where do the input values of the ALU come from?
Recall that an instruction stores information about its operands. In
particular, it encodes registers as 5-bit UB numbers. These register
encodings are sent to the register file as inputs.
The register file then outputs the 32-bit values of these registers.
These are the sent as inputs to the ALU.
Step 4: Access memory
There are only two
memory: load and store.
kind
of
instructions
that
access
INTERRUPT
In system
programming,
an interrupt is
a
signal
to
the processor emitted by hardware or software indicating an event that
needs immediate attention. An interrupt alerts the processor to a highpriority condition requiring the interruption of the current code the
processor is executing. The processor responds by suspending its
current activities, saving its state, and executing a function called
an interrupt handler (or an interrupt service routine, ISR) to deal with the
event. This interruption is temporary, and, after the interrupt handler
finishes, the processor resumes normal activities. There are two types of
interrupts: hardware interrupts and software interrupts.
MEMORY HIERARCHY
Memory management refers to management of Primary Memory or
Main Memory. Main memory is a large array of words or bytes where
each word or byte has its own address.
Main memory provides a fast storage that can be access directly by the
CPU. So for a program to be executed, it must in the main memory.
Operating System does the following activities for memory
management.
I/O
In computing, input/output or I/O (or,
informally, io or IO)
communication between an information processing system,
a computer, and the outside world, possibly a human or
information processing system. Inputs are the signals or data
is
the
such as
another
received
by the system and outputs are the signals or data sent from it. The term
can also be used as part of an action; to "perform I/O" is to perform
an input or output operation. I/O devices are used by a human (or other
system) to communicate with a computer. For instance,
a keyboard or mouse is
an
input
device
for
a
computer,
while monitors and printers are
output
devices.
Devices
for
communication between computers, such as modems and network
cards, typically perform both input and output operations.