0% found this document useful (0 votes)
733 views22 pages

Operating Systems Interview Questions You'll Most Likely Be Asked

Operating System Interview Questions You’ll Most Likely Be Asked is a perfect companion to stand ahead above the rest in today’s competitive job market. Rather than going through comprehensive, textbook-sized reference guides, this book includes only the information required immediately for job search to build an IT career. This book puts the interviewee in the driver’s seat and helps them steer their way to impress the interviewer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
733 views22 pages

Operating Systems Interview Questions You'll Most Likely Be Asked

Operating System Interview Questions You’ll Most Likely Be Asked is a perfect companion to stand ahead above the rest in today’s competitive job market. Rather than going through comprehensive, textbook-sized reference guides, this book includes only the information required immediately for job search to build an IT career. This book puts the interviewee in the driver’s seat and helps them steer their way to impress the interviewer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Job Interview Questions Series

OPERATING SYSTEMS
INTERVIEW QUESTIONS
YOU'LL MOST LIKELY BE ASKED

302
Interview Questions
Operating Systems
Interview Questions
You'll Most Likely Be Asked

© 2021, By Vibrant Publishers, USA. All rights reserved. No part of this


publication may be reproduced or distributed in any form or by any means,
or stored in a database or retrieval system, without the prior permission of
the publisher.

ISBN-10: 1-946383-14-7
ISBN-13: 978-1-946383-14-3

Library of Congress Control Number: 2012920664

This publication is designed to provide accurate and authoritative


information in regard to the subject matter covered. The author has made
every effort in the preparation of this book to ensure the accuracy of the
information. However, information in this book is sold without warranty
either expressed or implied. The Author or the Publisher will not be liable for
any damages caused or alleged to be caused either directly or indirectly by
this book.

Vibrant Publishers books are available at special quantity discount for sales
promotions, or for use in corporate training programs. For more information
please write to [email protected]

Please email feedback / corrections (technical, grammatical or spelling) to


[email protected]

To access the complete catalogue of Vibrant Publishers, visit


www.vibrantpublishers.com
Table of Contents

chapter 1 General 7

chapter 2 Operating system design 31

chapter 3 Inter-Process Communication 37

chapter 4 Threads 51

chapter 5 CPU Scheduling 63

chapter 6 Scheduling Algorithms 69

chapter 7 Process Synchronization 75

chapter 8 Memory Management 85

chapter 9 Windows 10 91

chapter 10 Linux 95

chapter 11 Mac OS 99
HR Interview Questions 103
Index 131
Dear Reader,

Thank you for purchasing Operating Systems Interview Questions You'll Most Likely Be
Asked. We are committed to publishing books that are content-rich, concise and
approachable enabling more readers to read and make the fullest use of them. We hope this
book provides the most enriching learning experience as you prepare for your interview.

Should you have any questions or suggestions, feel free to email us at


[email protected]

Thanks again for your purchase. Good luck with your interview!

– Vibrant Publishers Team

facebook.com/vibrantpublishers
Operating Systems
Interview Questions
Review these typical interview questions and think about how you would
answer them. Read the answers listed; you will find best possible answers
along with strategies and suggestions.

www.vibrantpublishers.com
This page is intentionally left blank
Chapter 1

General

1: What is Operating System?


Answer:
An Operating System is a software between computer hardware
and the user of the computer. The primary objective of an
operating system is to offer an environment to enable end user
execute programs conveniently and proficiently. An operating
system is also responsible for managing computer hardware.

2: What are the components of a computer system?


Answer:
There are four components of computer system. They are:
a) Computer Hardware – It provides computing resources to a
computer system and is composed of several units including
Central Processing Unit (CPU), Memory and Input / Output

www.vibrantpublishers.com
8 Operating Systems Interview Questions You’ll Most Likely Be Asked

devices
b) Application programs – These are the programs which
specify the methods to solve user’s problems. Example of
application programs are word processor, compiler,
spreadsheet etc.
c) Operating System – It is a software which controls the
usage of computer hardware among different application
programs of different users
d) User – A user is the person who is using the computer
system

3: What is bootstrap program?


Answer:
A bootstrap program is an initial program which is started when a
computer is powered on or rebooted. The objective of a bootstrap
program is to initialize the CPU registers, device controllers,
memory contents etc. and to load and start executing the
operating system. Bootstrap program is typically stored in read-
only- memory (ROM) of a computer system.

4: What is an interrupt?
Answer:
An interrupt may be defined as an occurrence of an event which
causes the Central Processing Unit to suspend executing current
program, transfer the control to another program called service
routine and upon completion of service routine, resume executing
the suspended program. An interrupt may be caused by either
hardware or software.

facebook.com/vibrantpublishers
General 9

5: What is interrupt vector?


Answer:
An interrupt vector is an array of memory locations which point
to interrupt service routine for various devices. It is stored in the
form of table of pointers at starting location of memory for
example, first 100 memory locations. An interrupt vector is
usually indexed by unique device number along with interrupt
request in order to locate the address of interrupt service routine
for an interrupting device.

6: Explain a typical instruction execution cycle.


Answer:
An instruction execution cycle consists of following steps:
a) Fetching instruction from main memory and store it in
instruction registers
b) Decoding the instruction and fetch the required operands
from main memory
c) Executing the instruction
d) Store the result in main memory

7: Why is it not possible to store all instructions and data in


main memory?
Answer:
It is not possible to store all instructions and data in main memory
because:
a) The size of main memory is small compared to amount of
instructions and data that can be stored permanently
b) Main memory is volatile because it loses its content when
power is switched off
www.vibrantpublishers.com
10 Operating Systems Interview Questions You’ll Most Likely Be Asked

8: What is secondary storage?


Answer:
Secondary storage is a storage that can hold large amount of
instruction and data permanently. For example: magnetic disc,
magnetic tape etc. Usually, majority of the programs such as
spreadsheet, browser, compiler etc. are stored on magnetic disc
and are loaded in main memory when required.

9: Explain Direct Memory Access (DMA).


Answer:
Direct Memory Access is a method to transfer a complete block of
data between device controller’s buffer storage and main memory
without intervention of CPU (Central Processing Unit). The
advantage of Direct Memory Access is that there is only one
interrupt generated per block of data to inform the device driver
that operation has been completed. Direct Memory Access is
typically used in situations where bulk transfer of data is required
such as disk input /output.

10: Describe single processor computer system.


Answer:
A single process computer system has only one general purpose
microprocessor which can execute a general-purpose instruction
set as well as instructions from user processes and it may contain
one or more special purpose microprocessors. Therefore, if a
computer system contains a special-purpose microprocessor such
as Input/output microprocessor in addition to a general-purpose
microprocessor then the computer system is still considered as a
single processor computer system.

facebook.com/vibrantpublishers
General 11

11: Describe multiprocessor computer system.


Answer:
A multiprocessor computer system contains two or more general
purpose microprocessors which can communicate with other and
share a computer bus, memory and Input/output devices. A
multiprocessor computer system may contain one or more special
purpose microprocessors.

12: What are advantages of multiprocessor computer system?


Answer:
The advantages of multiprocessor computer system are:
a) Increased efficiency – The major advantage of
multiprocessor computer system is that efficiency of the
system increases because two or more processors are
involved in executing the task and therefore task gets
completed in less amount of time
b) Reduced cost – When several programs are required to
operate on same set of data then a multiprocessor system
costs less than an equivalent multiple single processor
computer system since a multiprocessor computer system
share peripherals and storage devices
c) Increased reliability – If a task is distributed equally among
the microprocessors then failure of one microprocessor does
not cause a multiprocessor system to halt

13: What is fault tolerant system?


Answer:
A fault tolerant computer system can continue its operation
despite failure of a component. A fault tolerant computer system

www.vibrantpublishers.com
12 Operating Systems Interview Questions You’ll Most Likely Be Asked

requires the ability to detect, diagnose and possibly correct the


fault. An example of fault tolerant computer system is HP Non-
Stop system which both hardware and software are duplicated to
make sure operation is continued.

14: What are the types of multiprocessor computer systems?


Answer:
There are two types of multiprocessor computer systems:
a) Asymmetric multiprocessor computer system – In this
multiprocessor computer system, each processor is assigned
a specific task
b) Symmetric multiprocessor computer system – In this
multiprocessor computer system, each processor can
perform all tasks within operating system

15: Explain Asymmetric multiprocessor computer system.


Answer:
In this multiprocessor computer system, each processor is
assigned a specific task. A master processor allocates the work to
other processors and controls the complete system. Therefore,
there is a master-slave relationship exists among the processors.
Example of the operating system which uses asymmetric
multiprocessing is Sun Microsystems’s SunOS.

16: Explain Symmetric multiprocessor computer system.


Answer:
In this multiprocessor computer system, each processor can
execute all tasks within operating system. All the processors are
considered as peers and therefore there is no master-slave
facebook.com/vibrantpublishers
General 13

relationship exists among the processors. Example of the


operating system which uses symmetric multiprocessing is Sun
Microsystems’s Solaris.

17: Describe blade servers.


Answer:
A blade server consists of multiple processor boards, Input/
Output boards, networking boards which are put in the same
chassis. Each blade-server board has ability to boot independently
and has its own operating system. Also, a blade server board may
contain multiple processors. Therefore, a blade server may be
defined as a system consists of multiple independent
multiprocessor systems.

18: What is a clustered system?


Answer:
A clustered system is defined as a system which is composed of
two or more individual system that share storage and are coupled
together usually with a Local Area Network. A clustered system
provides a high-availability service which ensures that the service
will remain continue even if one or more system in the cluster
fails.

19: How high-availability services ensure smooth operation in a


clustered system?
Answer:
A high-availability service is achieved in a clustered system by
running a layer of cluster software on each node so that each node
could monitor one or more other nodes. If one of the monitored

www.vibrantpublishers.com
14 Operating Systems Interview Questions You’ll Most Likely Be Asked

nodes fails, then monitoring node takes claim of monitored node’s


storage and restarts the application which was running on failed
node. Therefore, users experience the interruption in service for
only small amount of time.

20: What is Asymmetric clustering system?


Answer:
In asymmetric clustering system, two machines are used; one
machine is used as a standby machine while other machine is used
to run user applications. The standby machine does not run any
application and it monitors only the active machine. If the active
machine fails, then standby machine is used as active machine.

21: What is Symmetric clustering system?


Answer:
In symmetric clustering system, two or more machines are used
where all machines run user applications and simultaneously
monitor each other. If one of the machines fails, other machines
continue their operation but also execute the application which
was running on the failed machine.

22: What are the advantages and disadvantages of asymmetric


clustering system?
Answer:
Advantages:
a) Asymmetric clustering system provides high availability
and scalability
b) Asymmetric clustering is most suitable for databases with
large number of transactions, messaging systems etc.
facebook.com/vibrantpublishers
General 15

Disadvantages:
a) As one machine is used as a standby therefore asymmetric
clustering system does not utilize hardware resources
efficiently
b) Asymmetric clustering system is usually expensive

23: What are the advantages and disadvantages of symmetric


clustering system?
Answer:
Advantages:
a) Symmetric clustering system utilizes hardware resources
efficiently because all machines are used to run user
applications
b) Symmetric clustering system is more cost effective
Disadvantages:
a) When a machine takes the additional work of another failed
machine, it may cause the machine to fail

24: What is a parallel cluster system?


Answer:
A parallel cluster system consists of multiple machines which may
access the same data through a shared storage. Each machine in a
parallel cluster system accesses the same data simultaneously
using special software. For example, Oracle Parallel Server is a
special version of Oracle database which is designed to run on a
parallel cluster system where each machine runs Oracle Parallel
Server software and a layer of software controls access to the
shared disk.

www.vibrantpublishers.com
16 Operating Systems Interview Questions You’ll Most Likely Be Asked

25: What is a distributed lock manager?


Answer:
In parallel cluster system, as all machines have access to all the
data in the database therefore a conflict may occur when multiple
machines access the shared storage. The mechanism which
controls and locks the access to the shared storage in order to
ensure that there is no conflict occurs is known as distributed lock
manager.

26: What is multiprogramming?


Answer:
Multiprogramming is an ability of the operating system to execute
multiple tasks such that the Central Processing Unit (CPU)
remains busy at all the time. The need of multiprogramming
arises because operating system maintains a set of jobs in memory
simultaneously and CPU executes one task at a time but if the task
requires some I/O operation to be performed in order to be
completed then CPU has to wait until I/O operation finishes.
Therefore, in multiprogramming, instead of waiting for the I/O to
finish, CPU picks up another task from the memory and starts
executing it. In multiprogramming, a user cannot interact with
application while it is running

27: What is multitasking?


Answer:
Multitasking is a version of multiprogramming where CPU can
execute multiple jobs by switching among them, but the frequency
of switching is so fast such that a user can interact with
application while it is running. A multitasking system requires an
interactive computer system so that a user can provide
facebook.com/vibrantpublishers
General 17

instructions to the operating system through an input device such


as keyboard and see the result immediately on the output device.
Multitasking system is also known as a time-sharing system.

28: What is job scheduling?


Answer:
Job Scheduling is the process of choosing a job among several jobs
in the job pool and loading it into main memory. Job scheduling is
required because operating system keeps only a subset of jobs in
the main memory at a time while all other jobs resides on the disk
in the job pool.

29: What is dual mode of operation?


Answer:
As a computer system can either execute operating system code or
user code. These two modes of operations are called dual mode
operation: kernel mode and user mode. A bit called “mode bit” is
incorporated in computer hardware to distinguish between two
modes of operation, a “1” indicates kernel mode and a “0”
indicates user mode.

30: How dual mode of operation provides protection to


operating system against errant users?
Answer:
In dual mode of operation, the machine instruction which may be
harmful is designated as a privileged instruction and can only be
executed when kernel mode is being used. The hardware of
computer system does not permit the privileged instruction to be

www.vibrantpublishers.com
18 Operating Systems Interview Questions You’ll Most Likely Be Asked

executed in user mode and it treats it as illegal and generates an


interrupt.
31: Why a timer is used in dual mode operation?
Answer:
As a user program may continue running indefinitely and may
not pass the control over to operating system therefore a timer is
set to interrupt the computer after some specified amount of time.
If the timer interrupts, control is transferred to the operating
system and operating system treats it as fatal error and may give
more time to user program

32: What are the responsibilities of operating system in process


management?
Answer:
The responsibilities of operating system in process management
are:
a) Operating system is responsible for creation and deletion of
both system and user processes
b) Operating system is responsible for suspending and
resuming a process
c) Operating system is responsible for synchronizing processes
d) Operating system is responsible for implementing
mechanism for communication among processes
e) Operating system is responsible for dealing with deadlocks

33: What are the responsibilities of operating system in memory


management?
Answer:

facebook.com/vibrantpublishers
General 19

The responsibilities of operating system in memory management


are:
a) Operating system is responsible for keeping track of the
locations of memory which are being used by processes and
data
b) Operating system is responsible for moving processes and
data in and out of the memory
c) Operating system is responsible for memory allocation and
de-allocation to processes

34: What are the responsibilities of operating system in file


management?
Answer:
The responsibilities of operating system in file management are:
a) Operating system is responsible for creating and deleting
files
b) Operating system is responsible for creating and deleting
directories in order to organize files
c) Operating system is responsible for mapping files to
secondary storage
d) Operating system is responsible for maintaining back upon
secondary storage such as magnetic disk, magnetic tape etc.
e) Operating system is responsible for supporting basic
operations in order to manipulate files

35: What is caching?


Answer:
Caching is a technique in which information which is being used
by the CPU also kept in fast storage media called a cache.
www.vibrantpublishers.com
20 Operating Systems Interview Questions You’ll Most Likely Be Asked

Therefore, when CPU needs some information, it first checks in


the cache to see if the information is present. If information is
present, then CPU executes on the information and if information
is not present in cache then it is fetched from the original source of
information and also copied into cache.

36: What is cache coherency?


Answer:
In multiprocessor system, as each processor maintains its own
local cache, therefore a copy of an integer N must be present in all
the caches. As these processors execute concurrently therefore a
change in the value of integer N must be immediately reflected in
all other caches where a copy of integer N is located. This problem
is known as cache coherence.

37: What do you mean by “protection”?


Answer:
Protection is a mechanism of controlling access of processes or
users to the resources of the computer system both hardware and
software. The mechanism must specify the controls and their
enforcement. An unprotected resource cannot defend its use
against an unauthorized user.

38: What do you mean by “security”?


Answer:
Security is a mechanism of defending the computer system from
internal and external attacks. An example of such an attack is
duplication or deletion of authenticated data even when both file
and memory is protected. Some computer systems depend upon

facebook.com/vibrantpublishers

You might also like