InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is starvation and aging in OS? |
|
Answer» When we use Priority Scheduling or Shortest Job First Scheduling, Starvation can happen, This algorithm is mostly used in CPU schedulers Starvation: It is GENERALLY a problem that usually occurs when a process has not been able to get the required resources it needs for progress with its EXECUTION for a long period of time. In this condition, low priority processes get BLOCKED and only high priority processes proceed towards completion because of which low priority processes suffer from lack of resources. |
|
| 2. |
What do you mean by cascading termination? |
|
Answer» CASCADING TERMINATION is a process termination in which if the parent process is exiting or TERMINATING then the CHILDREN process will also GET terminated. It does not allow the child to continue processing as its parent process terminates. It is generally initiated by OS. |
|
| 3. |
Explain zombie process? |
|
Answer» Zombie process, referred to as a defunct process, is basically a process that is terminated or completed but the whole process control block is not cleaned up from the main memory because it still has an entry in the process table to report to its parent process. It does not consume any of the RESOURCES and is DEAD, but it still exists. It ALSO shows that resources are HELD by process and are not free. |
|
| 4. |
What do you mean by Sockets in OS? |
|
Answer» The socket in OS is generally referred to as an endpoint for IPC (Interprocess Communication). Here, the endpoint is referred to as a combination of an IP address and port number. Sockets are used to make it easy for software DEVELOPERS to create network-enabled programs. It also allows communication or exchange of INFORMATION between two different processes on the same or different machines. It is MOSTLY used in client-server-based systems.
|
|
| 5. |
What is the difference between multitasking and multiprocessing OS? |
||||||||||||||
|
Answer» Multitasking: It is a system that allows more efficient USE of COMPUTER hardware. This system WORKS on more than one task at one time by rapidly switching between various tasks. These systems are also known as time-sharing systems. Multiprocessing: It is a system that allows multiple or various processors in a computer to process two or more different portions of the same PROGRAM simultaneously. It is used to complete more work in a shorter period of time.
|
|||||||||||||||
| 6. |
What do you mean by asymmetric clustering? |
|
Answer» ASYMMETRIC Clustering is generally a system in which one of the nodes AMONG all nodes is in hot standby MODE whereas the rest of all nodes run different applications. It simply USES whole or entire hardware RESOURCES therefore it is considered a more reliable system as compared to others. |
|
| 7. |
What is the main objective of multiprogramming? |
|
Answer» It refers to the ability to execute or perform more than one PROGRAM on a single processor machine. This TECHNIQUE was introduced to overcome the problem of UNDERUTILIZATION of CPU and main memory. In simple words, it is the coordination of EXECUTION of various programs simultaneously on a single processor (CPU). The main objective of multiprogramming is to have at least some processes running at all times. It SIMPLY improves the utilization of the CPU as it organizes many jobs where the CPU always has one to execute. |
|
| 8. |
What is thrashing in OS? |
|
Answer» It is generally a situation where the CPU performs less productive work and more swapping or PAGING work. It spends more time swapping or paging activities rather than its execution. By evaluating the level of CPU utilization, a system can detect THRASHING. It OCCURS when the process does not have enough PAGES due to which the page-fault rate is increased. It inhibits MUCH application-level processing that causes computer performance to degrade or collapse. |
|
| 9. |
What is the difference between paging and segmentation? |
||||||||||||||||||||
|
Answer» Paging: It is GENERALLY a memory management technique that allows OS to retrieve processes from secondary storage into main memory. It is a non-contiguous allocation technique that divides each process in the form of pages.
|
|||||||||||||||||||||
| 10. |
What is a Scheduling Algorithm? Name different types of scheduling algorithms. |
|
Answer» A scheduling ALGORITHM is a process that is used to improve EFFICIENCY by utilizing maximum CPU and providing minimum waiting time to tasks. It simply deals with the problem of deciding which of outstanding requests is to be allocated RESOURCES. Its main aim is to REDUCE resource starvation and to ensure fairness amongst parties that are utilizing the resources. In SIMPLE words, it is used to allocate resources among various competing tasks. |
|
| 11. |
What is Reentrancy? |
|
Answer» Reentrant is simply a function in which VARIOUS clients can USE and SHARES a single copy of a program during a similar period. This concept is generally associated with OS code and does not deal with concurrency. It has two major functions:
|
|
| 12. |
What do you mean by FCFS? |
|
Answer» FCFS (First Come First Serve) is a type of OS scheduling algorithm that executes PROCESSES in the same order in which processes arrive. In simple words, the process that arrives first will be executed first. It is non-preemptive in nature. FCFS scheduling may cause the problem of starvation if the burst time of the first process is the longest among all the jobs. Burst time here means the time that is REQUIRED in milliseconds by the process for its EXECUTION. It is ALSO considered the easiest and simplest OS scheduling algorithm as compared to others. Implementation of FCFS is GENERALLY managed with help of the FIFO (First In First Out) queue. |
|
| 13. |
What is a process? What are the different states of a process? |
|
Answer» The process is basically a program that is currently under execution. The main function of an OS is to manage and handle all of these processes. When a program is loaded into the memory and it becomes a process, it can be divided into four sections ─ stack, heap, text, and DATA. There are two types of processes:
STATES of Process:
|
|
| 14. |
What is thread in OS? |
|
Answer» Thread is a path of execution that is composed of a program counter, thread ID, stack, and set of registers within the PROCESS. It is a basic unit of CPU utilization that makes COMMUNICATION more effective and efficient, enables utilization of multiprocessor architectures to a greater scale and greater efficiency, and reduces the TIME required in context switching. It simply provides a way to improve and increase the performance of applications through PARALLELISM. Threads are sometimes called lightweight processes because they have their own stack but can access shared data. |
|