Top 53 Operating system(OS) Interview Questions And Answers 2019

Top 53 Operating system(OS) Interview Questions And Answers 2019: Here are the top interview questions of Operating system(OS). Be prepared for the interview. You can download the entire questions in a pdf format. so guys All the best for your interview.

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.

2) What is the main purpose of an operating system?

There are two main purposes of an operating system:

  • It is designed to make sure that a computer system performs well by managing its computational activities.
  • It provides an environment for the development and execution of programs.

3) What are the different operating systems?

  • Batched operating systems
  • Distributed operating systems
  • Timesharing operating systems
  • Multi-programmed operating systems
  • Real-time operating systems

4) What is a socket?

A socket is used to make connection between two applications. Endpoints of the connection are called socket.

5) What is a real-time system?

A real-time system is used in the case when rigid-time requirements have been placed on the operation of a processor. It contains a well defined and fixed time constraints.

6) What is dead lock?

Deadlock is a situation or condition where the two processes are waiting for each other to complete so that they can start. This result both the processes to hang.

7) What is a process?

A program in execution is called a process.

Processes are of two types:
1. Operating system processes
2. User processes

8) What are the states of a process?

1. New
2. Running
3. Waiting
4. Ready
5. Terminated

9) What is starvation and aging?

Top 53 Operating system(OS) Interview Questions And Answers 2019: Starvation is Resource management problem where a process does not get the resources it needs for a long time because the resources are being allocated to other processes.

Aging is a technique to avoid starvation in a scheduling system.

10) What is semaphore?

Semaphore is a variable, whose status reports common resource, Semaphore is of two types one is Binary semaphore and other is Counting semaphore.

11) What is asymmetric clustering?

In asymmetric clustering, a machine is in a state known as hot standby mode where it does nothing but to monitor the active server. That machine takes the active server’s role should the server fails.

12) What is a thread?

A thread is a basic unit of CPU utilization. In general, a thread is composed of a thread ID, program counter, register set, and the stack.

13) Give some benefits of multithreaded programming.

– there is increased responsiveness to the user
– resource sharing within the process
– economy
– utilization of multiprocessing architecture

14) Briefly explain FCFS.

FCFS stands for First-come, first-served. It is one type of scheduling algorithm. In this scheme, the process that requests the CPU first is allocated the CPU first. Implementation is managed by a FIFO queue.

15) What is RR scheduling algorithm?

RR (round-robin) scheduling algorithm is primarily aimed for time-sharing systems. A circular queue is set up in such a way that the CPU scheduler goes around that queue, allocating CPU to each process for a time interval of up to around 10 to 100 milliseconds.

16) What is virtual memory?

Virtual memory is a very useful memory management technique which enables processes to execute outside of memory. This technique is especially used when an executing program cannot fit in the physical memory.

17) What is thrashing?

Thrashing is a phenomenon in virtual memory scheme when the processor spends most of its time in swapping pages, rather than executing instructions.

18) What are the four necessary and sufficient conditions behind the deadlock?

These are the 4 conditions:

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.

4) Circular Wait Condition: It is an explanation of the second condition. It specifies that the processes in the system form a circular list or a chain where each process in the chain is waiting for a resource held by the next process in the chain.

19) What is a thread?

A thread is a basic unit of CPU utilization. It consists of a thread ID, program counter, register set and a stack.

20) What is FCFS?

FCFS stands for First Come, First Served. It is a type of scheduling algorithm. In this scheme, if a process requests the CPU first, it is allocated to the CPU first. Its implementation is managed by a FIFO queue.

21) 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)

22) What is Memory-Management Unit (MMU)?

Top 53 Operating system(OS) Interview Questions And Answers 2019: Hardware device that maps virtual to a 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

23) 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

24) 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.

25) 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.

26) Give an example of a Process State.

– New State – means a process is being created
– Running – means instructions are being executed
– Waiting – means a process is waiting for certain conditions or events to occur
– Ready – means a process is waiting for an instruction from the main processor
– Terminate – means a process is stopped abruptly

27) What is a socket?

A socket provides a connection between two applications. Each endpoint of a communication is a socket.

28) What is Direct Access Method?

The direct Access method is based on a disk model of a file, such that it is viewed as a numbered sequence of blocks or records. It allows arbitrary blocks to be read or written. Direct access is advantageous when accessing large amounts of information.

29) When does thrashing occur?

Thrashing refers to an instance of high paging activity. This happens when it is spending more time paging instead of executing.

30) What is the best page size when designing an operating system?

The best paging size varies from system to system, so there is no single best when it comes to page size. There are different factors to consider in order to come up with a suitable page size, such as page table, paging time, and its effect on the overall efficiency of the operating system.

31) What is semaphore?

Semaphore is a protected variable or abstract data type that is used to lock the resource being used. The value of the semaphore indicates the status of a common resource.

There are two types of semaphore:

  • Binary semaphores
  • Counting semaphores

32) What is a binary Semaphore?

Binary semaphore takes only 0 and 1 as value and used to implement mutual exclusion and synchronize concurrent processes.

33) What is Belady’s Anomaly?

Top 53 Operating system(OS) Interview Questions And Answers 2019: Belady’s Anomaly is also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady’s Anomaly. This is true for certain page reference patterns.

34) What is starvation in Operating System?

Starvation is Resource management problem. In this problem, a waiting process does not get the resources it needs for a long time because the resources are being allocated to other processes.

35) What is aging in Operating System?

Aging is a technique used to avoid the starvation in resource scheduling system.

36) 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.

37) What is process migration?

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

38) 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.

39) 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.

40) What are residence monitors?

Early operating systems were called residence monitors.

41) What is an Assembler?

Top 53 Operating system(OS) Interview Questions And Answers 2019: An assembler acts as a translator for low-level language. Assembly codes written using mnemonic commands are translated by the Assembler into machine language.

42) What are interrupts?

Interrupts are part of a hardware mechanism that sends a notification to the CPU when it wants to gain access to a particular resource. An interrupt handler receives this interrupt signal and “tells” the processor to take action based on the interrupt request.

43) What is GUI?

GUI is short for Graphical User Interface. It provides users with an interface wherein actions can be performed by interacting with icons and graphical symbols. People find it easier to interact with the computer when in a GUI especially when using the mouse. Instead of having to remember and type commands, users click on buttons to perform a process.

44) What is preemptive multitasking?

Preemptive multitasking allows an operating system to switch between software programs. This, in turn, allows multiple programs to run without necessarily taking complete control over the processor and resulting in system crashes.

45) Why partitioning and formatting is a prerequisite to installing an operating system?

Partitioning and formatting create a preparatory environment on the drive so that the operating system can be copied and installed properly. This includes allocating space on the drive, designating a drive name, determining and creating the appropriate file system and structure.

46) What is a data register and address register?

Top 53 Operating system(OS) Interview Questions And Answers 2019: Data registers – can be assigned to a variety of functions by the programmer. They can be used with any machine instruction that performs operations on data.
Address registers – contain main memory addresses of data and instructions or they contain a portion of the address that is used in the calculation of the complete addresses.

47. What is DRAM?  

Dynamic Ram stores the data in the form of Capacitance, and Static RAM stores the data in Voltages.

48. What are local and global page replacements?

Local replacement means that an incoming page is brought in only to the relevant process’ address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only.

49. Explain the concept of the batched operating systems?  

In batched operating system the users gives their jobs to the operator who sorts the programs according to their requirements and executes them. This is time consuming but makes the CPU busy all the time.

50. What is SCSI?

SCSI – Small computer systems interface is a type of interface used for computer components such as hard drives, optical drives, scanners and tape drives. It is a competing technology to standard IDE (Integrated Drive Electronics).

51) What is a folder in Ubuntu?

There is no concept of Folder in Ubuntu. Everything included in your hardware is a FILE.

52) Explain why Ubuntu is safe and not affected by viruses?

  • It does not support malicious e-mails and contents, and before any e-mail is opened by users it will go through many security checks
  • Ubuntu uses Linux, which is a super secure O.S system
  • Unlike other O.S, countless Linux users can see the code at any time and can fix the problem if there is any
  • Malware and viruses are coded to take advantage of the weakness in Windows

53) Explain what is Unity in Ubuntu? How can you add new entries to the launcher?

In Ubuntu, Unity is the default graphical shell.  On the left side of the Ubuntu, it introduces the launcher and Dash to start programs.

In order to add new entries to the launcher, you can create a file name like .desktop and then drag the file on the launcher.

Top 53 Operating system(OS) Interview Questions And Answers 2019