0% found this document useful (0 votes)
11 views8 pages

Operating Systems

The document provides a comprehensive overview of operating systems, detailing their functions, components, and key concepts such as processes, threads, and memory management techniques. It addresses basic, intermediate, advanced, and expert questions related to operating systems, covering topics like multitasking, deadlocks, and different types of kernels. Additionally, it explains various memory management strategies and the importance of process synchronization and resource management.

Uploaded by

geekycoder886
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)
11 views8 pages

Operating Systems

The document provides a comprehensive overview of operating systems, detailing their functions, components, and key concepts such as processes, threads, and memory management techniques. It addresses basic, intermediate, advanced, and expert questions related to operating systems, covering topics like multitasking, deadlocks, and different types of kernels. Additionally, it explains various memory management strategies and the importance of process synchronization and resource management.

Uploaded by

geekycoder886
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/ 8

Operating Systems

@bzlearnin

Operating System (OS) is basically a software program that manages and handles
all resources of a computer such as hardware and software.

Basic Questions
1. What is an operating system?
○ Answer: An operating system (OS) is system software that manages computer
hardware and software resources, providing services for computer programs.
2. What are the main functions of an operating system?
○ Answer: The main functions include resource management, process
management, file system management, security and access control, user
interface management, and networking.

3. What is a process?
○ Answer: A process is a program in execution, including the program code,
current activity, process stack, and data section.

4. What is a thread?
○ Answer: A thread is the smallest unit of a process that can be scheduled for
execution, sharing resources like memory with other threads within the same
process.

5. What is the difference between a process and a thread?


○ Answer: A process is an independent program with its own memory space, while
a thread is a smaller unit within a process that shares the same memory and
resources but can run independently.

6. What is the main objective of multiprogramming?


○ Answer:It refers to the ability to execute or perform more than one program on a
single processor machine. This technique was introduced to overcome the
problem of underutilization of CPU and main memory. In simple words, it is the
coordination of execution of various programs simultaneously on a single
processor (CPU). The main objective of multiprogramming is to have at least
some processes running at all times. It simply improves the utilization of the CPU
as it organizes many jobs where the CPU always has one to execute.

7. What is multitasking?
○ Answer: Multitasking is the ability of an operating system to execute multiple
tasks (processes) concurrently by sharing CPU time.

8. What is a kernel?
○ Answer: The kernel is the core part of an operating system that manages system
resources, handles system calls, interrupts, and hardware communication.

9. What is virtual memory?


○ Answer: Virtual memory is a memory management technique that creates an
illusion of a large, continuous memory space by using disk storage to extend
physical memory.

10. What is a deadlock?


○ Answer: A deadlock is a situation where two or more processes are unable to
proceed because each is waiting for the other to release a resource.

11. What are the necessary conditions for a deadlock to occur?


○ Answer: Mutual exclusion, hold and wait, no preemption, and circular wait.
Intermediate Questions
11. How can deadlocks be prevented or avoided?
○ Answer: By ensuring one of the necessary conditions does not hold, using
deadlock prevention techniques, deadlock avoidance algorithms, or detecting
and recovering from deadlocks.

12. What is paging?


○ Answer: Paging is a memory management scheme that eliminates the need for
contiguous allocation of physical memory by dividing it into fixed-sized blocks
called pages.

13. What is a file system?


○ Answer: A file system is a method and data structure used by an operating
system to manage files on a disk or partition.

14. What is a context switch?


○ Answer: A context switch is the process of saving the state of a currently running
process or thread and restoring the state of a different process or thread.

15. What are system calls?


○ Answer: System calls are the interface between a process and the operating
system, providing the means by which a process can request services from the
kernel.

16. What is a monolithic kernel?


○ Answer: A monolithic kernel is a type of kernel where all operating system
services run in kernel space, including device drivers, file system management,
and network stacks.

17. What is a microkernel?


○ Answer: A microkernel is a minimalistic kernel design where core functionalities
run in kernel space, while other services run in user space, aiming to improve
modularity and stability.
18. What is swapping?
○ Answer: Swapping is a memory management technique where processes are
moved between main memory and disk storage to manage limited physical
memory.

19. What is the difference between a logical address and a physical address?
○ Answer: A logical address is a reference generated by the CPU, while a physical
address is the actual location in memory, translated by the memory management
unit (MMU).

20. What is segmentation?


○ Answer: Segmentation is a memory management technique dividing memory into
variable-sized segments based on logical divisions of a program, like functions or
data structures.

Advanced Questions
21. What is a real-time operating system (RTOS)?
○ Answer: An RTOS is designed to handle real-time applications that process data
as it comes in, typically without buffer delays.

22. What is a distributed operating system?


○ Answer: A distributed operating system manages a group of distinct computers
and makes them appear to be a single computer.

23. What is the purpose of the page replacement algorithm?


○ Answer: Page replacement algorithms decide which memory pages to swap out
when a new page needs to be brought into memory, ensuring efficient use of
physical memory.

24. What is thrashing in operating systems?


○ Answer: Thrashing occurs when a system spends more time swapping pages in
and out of memory than executing processes, severely degrading performance.
25. What is demand paging?
○ Answer: Demand paging is a memory management scheme where pages are
loaded into memory only when they are needed, rather than in advance.

26. What are interrupts and how do they work?


○ Answer: Interrupts are signals to the processor indicating that it should stop its
current activities and execute the corresponding interrupt service routine. They
handle events like hardware actions or software exceptions.

27. What is the difference between preemptive and non-preemptive scheduling?


○ Answer: Preemptive scheduling allows the operating system to interrupt and
switch processes, while non-preemptive scheduling lets a process run until it
completes or voluntarily yields control.

28. What is the purpose of the bootloader?


○ Answer: A bootloader is a small program that loads the operating system into
memory when the computer starts, initializing the system and handing control
over to the OS.

29. What is a hypervisor?


○ Answer: A hypervisor, or virtual machine monitor (VMM), allows multiple
operating systems to share a single hardware host by providing each OS with its
own virtual machine environment.

30. What is the difference between a hard link and a soft link in file systems?
○ Answer: A hard link is a directory entry that associates a name with a file on a file
system, while a soft link (symbolic link) is a pointer to another file name, creating
a link at the file system level.

Expert Questions

31. What is the difference between a daemon and a service?


○ Answer: A daemon is a background process running on Unix-like systems, while
a service typically refers to background processes on Windows systems.
32. What is process synchronization?
○ Answer: Process synchronization is a mechanism to control the sequence of
process execution to ensure correct data sharing and consistency in concurrent
processing environments.

33. What is the critical section problem?


○ Answer: The critical section problem involves ensuring that multiple processes or
threads do not access shared resources simultaneously in a way that leads to
conflicts or inconsistencies.

34. What is an inode in a file system?


○ Answer: An inode is a data structure on a filesystem that stores information about
a file or a directory, such as its size, ownership, permissions, and pointers to its
data blocks.

35. What is the difference between synchronous and asynchronous I/O?


○ Answer: Synchronous I/O operations wait for data transfer to complete before
proceeding, while asynchronous I/O operations allow the program to continue
executing while the data transfer occurs.

36. What is the difference between a compiler and an interpreter?


○ Answer: A compiler translates an entire program into machine code before
execution, while an interpreter translates and executes code line-by-line at
runtime.

37. What is an orphan process?


○ Answer: An orphan process is a process whose parent process has terminated,
causing it to be adopted by the init process in Unix-like operating systems.

38. What is a zombie process?


○ Answer: A zombie process is a process that has completed execution but still has
an entry in the process table, allowing the parent process to read its exit status.
39. What is the difference between segmentation fault and page fault?
○ Answer: A segmentation fault occurs when a process tries to access memory that
it is not allowed to, while a page fault occurs when a process accesses a page
that is not currently in memory, triggering a page-in operation.

40. What is the purpose of load balancing in operating systems?


○ Answer: Load balancing distributes workloads across multiple resources (like
CPUs, disks) to ensure optimal resource use, maximize throughput, and avoid
overloading any single resource.

You might also like