Interview Question: Topper
Interview Question: Topper
Interview Question
©Topperworld
Demand paging is a technique used in virtual memory systems where pages
enter main memory only when requested or needed by the CPU.
In demand paging, the operating system loads only the necessary pages of a
program into memory at runtime, instead of loading the entire program into
memory at the start.
Q 3 . What is a kernel?
©Topperworld
It is a core component of an operating system.
Kernel acts as a bridge between applications and data processing performed
at the hardware level using inter-process communication and system calls.
Ans :
1) First-Come, First-Served (FCFS) Scheduling.
2) Shortest-Job-Next (SJN) Scheduling.
3) Priority Scheduling.
4) Shortest Remaining Time.
5) Round Robin(RR) Scheduling.
6) Multiple-Level Queues Scheduling.
©Topperworld
Q 6 . What is the time-sharing system?
Ans :
➢ Poor resource management
➢ Lack of User Interface
➢ No File System
➢ No Networking
➢ Error handling is big issue etc.
©Topperworld
then resume listening to another request. The time taken while processing
of request makes other users wait unnecessarily. Instead a better
approach would be to pass the request to a worker thread and continue
listening to port.
©Topperworld
6) Microprocessor Architecture Utilization – Every thread could be
execute in parallel on a distinct processor which might be considerably
amplified in a microprocessor architecture. Multithreading enhances
concurrency on a multi CPU machine. Also the CPU switches among
threads very quickly in a single processor architecture where it creates the
illusion of parallelism, but at a particular time only one thread can running.
Ans : FCFS stands for First Come First served. In the FCFS scheduling
algorithm, the job that arrived first in the ready queue is allocated to the CPU
and then the job that came second and so on.
FCFS is a non-preemptive scheduling algorithm as a process that holds the
CPU until it either terminates or performs I/O.
Thus, if a longer job has been assigned to the CPU then many shorter jobs after
it will have to wait.
©Topperworld
Ans : A redundant array of independent disks is a set of several physical disk
drives that the operating system sees as a single logical unit. It played a
significant role in narrowing the gap between increasingly fast processors and
slow disk drives. RAID has different levels:
• Level-0
• Level-1
• Level-2
• Level-3
• Level-4
• Level-5
• Level-6
Ans :
©Topperworld
Parameter LOGICAL ADDRESS PHYSICAL ADDRESS
The user can use the logical The user can indirectly access
Access address to access the physical addresses but not
physical address. directly.
Ans : With dynamic loading, a routine is not loaded until it is called. This
method is especially useful when large amounts of code are needed in order
to handle infrequently occurring cases such as error routines.
©Topperworld
Q 15 . What are overlays?
Ans : The concept of overlays is that whenever a process is running it will not
use the complete program at the same time, it will use only some part of it.
Then overlay concept says that whatever part you required, you load it and
once the part is done, then you just unload it, which means just pull it back and
get the new part you required and run it.
Formally, “The process of transferring a block of program code or other data
into internal memory, replacing what is already stored”.
Q 16 . What is fragmentation?
Ans : Processes are stored and removed from memory, which makes free
memory space, which is too little to even consider utilizing by different
processes. Suppose, that process is not ready to dispense to memory blocks
since its little size and memory hinder consistently staying unused is called
fragmentation. This kind of issue occurs during a dynamic memory allotment
framework when free blocks are small, so it can’t satisfy any request.
©Topperworld
Q 17 . What is the basic function of paging?
©Topperworld
Q 18 . How does swapping result in better memory management?
Q
19 . Write a name of classic synchronization problems?
Ans :
➢ Bounded-buffer
➢ Readers-writers
➢ Dining philosophers
➢ Sleeping barber
Ans : 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.
©Topperworld
Direct access is advantageous when accessing large amounts of information.
Direct memory access (DMA) is a method that allows an input/output (I/O)
device to send or receive data directly to or from the main memory, bypassing
the CPU to speed up memory operations.
Ans : 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.
©Topperworld
Q 23 . What is multitasking?
Q 24 . What is caching?
Ans : The cache is a smaller and faster memory that stores copies of the data
from frequently used main memory locations.
©Topperworld
Q 25 . What is spooling?
©Topperworld
Q 28 . What is GUI?
Ans : 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.
©Topperworld
Q 31 . What are the advantages of semaphores?
Ans :
➢ They are machine-independent.
➢ Easy to implement.
➢ Correctness is easy to determine.
➢ Can have many different critical sections with different semaphores.
➢ Semaphores acquire many resources simultaneously.
➢ No waste of resources due to busy waiting.
©Topperworld
The bootloader or bootstrap program is then loaded to initialize the OS.
Q 33 . What is IPC?
©Topperworld
managed by the system kernel these messages are coordinated using an
API.
Ans :
⚫ In preemptive scheduling, the CPU is allocated to the processes for a
limited time whereas, in Non-preemptive scheduling, the CPU is allocated
to the process till it terminates or switches to waiting for the state.
©Topperworld
⚫ In preemptive scheduling, if a high-priority process frequently arrives in
the ready queue then the process with low priority has to wait for a long,
and it may have to starve. On the other hand, in non-preemptive
scheduling, if CPU is allocated to the process having a larger burst time
then the processes with a small burst time may have to starve.
Ans : A process that has finished the execution but still has an entry in the
process table to report to its parent process is known as a zombie process. A
child process always first becomes a zombie before being removed from the
process table. The parent process reads the exit status of the child process
which reaps off the child process entry from the process table.
Ans : A process whose parent process no more exists i.e. either finished or
terminated without waiting for its child process to terminate is called an
orphan process.
©Topperworld
Q 38 . What are starvation and aging in OS?
Ans :
Starvation: Starvation is a 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: Aging is a technique to avoid starvation in a scheduling system. It works
by adding an aging factor to the priority of each request. The aging factor
must increase the priority of the request as time passes and must ensure that
a request will eventually be the highest priority request.
©Topperworld
This kernel provides CPU scheduling, memory management, file management,
and other operating system functions through system calls.
As both services are implemented under the same address space, this makes
operating system execution faster.
Ans : Switching of CPU to another process means saving the state of the old
process and loading the saved state for the new process.
In Context Switching the process is stored in the Process Control Block to
serve the new process so that the old process can be resumed from the same
part it was left.
©Topperworld
Q 41 . What is the difference between the Operating system and
kernel?
Ans :
It is the first program to load It is the first program to load when the
when the computer boots up. operating system loads
©Topperworld
Q 42 . What is the difference between process and thread?
Ans :
©Topperworld
S.NO Process Thread
Q 43 . What is PCB?
Ans : The process control block (PCB) is a block that is used to track the
process’s execution status.
A process control block (PCB) contains information about the process, i.e.
registers, quantum, priority, etc.
The process table is an array of PCBs, that means logically contains a PCB for
all of the current processes in the system.
©Topperworld
Q 44 . When is a system in a safe state?
Ans : 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.
©Topperworld
Q 47 . Write a difference between process and program?
Ans :
©Topperworld
S.NO Program Process
The program does not have any The process has its own control
6. control block. block called Process Control
Block.
Q 48 . What is a dispatcher?
Ans :
The dispatcher is the module that gives process control over the CPU after it
has been selected by the short-term scheduler. This function involves the
following:
➢ Switching context
➢ Switching to user mode
➢ Jumping to the proper location in the user program to restart that program
©Topperworld
Q 49 . Write a difference between a user-level thread and a kernel-
level thread?
Ans :
©Topperworld
Q 50 . Difference between Multithreading and Multitasking?
Ans :
It is the process of a
3. lightweight part. It is a heavyweight process.
©Topperworld
ABOUT US
➢ Our Vision
❖ Our vision is to create a world where every college student can easily access
high-quality educational content, connect with peers, and achieve their
academic goals.
❖ We believe that education should be accessible, affordable, and engaging,
and that's exactly what we strive to offer through our platform.
©Topperworld
❖ Education is not just about textbooks and lectures; it's also about forming
connections and growing together.
❖ TopperWorld encourages you to engage with your fellow students, ask
questions, and share your knowledge.
❖ We believe that collaborative learning is the key to academic success.
©Topperworld
“Unlock Your
Potential”
With- Topper World
Explore More
topperworld.in
Follow Us On
E-mail
topperworld.in@gmail.com