Wednesday 19 September 2012

OS Interview Questions-3


1.What is micro kernel approach and site its advantages?
Ans: Micro kernel approach is a step towards modularizing the operating system where all nonessential components from the kernel are removed and implemented as system and user level program, making the kernel smaller.The benefits of the micro kernel approach include the ease of extending the operating system. All new services are added to the user space and consequently do not require modification of the kernel. And as kernel is smaller it is easier to upgrade it. Also this approach provides more security and reliability since most services are running as user processes rather than kernel’s keeping the kernel intact.

2.What are a virtual machines and site their advantages?
Ans: It is the concept by which an operating system can create an illusion that a process has its own processor with its own (virtual) memory. The operating system implements virtual machine concept by using CPU scheduling and virtual memory.
1. The basic advantage is it provides robust level of security as each virtual machine is isolated from all other VM. Hence the system resources are completely protected.
2. Another advantage is that system development can be done without disrupting normal operation. System programmers are given their own virtual machine, and as system development is done on the virtual machine instead of on the actual physical machine.
3. Another advantage of the virtual machine is it solves the compatibility problem.
EX: Java supplied by Sun micro system provides a specification for java virtual machine.

3.What is a process?
Ans: A program in execution is called a process. Or it may also be called a unit of work. A process needs some system resources as CPU time, memory, files, and i/o devices to accomplish the task. Each process is represented in the operating system by a process control block or task control block (PCB).
Processes are of two types:
1. Operating system processes
2. User processes

4.What are the states of a process?
Ans:
1. New
2. Running
3. Waiting
4. Ready
5. Terminated

5.What are various scheduling queues?
Ans:
1. Job queue
2. Ready queue
3. Device queue

6.What is a job queue?
Ans: When a process enters the system it is placed in the job queue.

7.What is a ready queue?
Ans: The processes that are residing in the main memory and are ready and waiting to execute are kept on a list called the ready queue.

8.What is a device queue?
Ans: A list of processes waiting for a particular I/O device is called device queue.

9.What is a long term scheduler & short term schedulers?
Ans: Long term schedulers are the job schedulers that select processes from the job queue and load them into memory for execution. The short term schedulers are the CPU schedulers that select a process form the ready queue and allocate the CPU to one of them.

10.What is context switching?
Ans: Transferring the control from one process to other process requires saving the state of the old process and loading the saved state for new process. This task is known as context switching.

No comments:

Post a Comment