OPERATING SYSTEM INTERVIEW QUESTIONS-07

Differentiate between Complier and Interpreter?
An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions

What is Throughput, Turnaround time, waiting time and Response time?
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)

What is Memory-Management Unit (MMU)?
Hardware device that maps virtual to physical address. In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.
->The user program deals with logical addresses; it never sees the real physical addresses

What is a Real-Time System?
A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully

What is a trap and trapdoor?
Trapdoor is a secret undocumented entry point into a program used to grant access without normal methods of access authentication.
A trap is a software interrupt, usually the result of an error condition.

When is a system in safe state?
The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock.

Explain the concept of the Distributed systems?
Distributed systems work in a network. They can share the network resources, communicate with each other.

What is cache-coherency?
In a multiprocessor system there exist several caches each may containing a copy of same variable A. Then a change in one cache should immediately be reflected in all other caches this process of maintaining the same value of a data in all the caches s called cache-coherency.

What is a long term scheduler & short term schedulers?
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 from the ready queue and allocate the CPU to one of them.

Explain the meaning of mutex.
Mutex is the short form for ‘Mutual Exclusion object’. A mutex allows multiple threads for sharing the same resource. The resource can be file. A mutex with a unique name is created at the time of starting a program. A mutex must be locked from other threads, when any thread that needs the resource. When the data is no longer used / needed, the mutex is set to unlock.

What is cycle stealing?
We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle.

What is Marshalling?
The process of packaging and sending interface method parameters across thread or process boundaries.

What is a daemon?
Daemon is a program that runs in the background without user’s interaction. A daemon runs in a multitasking operating system like UNIX. A daemon is initiated and controlled by special programs known as ‘processes’.

What is pre-emptive and non-preemptive scheduling?
Preemptive scheduling: The preemptive scheduling is prioritized. The highest priority process should always be the process that is currently utilized.
Non-Preemptive scheduling: When a process enters the state of running, the state of that process is not deleted from the scheduler until it finishes its service time.

What is busy waiting?
The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.

What is page cannibalizing?
Page swapping or page replacements are called page cannibalizing.

What is SMP?
To achieve maximum efficiency and reliability a mode of operation known as symmetric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.

What is process migration?
It is the transfer of sufficient amount of the state of process from one machine to the target machine.

Difference between Primary storage and secondary storage?
Primary memory is the main memory (Hard disk, RAM) where the operating system resides.
Secondary memory can be external devices like CD, floppy magnetic discs etc. secondary storage cannot be directly accessed by the CPU and is also external memory storage.

Define compactions.
Compaction is a process in which the free space is collected in a large memory chunk to make some space available for processes.

What are residence monitors?
Early operating systems were called residence monitors.

What is dual-mode operation?
In order to protect the operating systems and the system programs from the malfunctioning programs the two mode operations were evolved
System mode
User mode.

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

What are the different types of Real-Time Scheduling?
Hard real-time systems required to complete a critical task within a guaranteed amount of time.
Soft real-time computing requires that critical processes receive priority over less fortunate ones.

No comments:

Post a Comment