os
1.What is an operating system?
Operating System is a collection of programs which act as an interface between user of a computer
and the computer hardware.
and the computer hardware.
The purpose of an operating system is to provide an environment in which a user can execute
programs in a convenient and efficient manner.
programs in a convenient and efficient manner.
2. Explain PCB with neat diagram.
Process Control Block(PCB) also known as Task Control Block. PCB is a data structure which is used
by the operating system. Operating System is groups of all information that is needed about a
particular process. PCB acts as a storage for any information for the process. The information are
process ID, process state, process priority, program counter, CPU register etc.
by the operating system. Operating System is groups of all information that is needed about a
particular process. PCB acts as a storage for any information for the process. The information are
process ID, process state, process priority, program counter, CPU register etc.
When a process is created, the OS creates a corresponding PCB for the process.
When a process is terminated its PCB is released to free the memory location.
Also note that a process can complete only when it has active PCB associated with it.
When a process is terminated its PCB is released to free the memory location.
Also note that a process can complete only when it has active PCB associated with it.
- Pointer: Pointer points to another PCB. pointer is used for maintaining the scheduling list.
- Process State:Process state may be New, ready, running, waiting and so on.
- Program Counter: Program Counter indicates the address of the next instruction to be executed
for this process. - CPU Register: The CPU registers are accumulator, base, registers and general purpose registers.
- Memory Allocation: This field contains the information about memory management system used by
operating system. This may include the page tables, segment tables etc. - Accounting Information : This information includes the amount of CPU and real time use, time limits,
jobs or process numbers,account numbers. - Open files list :This information includes the list of files opened for a process.4.Explain the state transition diagram of a process.
3.What is thread? Write three points to differentiate it from process.Thread:
Thread is a lightweight process.One process may have number of threads. It is called lightweight
because different threads belonging to one process, can share the same resources used by that process.
When a process has one thread , then it is called single threading. If a process have number of threads,
then it is called multi-threading.
State Transition Process Diagram
New :
In this state the process is being created.
Ready:
In this state different process are waiting for assigned in processor and the process are selected by a scheduler.
Running:
When a process selected by scheduler then it goes to the processor to run.In running state the process may be interrupted and the process goes to the ready state.And again in the ready state a process is selected by a scheduler.
Waiting:
In this state a process may be blocked or have to wait for some input-output event.When the input output event is completed the process will go to the ready state.
Terminated:
When the execution of a process is completed, the OS terminate the process from the running state.
5.Difference between multilevel feedback queue and multilevel queue scheduling algorithm.video tutorial
\
8.Short note on round robin algorithm. - Round Robin is the preemptive process scheduling algorithm.
- Each process is provided a fix time to execute, it is called a quantum.
- Once a process is executed for a given time period, it is preempted and other process executes for a given time period.
- Context switching is used to save states of preempted processes.
9.Suppose that the process arrive for execute at the time indicated
Draw the Gantt chart and calculate the average waiting time for:-
FCFS scheduling algorithm.
Priority scheduling algorithm.
Pre-emptive SJF scheduling algorithm.
Round robin scheduling algorithm. [2+2+2+2=8]
10.Difference between preemptive and nonpreemptive.
ex- RR FCFS
12.What is spooling?
Spooling mean simultaneous peripheral operation online.
Simultaneous mean if 2 or more user issu the print commmand and the printer accept the request
even the printer printing some other jobs. The printer printing one job at the same time the spool disk
can load some other jobs.
even the printer printing some other jobs. The printer printing one job at the same time the spool disk
can load some other jobs.
spool disk is a temporary buffer, it can read data from secondary storage device directly.
Simultaneously the cpu execute some other jobs in the spool disk at the same time the printer
printer the third job, so three jobs are running simultaneously.
Simultaneously the cpu execute some other jobs in the spool disk at the same time the printer
printer the third job, so three jobs are running simultaneously.
13) Different between fork() and vfork() ?
https://techdifferences.com/difference-between-fork-and-vfork.html
14)Difference between preemptive and nonpreemptive scheduling ?
Taken form
15)Difference between starvation and deadlock ?
Taken form
16)Difference between internal and external fragmentation.
Visit this site


Comments
Post a Comment