Top 40 Operating System Placement Questions and Answers

Updated: Jun 15

Operating systems define the abstract machines on which subsystems and application programs must be implemented and operated. Operating systems (OS) play an important role in creating the programming environment for the development of interfaces and applications. Following is the list of top Operating System placement questions and answers to help you crack best company placements.

Basic Operating System Placement Questions

Q1. Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processed.

Suppose each process P[i] executes the following: wait (m[i]); wait(m[(i+1) mode 4]);

release (m[i]); release(m[(i+1)mod 4]); This could cause-

  • Thrashing

  • Deadlock

  • Starvation, but not deadlock

  • None of the above

Correct Answer: B

Explanation: P[0] has acquired m[0] and waiting for m[1] P[1] has acquired m[1] and waiting for m[2] P[2] has acquired m[2] and waiting for m[3] P[3] has acquired m[3] and waiting for m[0]

Hence a deadlock So the answer is b.

Q2. Which of the following requires a device driver?

  • Register

  • Cache

  • memory

  • Disk

Correct Answer: D

Explanation: Cache, memory, register are directly connected to the CPU, Whereas device driver is a program which coordinates with CPU to regulate the device. So, Disk is the only valid option.

Q3. What is the swap space in the disk used for?

  • Saving temporary html pages

  • Saving process data

  • Storing the super-block

  • Storing device drivers

Correct Answer: B

Explanation: Swap space is typically used to store process data.

Q4. Consider the following code fragment:

if (fork() == 0)
{ a = a + 5; printf(%d,%d\n”, a, &a); }
else { a = a –5; printf(%d, %d\n”,a, &a); }

Let u, v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE?

  • u = x + 10 and v = y

  • u = x + 10 and v !=y

  • u + 10 = x and v = y

  • u + 10 = x and v != y

Correct Answer: C

Explanation: fork() returns0 in child process and process ID of child process in parent process. In Child (x), a = a + 5

In Parent (u), a = a – 5; Therefore x = u + 10.

The physical addresses of ‘a’ in parent and child must be different. But our program accesses virtual addresses (assuming we are running on an OS that uses virtual memory).The child process gets an exact copy of parent process and virtual address of ‘a’ doesn’t change in child process. Therefore, we get same addresses in both parent and child.


Q5. The process of transferring data intended for a peripheral device into a disk (or intermediate store)so that it can be transferred to peripheral at a more convenient time or in bulk, is known as

  • multiprogramming

  • spooling

  • caching

  • virtual programming

Correct Answer: B

Explanation: Spooling means "simultaneous peripheral operation online". For example simultaneous means if two or more users issue the print command & the printer can accept the request even printing some other jobs. The printer printing one job at the same time the spool disk can load same other jobs.

Q6. The Register - to - Register(RR) instructions-

  • Have both their operands in the main store.

  • Which perform an operation on a register operand and an operand which is located in the main store, generally leaving the result in the register, except in the case of store operation when it is also written into the specified storage location.

  • Which perform indicated operations on two fast registers of the machine and leave the result in one of the registers.

  • all of the above

Correct Answer: C

Explanation: The Register - to - Register (RR) instructions which perform indicated operations on two fast registers of the machine and leave the result in one of the registers.

Q7. In analyzing the compilation of PL/I program, the term "Machine independent optimization" is associated with

  • recognition of basic syntactic constructs through reductions.

  • recognition of basic elements and creation of uniform symbols.

  • creation of more optional matrix.

  • use of macro processor to produce more optimal assembly code.

Correct Answer: C

Q8. Which of the following is a block device?

  • mouse

  • printer

  • terminals

  • disk

Correct Answer: D

Explanation: A block device is one with which the driver communicates by sending entire blocks of data. For example, Hard disks.

Q9. Which of the following software types is used to simplify using systems software?

  • Spreadsheet

  • Operating environment

  • Timesharing

  • Multitasking

Correct Answer: C

Explanation: In computing, time-sharing is the sharing of a computing resource among many users by means of multiprogramming and multi-tasking at the same time. Its introduction in the 1960s and emergence as the prominent model of computing in the 1970s represented a major technological shift in the history of computing.

Q10. An instruction in a programming language that is replaced by a sequence of instructions prior to assembly or compiling is known as-

  • Procedure name

  • Macro

  • Label

  • Literal

Correct Answer: B

Explanation: An instruction in a programming language that is replaced by a sequence of instructions prior to assembly or compiling is known as macro.

For more Operating System placement questions and answers download our free handbook below.


Operating System Placement PDF Download

Mobiprep handbooks are free downloadable placement preparation resources that can help you ace any company placement process. We have curated a list of the 40 most important operating systems MCQ questions with detailed explanations to ensure the best placement preparation.

Top 40 Operating Systems Interview Questions and Answers
Download PDF • 735KB


163 views0 comments

Recent Posts

See All