0% found this document useful (0 votes)
38 views11 pages

(Overview) Most Asked OS Questions by Neha and Nehal

Operating system

Uploaded by

smitamanephysics
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)
38 views11 pages

(Overview) Most Asked OS Questions by Neha and Nehal

Operating system

Uploaded by

smitamanephysics
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/ 11

Operating System

“Questions Other than what you already can answer”

1. Explain the main purpose of an operating system.

● Main purpose of an operating system: An operating system manages


computer hardware and software, allowing users to interact with the
computer.
● It provides a user-friendly interface, manages resources like memory and
CPU, and runs applications.

2. What is demand paging?

● Demand paging is a memory management technique where only the


required parts of a program are loaded into memory when needed.
● It helps save memory space and allows efficient use of resources.

3. What are the advantages of a multiprocessor system?

● Multiprocessor systems have multiple CPUs, which offer faster


processing, better performance, and increased multitasking capabilities.
● They can handle more tasks simultaneously, making them efficient for
complex tasks and high-demand applications.

4. What is a kernel?

● The kernel is the core component of an operating system that manages


the system's resources, memory, and hardware devices.
● It acts as an intermediary between applications and the hardware.

5. What are real-time systems?

● Real-time systems are designed to process data immediately without any


delay.
● They are used in time-critical applications like aerospace, medical
devices, and industrial control systems to ensure timely responses to
events.

6. What is virtual memory?

● It's a technique where the computer uses a portion of the hard drive as
extra memory when the physical RAM is full.
● It helps run more programs simultaneously and prevents running out of
memory.

7. Describe the objective of multiprogramming.

● The goal is to maximize CPU utilization by keeping multiple programs in


memory.
● When one program waits for I/O, the CPU switches to another program
to keep it running, reducing idle time.

8. What are time sharing systems?

● These allow multiple users to share a single computer simultaneously.


● Each user gets a small time slice to execute their tasks, making it appear
as if they have exclusive access to the system.

9. How are server systems classified?

● Servers can be classified based on their purpose, such as web servers,


file servers, email servers, etc.
● They can also be categorized as physical servers (dedicated hardware) or
virtual servers (running on virtualization platforms).

10. What is a thread?

● A thread is the smallest unit of execution in a program.


● Multiple threads in a process can perform tasks concurrently, improving
overall efficiency.
11. Give some benefits of multithreaded programming.

● It enables faster execution, better resource utilization, and


responsiveness in applications that can divide tasks into smaller threads
that run simultaneously.

12. Briefly explain FCFS (First-Come, First-Served) scheduling.

● It's a simple scheduling algorithm where processes are executed in the


order they arrive.
● The first process in the queue gets CPU time first, regardless of its
priority.

13. What is the round-robin scheduling algorithm?

● It allocates an equal time slice to each process in a cyclic manner,


allowing each process to get a fair share of the CPU time.
● If a process doesn't complete in its time slice, it's moved to the end of
the queue for the next round.

14. What necessary conditions can lead to a deadlock situation in a system?

● Mutual exclusion: Resources cannot be used by more than one process


at a time.
● Hold and wait: Processes hold resources while waiting for others.
● No preemption: Resources cannot be forcibly taken from processes.
● Circular wait: Processes form a circular chain, each waiting for the next's
resource.

15. What factors determine whether a detection algorithm must be utilized in


a deadlock avoidance system?

● Resource allocation graph: Detects cycles in the resource allocation


graph.
● Resource types: The number of resource types in the system.
16. Differentiate logical from physical address space.

● Logical: Address space seen by a process, independent of physical


memory.
● Physical: Actual memory addresses in RAM used by the operating
system.

17. How does dynamic loading aid in better memory space utilization?

● Programs load modules into memory only when needed, saving space.
● Helps in efficient memory utilization by loading essential parts on
demand.

18. What are overlays?

● Technique to handle large programs by dividing into smaller modules.


● Only the required modules are loaded into memory, reducing memory
usage.

19. What is the basic function of paging?

● Divides memory and processes into fixed-size pages.


● Enables efficient use of physical memory and simplifies memory
management.

20. What is fragmentation?

● Fragmentation occurs when memory is divided into small unused


spaces.
● External fragmentation is when free spaces are scattered, causing
inefficiency.

21. How does swapping result in better memory management?

● Swapping moves processes between main memory and secondary


storage.
● Frees up memory and allows efficient handling of multiple processes.
22. Give an example of a process state.

● New: Process is being created.


● Ready: Process is waiting to be executed.
● Running: Process is currently being executed by the CPU.

23. What is a socket?

● A communication endpoint that allows processes to send/receive data


over a network.
● Sockets enable network communication through a combination of IP
address and port number.

24. What is direct access method?

● Method to access data directly from any location on a storage device.


● Allows random access without reading sequentially from the beginning.

25. When does thrashing occur?

● When the system spends more time swapping pages than executing
processes.
● Caused by high demand for memory, leading to inefficiency and slow
performance.

26. What is the best page size when designing an operating system?

● The best page size depends on factors like the hardware architecture
and memory requirements.
● A larger page size reduces overhead but may lead to more internal
fragmentation, while smaller page size reduces internal fragmentation
but increases overhead.
27. When designing the file structure for an operating system, what attributes
are considered?

● File organization, like sequential or random access, impacts


performance.
● Security permissions to control user access and file integrity.

28. What is the root partition?

● The root partition is the main storage area in an OS where system files
and directories are stored.
● It is the starting point of the file hierarchy and holds critical components
for system operation.

29. What are device drivers?

● Device drivers are software components that enable the OS to


communicate with hardware devices.
● They allow the OS to control and manage devices like printers, graphics
cards, and input devices.

30. What are the primary functions of VFS (Virtual File System)?

● Abstracting different file systems into a unified interface for applications


to access files.
● Handling file operations like opening, closing, reading, and writing,
regardless of the underlying file system.

31. What are the different types of CPU registers in a typical operating system
design?

● General Purpose Registers: Store data temporarily during program


execution.
● Control Registers: Control the CPU's behavior and manage exceptions
and interrupts.
32. What is the purpose of I/O status information?

● I/O status information provides the current state of input/output


operations.
● It helps the OS coordinate and manage I/O tasks efficiently.

33. What is multitasking?

● Multitasking allows running multiple processes simultaneously on a


single CPU.
● The OS divides CPU time among processes, giving the illusion of parallel
execution.

34. What are some pros and cons of a command-line interface?

Pros:
● Faster and more efficient for experienced users.
● Allows scripting and automation.
Cons:
● Steeper learning curve for new users.
● Requires memorizing commands and syntax.

35. What is caching?

● Caching stores frequently accessed data in a fast-access memory to


reduce retrieval time.
● It improves system performance by reducing data access latency.

36. What is spooling?

● Spooling stands for Simultaneous Peripheral Operations Online.


● It manages print jobs by queuing them, allowing the computer to
continue other tasks without waiting for printing to complete.
37. What is an assembler?

● An assembler is a program that translates low-level assembly language


code into machine code, which the computer's CPU can understand and
execute.
● It helps in converting human-readable assembly instructions into binary
code for the computer to process.

38. What are interrupts?

● Interrupts are signals sent by hardware or software to the CPU to


request its attention for urgent tasks or events.
● They allow the CPU to temporarily suspend its current tasks and handle
the interrupt request, often to respond to hardware events or process
time-sensitive tasks.

39. What is GUI (Graphical User Interface)?

● GUI is a user interface that uses graphical elements such as icons,


windows, and menus to interact with a computer system.
● It provides a visually intuitive way for users to interact with applications
and perform tasks without needing to use complex command-line
instructions.

40. What is preemptive multitasking?

● Preemptive multitasking is a scheduling method where the operating


system can interrupt and switch between multiple running tasks or
processes based on their priority.
● It allows the OS to ensure that no single process monopolizes the CPU
for an extended time, improving overall system responsiveness.

41. Why is partitioning and formatting a prerequisite to installing an operating


system?

● Partitioning divides the hard drive into separate sections, allowing


multiple operating systems or data to coexist independently.
● Formatting prepares the partition for data storage and sets up the file
system structures, making the partition ready to host an operating
system and data.

42. What is piping?

● In the context of software, plumbing/piping refers to connecting


different programs or processes to work together by passing data
between them.
● It enables the seamless flow of data from one application to another,
often used in command-line environments.

43. What is NOS (Network Operating System)?

● NOS is an operating system specifically designed to manage and operate


network resources and services.
● It facilitates file sharing, printer sharing, and other network-related
tasks, allowing multiple computers to communicate and collaborate
efficiently.

44. Differentiate internal commands from external commands.

● Internal commands are built-in functionalities of the operating system,


and they can be executed directly from the command prompt.
● External commands are standalone executable programs that are stored
in separate files and need to be located in the system's PATH for
execution.

45. What is a folder in Ubuntu?

● In Ubuntu, a folder is a directory that can contain files, other folders, or


subdirectories.
● Folders help organize data and provide a hierarchical structure for users
to store and access their files easily.
46. Explain the meaning of the "export" command in Ubuntu.

● The "export" command in Ubuntu sets environment variables that are


accessible to the current shell and any child processes spawned from it.
● It allows variables to be passed between processes and used in various
applications or scripts.

47. What are turnaround time and response time?

● Turnaround time is the total time taken from the submission of a


process to its completion, including waiting and execution time.
● Response time is the time taken from the submission of a request or
task until the system starts providing the first output or response.

48. What are the typical elements of a process image?

● The typical elements of a process image include the program code,


process ID, program counter, registers, and process-specific memory
space.
● It also contains information about the process's state, such as the
current values of variables and the CPU's scheduling information.

49. What is the Translation Lookaside Buffer (TLB)?

● The Translation Lookaside Buffer (TLB) is a cache that stores recently


accessed virtual-to-physical memory address translations.
● It helps speed up the memory access process by reducing the need to
access the page table in virtual memory management.

50. When is a system in a safe state?

● A system is in a safe state if it can allocate resources to each process in


such a way that deadlock cannot occur.
● In this state, all processes can complete their tasks and release
resources without conflicting with the resource needs of other
processes.
51. What is cycle stealing?

● Cycle stealing is a technique used in computer systems to allow devices,


like I/O controllers, to access the CPU's memory or bus during idle CPU
cycles.
● It enables efficient data transfer between devices and memory without
significantly affecting the CPU's processing time.

52. What is the difference between a monolithic kernel and a microkernel?

● A monolithic kernel contains most of the operating system's services and


functionalities in a single large kernel space.
● A microkernel, on the other hand, keeps only essential functionalities in
the kernel space and moves other services to user space as separate
processes.

53. Explain the concept of virtual machines.

● Virtual machines are software-based emulations of physical computers


that run multiple operating systems simultaneously on a single physical
machine.
● They create isolated environments, allowing different OS instances to
coexist without interfering with one another, providing flexibility and
resource utilization.

Note : This questions are just for quick brushup, You can always do your own
research over this

All the best for your interviews !! Never fail to answer any operating system
question

Made By Neha and Nehal

You might also like