top of page

Operating system Notes

mobiprep (6).png

Introduction of Operating System

mobiprep (6).png

PROCESS: Program to process, Lifecycle of the process, Process control block, IPC

mobiprep (6).png

Scheduling

mobiprep (6).png

Threads

mobiprep (6).png

Memory Management

mobiprep (6).png

File Management

mobiprep (6).png

Synchronization

mobiprep (6).png

Disk Management

mobiprep (6).png

IO Management

mobiprep (6).png

Protection And Security

Heading

Q

1

Mention criteria for optimal cpu scheduling.

LRM_EXPORT_207556595493866_20190724_1939

Ans

CPU scheduling is a process that allows one process to use the CPU while the execution of another process is on hold(in waiting state) due to unavailability of any resource like I/O etc, thereby making full use of CPU. The aim of CPU scheduling is to make the system efficient, fast, and fair.

Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The selection process is carried out by the short-term scheduler (or CPU scheduler). The scheduler selects from among the processes in memory that are ready to execute and allocates the CPU to one of them.

Scheduling of processes/work is done to finish the work on time.

Below are different time with respect to a process.

Arrival Time: Time at which the process arrives in the ready queue.
Completion Time: Time at which process completes its execution.
Burst Time: Time required by a process for CPU execution.
Turn Around Time: Time Difference between completion time and arrival time.

Turn Around Time = Completion Time – Arrival Time

Waiting Time(W.T): Time Difference between turn around time and burst time.
Waiting Time = Turn Around Time – Burst Time

LRM_EXPORT_207556595493866_20190724_1939

Q

2

What do you understand by preemptive and non-preemptive scheduling.

LRM_EXPORT_207556595493866_20190724_1939

Ans

Preemptive Scheduling is a CPU scheduling technique that works by dividing time slots of CPU to a given process. The time slot given might be able to complete the whole process or might not be able to it. When the burst time of the process is greater than CPU cycle, it is placed back into the ready queue and will execute in the next chance. This scheduling is used when the process switch to ready state.

Algorithms that are backed by preemptive Scheduling are round-robin (RR), priority, SRTF (shortest remaining time first).

Non-preemptive Scheduling is a CPU scheduling technique the process takes the resource (CPU time) and holds it till the process gets terminated or is pushed to the waiting state. No process is interrupted until it is completed, and after that processor switches to another process.

Algorithms that are based on non-preemptive Scheduling are non-preemptive priority, and shortest Job first.

LRM_EXPORT_207556595493866_20190724_1939

Q

3

Define i)CPU Utilization ii)Throughput iii)Turnaround time iv)Waiting time v)Response Time

LRM_EXPORT_207556595493866_20190724_1939

Ans

Throughput: – number of processes that complete their execution per time unit

Turnaround time: – amount of time to execute a particular process

Waiting time: – amount of time a process has been waiting in the ready queue

Response time:– amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)

LRM_EXPORT_207556595493866_20190724_1939

Q

4

What do you mean by CPU-burst and I/O burst?

LRM_EXPORT_207556595493866_20190724_1939

Ans

CPU Burst :- "The amount of time the process uses the processor before it is no longer ready".
Types Of CPU burst :-
1. Long burst : ("Process is CPU bound")
2. Short burst : ("Process I/O bound")

I/O Burst :- "Input/Output burst is that after completion the input burst CPU do process on that job".

Explanation :- CPU burst is like a car and input Input burst is like a pedestrian , because CPU speed is much faster than Input Output burst , we can not reduce the speed of CPU burst but we can increase the Input Output speed.

LRM_EXPORT_207556595493866_20190724_1939

Q

5

What is multilevel queue?

LRM_EXPORT_207556595493866_20190724_1939

Ans

A multi-level queue scheduling algorithm partitions the ready queue into several seperate queues. The processes are permanently assigned to one queue, generally based on some property of process, such as memory size, process priority, or process type. Each queue has it own scheduling algorithm.

LRM_EXPORT_207556595493866_20190724_1939
bottom of page