Top 100+ Operating System Interview Questions (20 2
Top 100+ Operating System Interview Questions (20 2
Table of Content
3. What is a Thread?
6. What is Thrashing?
7. What is Buffer?
Level-0
Level-1
Level-2
Level-3
Level-4
Level-5
Level-6
LOGICAL PHYSICAL
Parameter
ADDRESS ADDRESS
generated by location in a
Basic
the CPU. memory unit.
Physical
Logical
Address is a
Address
set of all
Space is a set
physical
of all logical
Address addresses
addresses
Space mapped to
generated by
the
the CPU in
corresponding
reference to a
logical
program.
addresses.
Users can
Users can
never view
view the
Visibility the physical
logical address
address of the
of a program.
program.
generated by Computed by
Generation
the CPU. MMU.
Bounded-buffer
Readers-writers
Dining philosophers
Sleeping barber
Type of operating
system includes
Type of kernel
single and multiuser
includes Monolithic
OS, multiprocessor
and Microkernel.
OS, real-time OS,
Distributed OS.
The process is
Thread is more
less efficient in
2. efficient in terms of
terms of
communication.
communication.
The process is
Thread is called
called
4. lightweight
heavyweight
process.
the process.
Process
Thread switching
switching uses,
does not require to
another
call an operating
5. process
system and cause
interface in
an interrupt to the
operating
kernel.
system.
If one process
The second, thread
is blocked then
in the same task
it will not affect
6. could not run, while
the execution
one server thread
of other
is blocked.
process
The process
Thread has
has its own
Parents’ PCB, its
Process
own Thread
7. Control Block,
Control Block and
Stack and
Stack and common
Address
Address space.
Space.
Program
contains a set of Process is an
instructions instance of an
1.
designed to executing
complete a program.
specific task.
Process is an
Program is a
active entity as it
passive entity as
is created during
2. it resides in the
execution and
secondary
loaded into the
memory.
main memory.
Program does
Process has a
not have any
high resource
resource
requirement, it
requirement, it
5. needs resources
only requires
like CPU, memory
memory space
address, and I/O
for storing the
during its lifetime.
instructions.
Switching context
Switching to user mode
Jumping to the proper location in the user
program to restart that program
Mutexes
Condition variables
Semaphores
File locks
Intermediate OS Interview
Questions
61. Write a difference between a user-
level thread and a kernel-level thread?
OS doesn’t
Kernel threads are
recognize user-level
recognized by OS.
threads.
Context switch
Hardware support is
requires no
needed.
hardware support.
Multiple threads
are executing at
Several programs
the same time at
1. are executed
the same or
concurrently.
different part of
the program.
CPU switches
CPU switches
between multiple
2. between multiple
tasks and
threads.
processes.
It is the process It is a
3. of a lightweight heavyweight
part. process.
It is a feature of It is a feature of
4.
the process. the OS.
Multitasking is
Multi-threading is
sharing of
sharing of
computing
computing
5. resources(CPU,
resources among
memory, devices,
threads of a
etc.) among
single process.
processes.
Software solutions
Hardware solutions
Semaphores
Relocation
Protection
Sharing
Logical organization
Physical organization
Logical Physical
S.NO. Parameters
address Address
It is the
The physical
virtual
address is a
1. Basic address
location in a
generated
memory unit.
by CPU.
Set of all
logical
Set of all
addresses
physical
generated
addresses
by the
mapped to
CPU in
the
reference
2. Address corresponding
to a
logical
program
addresses is
is referred
referred to as
to as
a Physical
Logical
Address.
Address
Space.
The user
The user can
can view
never view
the logical
3. Visibility the physical
address
address of the
of a
program
program.
The user
uses the
The user can
logical
not directly
address
4. Access access the
to access
physical
the
address
physical
address.
The
Logical
Physical
Address
Address is
5. Generation is
Computed by
generated
MMU
by the
CPU
Internal External
S.NO
fragmentation fragmentation
In internal
In external
fragmentation
fragmentation,
fixed-sized
variable-sized
memory,
1. memory blocks
blocks square
square measure
measure
appointed to the
appointed to
method.
process.
Internal
fragmentation External
happens when fragmentation
2. the method or happens when the
process is method or process
larger than the is removed.
memory.
The solution to
Solution for external
internal
fragmentation is
3. fragmentation
compaction, paging
is the best-fit
and segmentation.
block.
External
Internal
fragmentation
fragmentation
occurs when
occurs when
memory is divided
4. memory is
into variable-size
divided into
partitions based on
fixed-sized
the size of
partitions.
processes.
Advantages
Disadvantages
In paging,
program is In segmentation, the
divided into program is divided
1.
fixed or into variable-size
mounted-size sections.
pages.
It is faster in
Segmentation is
4. comparison of
slow.
segmentation.
Paging could
Segmentation could
result in
5. result in external
internal
fragmentation.
fragmentation.
In paging,
logical
Here, logical
address is
address is split into
6. split into that
section number and
page number
section offset.
and page
offset.
Paging
While segmentation
comprises a
also comprises the
page table
segment table which
7. which
encloses the
encloses the
segment number
base address
and segment offset.
of every page.
A page table
Section Table
is employed to
8. maintains the
keep up the
section data.
page data.
Paging is
Segmentation is
10. invisible to the
visible to the user.
user.
In paging,
In segmentation, the
processor
processor uses
needs page
segment number,
11. number, offset
and offset to
to calculate
calculate the full
the absolute
address.
address.
Associative
S.No. Cache Memory
Memory
A memory unit
accessed by Fast and small
1 content is called memory is called
associative cache memory.
memory.
It reduces the
time required to It reduces the
2 find the item average memory
stored in access time.
memory.
It is used when a
It is used where particular group
4 search time is of data is
very short. accessed
repeatedly.
Its basic
characteristic is Its basic
5 its logic circuit for characteristic is
matching its its fast access
content.
Operation on file:
Create
Open
Read
Write
Rename
Delete
Append
Truncate
Close
Advanced OS Interview
Questions
95. What is Belady’s Anomaly?
Enhanced performance.
Multiple applications.
Multi-tasking inside an application.
High throughput and responsiveness.
Hardware sharing among CPUs.
Process termination
Abort all the deadlock processes
Abort one process at a time until the deadlock
is eliminated
Resource preemption
Rollback
Selecting a victim
Conclusion
In conclusion, the field of operating systems is a
crucial aspect of computer science, and a
thorough understanding of its concepts is
essential for anyone looking to excel in this area.
By reviewing the Top 2024 100+ operating
systems interview questions we have compiled,
you can gain a deeper understanding of the key
principles and concepts of OS and be better
prepared to tackle any interview questions that
may come your way. Remember to study and
practice regularly, and use these questions as a
starting point to delve deeper into the complex
world of operating systems. With dedication and
hard work, you can become an expert in this field
and succeed in any OS-related job or interview.
Recommended Articles
1. System Protection in Operating System
2. User View Vs Hardware View Vs System View
of Operating System
3. File System Implementation in Operating
System
4. Xv6 Operating System -adding a new system
call
5. Traps and System Calls in Operating System
(OS)
6. Difference between System Software and
Operating System
7. Fork System Call in Operating System
8. System Programs in Operating System
9. Operating Systems - GATE CSE Previous Year
Questions
10. Multiple-Processor Scheduling in Operating
System
11. Banker's Algorithm in Operating System
12. Swap Space in Operating System
13. Thread Models in Operating System
14. Free space management in Operating System
15. The Tempo Operating System
16. Boot Block in Operating System
17. Privileged and Non-Privileged Instructions in
Operating System
18. Recovery from Deadlock in Operating System
19. Comparison on using Java for an Operating
System instead of C
20. Difference between Loading and Linking in
Operating System
21. Access matrix in Operating System
22. Difference between Operating System and
Kernel
23. Stack Implementation in Operating System
uses by Processor
24. Best-Fit Allocation in Operating System
25. Thread Control Block in Operating System
Company
About Us
Legal
Careers
In Media
Contact Us
Advertise with us
GFG Corporate Solution
Placement Training Program
Explore
Job-A-Thon Hiring Challenge
Hack-A-Thon
GfG Weekly Contest
Offline Classes (Delhi/NCR)
DSA in JAVA/C++
Master System Design
Master CP
GeeksforGeeks Videos
Geeks Community
Languages
Python
Java
C++
PHP
GoLang
SQL
R Language
Android Tutorial
DSA
Data Structures
Algorithms
DSA for Beginners
Basic DSA Problems
DSA Roadmap
DSA Interview Questions
Competitive Programming
Web Technologies
HTML
CSS
JavaScript
TypeScript
ReactJS
NextJS
NodeJs
Bootstrap
Tailwind CSS
Python Tutorial
Python Programming Examples
Django Tutorial
Python Projects
Python Tkinter
Web Scraping
OpenCV Tutorial
Python Interview Question
Computer Science
GATE CS Notes
Operating Systems
Computer Network
Database Management System
Software Engineering
Digital Logic Design
Engineering Maths
DevOps
Git
AWS
Docker
Kubernetes
Azure
GCP
DevOps Roadmap
System Design
High Level Design
Low Level Design
UML Diagrams
Interview Guide
Design Patterns
OOAD
System Design Bootcamp
Interview Questions
School Subjects
Mathematics
Physics
Chemistry
Biology
Social Science
English Grammar
Commerce
Accountancy
Business Studies
Economics
Management
HR Management
Finance
Income Tax
Databases
SQL
MYSQL
PostgreSQL
PL/SQL
MongoDB
Preparation Corner
Company-Wise Recruitment Process
Resume Templates
Aptitude Preparation
Puzzles
Company-Wise Preparation
Companies
Colleges
Competitive Exams
JEE Advanced
UGC NET
UPSC
SSC CGL
SBI PO
SBI Clerk
IBPS PO
IBPS Clerk
More Tutorials
Software Development
Software Testing
Product Management
Project Management
Linux
Excel
All Cheat Sheets