OS Notes
OS Notes
OS Notes
1. What is OS?
Ans: - OS is a software that works as an interface between hardware and
user.
Features of OS: -
• Manage process
• Manage memory
• Manage resources
• Error handling
• Security
2. Types of OS.
Ans: -
• Multi-programmed OS: - windows, Linux etc.
• Timesharing OS
• Distributed OS
• Realtime OS
3. Multiprocessor vs Multitasking.
Ans: -
MultiProcessor MultiTasking
It is fast. It is slow.
5. What is GUI?
Ans: - Graphical User Interface, is a type of user interface that uses graphics
to interact with OS.
Features: -
• User-friendly
• Less complex
• Easy to understand
6. What is Pipe and when it is used?
Ans: -
• pipe is a mechanism through which process can communicate with
each-other.
• Pipe is a mechanism that provides interprocess communication.
• It is used to send output of one process to another process.
7. What is semaphore?
Ans: - Semaphore is a technique to manage concurrent processes using an
integer value called semaphore.
• It is shared between threads.
• It has two operation Wait () and Signal ().
Types: -
• Binary semaphore – value is between 0 and 1, also known as Mutex
locks as they provide mutual exclusion.
• Counting Semaphore – suppose there are multiple instances of a
resource, then multiple process can use instances of same
resource.
8. What is Bootstrap?
Ans: -
• It is program that initializes OS during startup.
• It is first code that is executed when an OS starts.
• OS loaded through bootstrapping process is called booting.
• It is stored in boot blocks in fixed location in hard-disk.
Q. What is paging?
Ans: - Paging is a memory management technique used to store and retrieve
program from secondary memory to primary memory.
To execute a program, first it is bought to RAM from hard disk then from
RAM to CPU.
17.What is a process?
Ans: - A program in execution is called process.
Types of process: -
• OS process
• User process
Different states of process: -
• New
• Ready
• Waiting
• Running
• Terminate
19.Reentrancy – it is a program where client can use and share a single copy of
a program at same time.
26. Starvation – It occurs when process is not able to get required resources for
a long time so that it can finish its execution.
Aging – it is a technique to overcome starvation, it increases the priority of
other processes with time.
27.Kernel – it is basically a program considered as central component of OS.
it is responsible for handling, managing and controlling all operations of
computer system and hardware.
• Whenever the system starts, kernel is loaded first
• All functions of OS.
Types: -
• Monolithic
• Micro
• Hybrid
• Nano
• Exo
Process Threads
A program in execution. Smallest unit of process.
Heavy weight operations Light Weight operations.
It has its own memory space. It uses the memory of the process it
belongs to.
It doesn’t share data. It shares data among threads.
It can be further divided. It cannot be further divided.
31. What is Deadlock in OS?
Ans: - Deadlock is a situation occurs when a two or more processes eg: p1 is
waiting for some resources which is held by p2 process which requires the
resource held by p1.
32. Belady’s anomaly – Generally when we increase number of frames, the page
fault decreases or we can say they have inverse relationship, but in FIFO
there is a situation occurs when increasing number of frames also increases
page faults.
• Operating System Kernel Loading - The boot loader transfers control to the
operating system's kernel, which is the core component of the operating
system. The kernel is loaded into memory, and it takes over the control of
the computer.
• User Interface: Finally, the user interface is presented, and the user can
interact with the computer.
35. If you are facing issues with internal server error, how will you troubleshoot?
Ans: - Troubleshooting an internal server can be a systematic process to
tackle this problem.
• Checking server logs.
• Software update logs.
• Code changes logs.
36. ps aux | grep <process_name> - linux command for getting details about a
process.
37. Top - Display real-time usage of resources including CPU usage.
38. Star – It is used to create or extract an archive.