Operating Systems - Booting & Process Management

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

The Bootstrap Process or Booting

The Bootstrap Process or Booting is the process of starting or restarting a computer. The
operating system is usually held on the hard disk (as with desktop and laptop computers);
alternatively, the operating system may reside on a ROM chip (as with handheld computers
and mobile devices (PDAs and smartphones)). When the computer is turned on, the CPU
accesses the BIOS located on an EPROM chip. The BIOS then checks all your hardware
connections and locates all your devices. If everything is okay, a small program held in ROM
- the 'loader', tells the computer where to look for the operating system, and gives
instructions for copying part of the kernel and other frequently used operating system
instructions from the hard disk into the computer's main memory/RAM where it remains
until the system is turned off. Once part of the kernel has been loaded, more instructions
can be executed to load the rest of the kernel. The kernel is then responsible for loading
other OS and applications programs to RAM as needed. This method of 'pulling itself up by
its own bootstraps' is where the expression 'booting' comes from.

Process Management
A process is a task associated with a program in execution. There are two major categories of
processes:
● Operating system processes: those that execute system code a.k.a. internal services.
● User processes: those that execute user code a.k.a. external services.

In general, a process will need certain resources such as CPU time, memory, files and I/O
devices to accomplish its task. These resources are given to the process when it is created.
In addition to the various physical and logical resources that a process obtains when it is
created, some initialization data (input) may be passed along. For example, a process whose
function is to display the status of a file, say File X on the screen of a terminal, will get the
name of that file, File X as an input and execute the appropriate program to obtain the desired
information.

Each process the CPU executes is assigned a certain number of time slices in units of fetch-
execute cycles. Once the CPU is not interrupted, the process has the attention of the CPU for
that number of fetch-execute cycles. When time expires, the process state is stored, and
another process gets the attention of the CPU. The first process must wait until it has another

1
Booting & Process Management.docx
turn. Since time slices are so small, you usually can't tell that any sharing is going on. Processes
can be assigned priorities so that high priority (foreground) tasks get more time slices than
low priority (background) tasks.

OPERATIONS ON A PROCESS
The OS can perform several operations on a process such as:
● Create a process: program must be brought into memory and placed in a process before
it can be executed.
● Destroy or kill a process: a process is terminated before it runs to completion. This can
occur if a user cancels a task
● Suspend a process: a process is paused as the CPU’s attention is given to another process
● Resume a process: a suspended process regains the attention of the CPU
● Change a process’ priority: a process’ priority can be upgraded, that is the process is given
higher priority and, therefore, placed higher in the priority queue. The priority queue
shows the sequence of execution of the processes by the CPU. Similarly, a process’
priority can be downgraded and, therefore, cause it to be placed near the tail of the
priority queue.

2
Booting & Process Management.docx
PROCESS STATES

The process state is the status of a program submitted to a computer system for running.
Programs submitted to a computer for processing are added to a job queue and can be in
one of a number of process states.
From launch of a process through execution of that process a process might go through
several states:
Ready a program waiting to be executed or continue execution by the processor.
The program could make use of the CPU if it was available
Running the process has the attention of the CPU. A program is being executed by the
central processor. The program is actually using the CPU. A central
processor can execute only one program at a time, so only one program will be
running (except in a computer with several processors). Execution may be
interrupted in which case the program will be either suspended or blocked.
Blocked The process is waiting for an event to happen before it can continue. The
program could not use the CPU even if it were free. If a currently running
process requests I/O, it relinquishes the processor and goes into the blocked
state.. When the peripheral becomes available, the status returns to ready,
allowing the central processor to continue executing the program when it
can.
Suspended: the operating system decides that a program has to be interrupted. The
program status will be returned to Ready to await a further time allocation.
For example, If a process uses up its time slice before completing, then it is
placed in a ready state while some other process gains the use of the
processor.
Stopped: a program has been aborted – execution is stopped before it has reached its
normal conclusion.
Completed: a program has run to a proper conclusion. It will then be deleted from the job
queue.
Deadly: a condition in which no processing takes place at all - the system appears
embrace to be hung – it does not produce any output and appears to have ceased to
operate. A deadly embrace or deadlock happens in an operating system
when two or more processes need some resource that is being held by the other
process to complete their execution

3
Booting & Process Management.docx
THE PROCESS CONTROL BLOCK (PCB)
When a process gives up the processor, it is necessary to save the details of where the
process was in its execution when it was interrupted so that it can resume from exactly the
same place later on. In order to be able to do this, each process within the system has an
associated data structure called a process control block in which all information required to
resume the current process is stored.
This includes the following information:
Process ID unique process identifier
Current process state ready, running, suspended
Job priority or other scheduling information
Register save area where the current contents of all registers are saved before
they are taken over by the next process
Memory management information pertaining to the processes allocated memory
area
Pointers to other allocated resources (open files, disk, printer etc)
CPU time used so far
Estimated time to completion
Links to other PCBs

4
Booting & Process Management.docx

You might also like