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

1. Draw a neat labelled diagram for process state.

(02M)

2. State difference between preemptive scheduling and non-pre-


emptive scheduling. (02M)
3. Define the term fragmentation in terms of memory (02M)
Fragmentation is an unwanted problem in the operating system in which the processes are
loaded and unloaded from memory, and free memory space is fragmented.

Processes can't be assigned to memory blocks due to their small size, and the memory
blocks stay unused.

4. Explain any four scheduling criteria (02M)


1. CPU utilization: The main objective of any CPU scheduling algorithm is to keep the CPU
as busy as possible. Theoretically, CPU utilization can range from 0 to 100 but in a real-
time system, it varies from 40 to 90 percent depending on the load upon the system.
2. Throughput: A measure of the work done by the CPU is the number of processes being
executed and completed per unit of time. This is called throughput. The throughput
may vary depending on the length or duration of the processes.
3. Turnaround time: For a particular process, an important criterion is how long it takes
to execute that process. The time elapsed from the time of submission of a process to
the time of completion is known as the turnaround time. Turn-around time is the sum
of times spent waiting to get into memory, waiting in the ready queue, executing in
CPU, and waiting for I/O. The formula to calculate Turn Around Time = Compilation
Time – Arrival Time.
4. Waiting time: A scheduling algorithm does not affect the time required to complete
the process once it starts execution. It only affects the waiting time of a process i.e.
time spent by a process waiting in the ready queue. The formula for calculating
Waiting Time = Turnaround Time – Burst Time.
5. Response time: In an interactive system, turn-around time is not the best criterion. A
process may produce some output fairly early and continue computing new results
while previous results are being output to the user. Thus another criterion is the time
taken from submission of the process of the request until the first response is
produced. This measure is called response time. The formula to calculate Response
Time = CPU Allocation Time(when the CPU was allocated for the first) – Arrival Time
6. Completion time: The completion time is the time when the process stops executing,
which means that the process has completed its burst time and is completely
executed.
7. Priority: If the operating system assigns priorities to processes, the scheduling
mechanism should favor the higher-priority processes.
8. Predictability: A given process always should run in about the same amount of time
under a similar system load.
5. Define virtual memory. (02M)
Virtual Memory is a storage allocation scheme in which secondary memory can be
addressed as though it were part of the main memory.

A computer can address more memory than the amount physically installed on the system.
This extra memory is actually called virtual memory and it is a section of a hard disk that's
set up to emulate the computer's RAM.

6. Write syntax of following commands: (i) Sleep (ii) Kill (02M)


1)Sleep :
Sleep NUMBER[SUFFIX]…
Sleep OPTION

2)Kill:
Kill pid

7. With neat diagram explain inter process communication model. (04M)

8. Describe I/o burst and CPU burst cycle with neat diagram. (04M)

9. Explain deadlock? What are necessary conditions for deadlock? (04M)

10. Explain partitioning and its types. (04M)

11. State and describe types of scheduler. (04M)

12. Explain Round Robin algorithm with suitable example. (04M)

13. Explain PCB with diagram. (04M)


14. With suitable diagram, describe the concept of variable partitioning
of memory. (04M)
Variable Partitioning –
It is a part of Contiguous allocation technique. It is used to alleviate the problem faced by
Fixed Partitioning. In contrast with fixed partitioning, partitions are not made before the
execution or during system configure.
Various features associated with variable Partitioning-
1. Initially RAM is empty and partitions are made during the run-time according to
process’s need instead of partitioning during system configure.
2. The size of partition will be equal to incoming process.
3. The partition size varies according to the need of the process so that the internal
fragmentation can be avoided to ensure efficient utilization of RAM.
4. Number of partitions in RAM is not fixed and depends on the number of incoming
process and Main Memory’s size.
15. With suitable diagram, describe use of scheduling queues in process
scheduling. (04M)
The OS maintains all Process Control Blocks (PCBs) in Process Scheduling Queues. The OS
maintains a separate queue for each of the process states and PCBs of all processes in the
same execution state are placed in the same queue. When the state of a process is changed,
its PCB is unlinked from its current queue and moved to its new state queue.
The Operating System maintains the following important process scheduling queues −
 Job queue − This queue keeps all the processes in the system.
 Ready queue − This queue keeps a set of all processes residing in main memory,
ready and waiting to execute. A new process is always put in this queue.
 Device queues − The processes which are blocked due to unavailability of an I/O
device constitute this queue.

The OS can use different policies to manage each queue (FIFO, Round Robin, Priority,
etc.). The OS scheduler determines how to move processes between the ready and
run queues which can only have one entry per processor core on the system; in the
above diagram, it has been merged with the CPU.
16. With suitable example, describe any one free space management
technique. (04M)

Bitmap

This technique is used to implement the free space management. When the free space is
implemented as the bitmap or bit vector then each block of the disk is represented by a bit.
When the block is free its bit is set to 1 and when the block is allocated the bit is set to 0.
The main advantage of the bitmap is it is relatively simple and efficient in finding the first
free block and also the consecutive free block in the disk. Many computers provide the bit
manipulation instruction which is used by the users.

The calculation of the block number is done by the formula:

(number of bits per words) X (number of 0-value word) + Offset of first 1 bit

For Example: Apple Macintosh operating system uses the bitmap method to allocate the
disk space.

Assume the following are free. Rest are allocated:

Advantages:

 This technique is relatively simple.


 This technique is very efficient to find the free space on the disk.

Disadvantages:

 This technique requires a special hardware support to find the first 1 in a word it is
not 0.
 This technique is not useful for the larger disks.

For example: Consider a disk where blocks 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 17, 18, 25,26, and
27 are free and the rest of the blocks are allocated. The free-space bitmap would be:
001111001111110001100000011100000

You might also like