Operating System Interview Question
Operating System Interview Question
Question
1) What is an operating system?
The operating system is a software program that facilitates computer hardware to
communicate and operate with the computer software. It is the most important part
of a computer system without it computer is just like a box.
o It is designed to make sure that a computer system performs well by managing its
computational activities.
o It provides an environment for the development and execution of programs.
4) What is a socket?
A socket is used to make connection between two applications. Endpoints of the
connection are called socket.
6) What is kernel?
Kernel is the core and most important part of a computer operating system which
provides basic services for all parts of the OS.
o New Process
o Running Process
o Waiting Process
o Ready Process
o Terminated ProcessDifference between JDK, JRE, and JVM
Learn more
1) Mutual Exclusion Condition: It specifies that the resources involved are non-
sharable.
2) Hold and Wait Condition: It specifies that there must be a process that is holding
a resource already allocated to it while waiting for additional resource that are
currently being held by other processes.
3) No-Preemptive Condition: Resources cannot be taken away while they are being
used by processes.
o Mutual Exclusion: At least one resource must be held in a non-sharable mode. If any
other process requests this resource, then that process must wait for the resource to
be released.
o Hold and Wait: A process must be simultaneously holding at least one resource and
waiting for at least one resource that is currently being held by some other process.
o No preemption: Once a process is holding a resource ( i.e. once its request has been
granted ), then that resource cannot be taken away from that process until the
process voluntarily releases it.
o Circular Wait: A set of processes { P0, P1, P2, . . ., PN } must exist such that every P[ i ]
is waiting for P[ ( i + 1 ) % ( N + 1 ) ].
Note: This condition implies the hold-and-wait condition, but it is easier to deal
with the conditions if the four are considered separately.
o Internal fragmentation: It is occurred when we deal with the systems that have fixed
size allocation units.
o External fragmentation: It is occurred when we deal with systems that have
variable-size allocation units.
o Binary semaphores
o Counting semaphores
After fragmentation