BSc it semester 2
Explain single Partition Allocation and Multiple Partition Allocation.
Partition is the division of physical memory into fixed sized regions and this allows address
space to be distinct.
Single partition allocation
The operating system always resides in the lower memory and user process execute in the
higher memory. Here limit and relocation register are used to protect user processes from each
other and from changing operating system code and data.The relocation register contains value
of the smallest physical address that can be accessed and the limit register contains a range of
logical addresses where by each logical address must be less than the limit register. This is the
simplest form of memory management. This type of memory management is used by hardware
diagnostics, by system boot code, real time / dedicated systems for easy management of their
Multiple partition allocation
In multiple partition allocation we deal with many processes and this leads to multi
programming. Multiprogramming requires that there are many processes residing in memory so
that the CPU can switch between processes. Here the user memory has to be divided into several
partitions. Each partition is dedicated to one process and here number of processes that can run is
equal to the number of partitions. A process from the ready queue comes in and loaded into one
of the partitions for execution and after the execution the memory is released for another process
to utilize it. This type of allocation has a disadvantage that partitions are of fixed sizes and if a
size is too small then large programs cannot be run and also when the memory is too big for the
data then main memory space in each partition goes wasted.
2. What is PCB? What useful information is available in PCB?
PCB refers to process control block and this contains information associated with every process
in the system such as state of the process. A process is a program in execution. The information
contained in the PCB makes a process an active process.
There’s useful information available in the PCB and this includes the following
Program counter. This is the memory where the address of the next instruction to be executed
Input and output status information.
In this information we have a list of input output devices that are allocated for that process or I/O
devices that the process is using for its execution.
This shows the state in which the process is currently in and we have process
states like ready state, waiting state is one state where the process is waiting for an input / output
event to occur, running indicates that the process is in the central processing unit and being
worked upon, new implying that the process has just been created and halted which indicates
completion of a process or termination of a process
Real time and amount of CPU used,time limits,and process number are some of the information
kept in the PCB.
These registers may differ in number and type. We have registers such as accumulators for
storing processed data, indexing register, general purpose registers and stack pointers.
Memory management information
Information such as the base and limit registers, page tables is what is included in the memory
CPU scheduling information.
This information includes a process priority indicate the priority of the process whether it is of
high priority or low priority, pointer pointing at which process and other scheduling parameters
3. Explain Preemptive and Non-preemptive scheduling approaches.
Preemptive scheduling;Processes are usually prioritized. Sometimes it necessary to run a given
process that has higher priority before another process although it is running. In this scenario the
running processes that has lower priority is running but gets interrupted and stopped for some
time because a higher priority process has come in and needs to be executed, it is later resumed
when the priority process has finished its execution.
This is called preemptive scheduling and example is the Round Robin that uses time slice
between processes. Windows operating system is a preemptive operating system.
Non-preemptive scheduling; in non-preemptive scheduling, a process is executed till
completion. It cannot be interrupted although a process of higher priority comes in. an example
is first come first served that uses first in first out. Linux uses this to carry out its tasks
4. Explain process state with diagram.
A process is a program in execution or a program running in the computer system. There
are basically five states of a process namely new, ready, terminated, running and waiting.In a
multitaskingcomputer system, processes may occupy a variety of states
The diagram below represents the process state of a process in the computer system.
Process state diagram
Input/output or event completion Input/output or event waits
Explanation of the five states of a process starting with
It’s basically the first step of a program turning into a process. This is when the process is being
created or when a computer user clicks on a program so as it runs hence creating a new process.
Ready state. A "ready" or "waiting" process has been loaded into main memory and is awaiting
execution on a CPU (to be context switched onto the CPU by the dispatcher, or short-term
scheduler). There may be many "ready" processes at any one point of the system's execution,
for example, in a one-processor system, only one process can be executing at any one time, and
all other "concurrently executing" processes will be waiting for execution.
A process moves into the running state when it is chosen for execution. The process's
instructions are executed by one of the CPUs (or cores) of the system. There is at most one
running process per CPU or core.
In the waiting state, the process has not yet visited the CPU but it is already created and waiting
for the CPU or it has been worked by the CPU for some time but waiting for data from
input/output device. More so if the operating system is preemptive. Priority processes will
always make lower priority process to go into waiting state as higher priority processes are
This is the final process state in the process. A process may be terminated, either from the
"running" state by completing its execution or by explicitly being killed. In either of these cases,
the process moves to the "terminated" state. If a process is not removed from memory after
entering this state, it may become a Zombie process.
5. Explain all the four functions of network operating system.
An operating system is an interface between the computer user and the machine. It’s
system software that enables application software to coordinate with the hardware of a computer
so as to complete a task.
A network operating system is a computer operating system basically designed to support
workstation, personal computers that are connected on the local area network. Examples are
Novell’s NetWare, Windows NT, and Microsoft windows server
The functions of a network operating system are as follows.
This is one of the functions of a network operating system. This communication
management software is in built into the network as part of it, so it’s in both the clients and
server. The software is also made up of modules corresponding to the OSI layers.
It’s responsible for communication management and sees that massages are transmitted error free
from source to destination.
File/printer services. A network operating system is multitasking a way that request s for
shared resources are queued up, scheduled and then run as separate tasks. The software that
controls file and printer services is run only on the server.
Redirection software. This software resides on both server and client. And it does its work in
the following way; an interrupt is executed by a system call generated from an Input /Output.
during the time of execution of the interrupt, the software comes between to check if the I/O is
local or remote. If it’s local, it continues to process but if remote, the software has to generate a
request to the server but conversion is required if the operating system running on the server may
be different from the local machine that generated the request.
Network management software. This is responsible for monitoring the network and all its
devices like computers modems lines repeaters multiplexers. The network management software
resides at the top of the existing operating system in ordinary operating system but in the
network operating system environment it is part of the network operating system. The software
monitors the entire network and maintains a list of hardware equipment along with its location
and status. This list is updated whenever there is an addition of a device on the network or when
equipment is down for repair. Another important part that it plays is helping routing algorithms
to route data on appropriate paths
6. Explain any five types of attacks on security.
Security is an important aspect of any operating system. This keeps the code and data secure in a
computer system. The open systems interconnection defines the elements of security in terms of
integrity, availability and confidentiality. The following are the types of attacks on security hat
do cause harm.
Invalid parameters. Passing of invalid parameters of failure to validate them properly can lead
to serious security violations
Dos (denial of services).Here users are denied services by possibly a hacker trying to access
some information from the server. Here a hacker sends several packets from his machine to his
victim mainly the server or DNS. This is called flooding of packets such as ARP flooding,Ping
flooding, TCP SYN flooding
Virus.This is a threat to a computer and causes the computer to malfunction. A virus is a
program that reproduces by introducing a copy of it in other programs. A virus corrupts code as
well as data. Examples are memory resident infectors, general purpose infectors, file specific
infectors, boot sector infectors.
Trojan horse. This is a program that looks like it is genuine yet it is not genuine at all and
normally waits to be activate or clicked upon and can crush your system ,open a back door en
your data is stolen. This is an example of a rogue software.
Worm. A worm is a program that creates copies of itself on other machines on the network.
Worms do not need to be activated so as to multiply they do it by themselves. Worms do
consume network resources to a very large extent and can easily bring the network to a halt. A
computer worm is a complete program by itself not as the case with a virus.
Ddos(distributed denial of services).This is similar to denial of services but here lots of packets
are sent from many nodes or hosts to a specific victim host on the network.
Sniffing.This is tracking or listening to an encrypted data over the network most especially
wireless networks. This a security attacks because one can acquire the data and use it wrongly.
Line tapping. Here a communication line is tapped and confidential data is easily accessed and
can be modified. This data can easily be used to blackmail the company or the owner of the data.
This is a mechanism mostly used by government agencies for intercepting phone calls of
suspicion people in the country.