Os Revision-1
Os Revision-1
3. What is a Thread?
6. What is Thrashing?
7. What is Buffer?
Virtual memory creates an illusion that each user has one or more
contiguous address spaces, each beginning at address zero. The sizes of
such virtual address spaces are generally very high. The idea of virtual
memory is to use disk space to extend the RAM. Running processes
don’t need to care whether the memory is from RAM or disk. The
illusion of such a large amount of memory is created by subdividing the
virtual memory into smaller pieces, which can be loaded into physical
memory whenever they are needed by a process.
11. What is a kernel?
15. What is a thread?
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.
Level-0
Level-1
Level-2
Level-3
Level-4
Level-5
Level-6
24. What is fragmentation?
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.
Bounded-buffer
Readers-writers
Dining philosophers
Sleeping barber
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. 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. The process is managed by a chip known
as a DMA controller (DMAC).
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 multitasking?
32. What is caching?
The cache is a smaller and faster memory that stores copies of the data
from frequently used main memory locations. There are various
different independent caches in a CPU, which store instructions and
data. Cache memory is used to reduce the average time to access data
from the Main memory.
33. What is spooling?
36. 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.
41. What is IPC?
Inter-process communication (IPC) is a mechanism that allows
processes to communicate with each other and synchronize their
actions. The communication between these processes can be seen as a
method of cooperation between them.
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.
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.
51. What is PCB?
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.
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
57. Define the term dispatch latency?
When more than one processes access the same code segment that
segment is known as the critical section. The critical section contains
shared variables or resources which are needed to be synchronized to
maintain the consistency of data variables. In simple terms, a critical
section is a group of instructions/statements or regions of code that
need to be executed atomically such as accessing a resource (file, input
or output port, global data, etc.).
Mutexes
Condition variables
Semaphores
File locks
Software solutions
Hardware solutions
Semaphores
Deadlock is a situation when two or more processes wait for each other
to finish and none of them ever finish. Consider an example when two
trains are coming toward each other on the same track and there is only
one track, none of the trains can move once they are in front of each
other. A similar situation occurs in operating systems when there are
two or more processes that hold some resources and wait for resources
held by other(s).
76. What is the goal and functionality of memory
management?
Relocation
Protection
Sharing
Logical organization
Physical organization
Advantages
Disadvantages
Operation on file:
Create
Open
Read
Write
Rename
Delete
Append
Truncate
Close
91. Define the term Bit-Vector?
FAT stands for File Allocation Table and this is called so because it
allocates different files and folders using tables. This was originally
designed to handle small file systems and disks. A file allocation table
(FAT) is a table that an operating system maintains on a hard disk that
provides a map of the cluster (the basic units of logical storage on a
hard disk) that a file has been stored in.
Seek Time: Seek time is the time taken to locate the disk arm to a
specified track where the data is to be read or written. So the disk
scheduling algorithm that gives a minimum average seek time is better.
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