Operating System: Question Set – 13

Operating System: Question Set – 13

What is the role of signals in IPC?

Signals, like SIGINT for interrupt or SIGKILL for termination, are asynchronous notifications that are sent to a process to notify it of an occurrence.

What are the advantages of process priority?

By ensuring that key processes receive more CPU time, process priority enhances system performance and responsiveness for high-priority tasks.

What are real-time scheduling algorithms?

Real-time scheduling algorithms are used in systems where tasks must be completed within strict time constraints. Examples include:

  • Rate Monotonic Scheduling (RMS)
  • Earliest Deadline First (EDF)

What is the role of load balancing in multiprocessor systems?

In order to optimize resource utilization and reduce process wait time, load balancing divides processes equally among several processors.

What is the difference between strong and weak semaphore?

  • Strong Semaphore: Processes are served in a strict FIFO order.
  • Weak Semaphore: The order in which processes are served is not guaranteed.

What happens when a process tries to access invalid memory?

The OS raises a segmentation fault, terminating the process unless handled by the process itself.

What is a thread pool?

To cut down on the overhead of thread creation and deletion, a thread pool is a group of pre-initialized threads that can be utilized again to complete operations

What is the difference between asynchronous and synchronous signals?

  • Asynchronous Signals: Generated externally, such as hardware interrupts.
  • Synchronous Signals: Generated by the process itself, such as divide-by-zero errors.

What is process starvation, and how can it be avoided?

When higher-priority operations cause a low-priority process to be continuously delayed, this is known as starvation. Aging, which gradually raises the priority of long-waiting processes, can help prevent it.

What is the role of nice and renice in Unix-like systems?

  • nice: Sets the priority of a process at the time of creation.
  • renice: Changes the priority of an already running process.

What is process synchronization?

In order to avoid inconsistencies and race situations, process synchronization makes sure that several processes or threads operate in unison while gaining access to common resources.

Why is synchronization necessary?

Synchronization is essential to avoid:

  • Data inconsistency.
  • Race conditions.
  • Deadlock.
  • Starvation.

What is a critical section?

A critical section is a part of a program where shared resources are accessed. Only one process can execute in its critical section at a time to avoid conflicts.

What are the requirements of a solution to the critical section problem?

  • Mutual Exclusion: Only one process can be in the critical section at a time.
  • Progress: If no process is in the critical section, other processes should decide who enters next without indefinite delays.
  • Bounded Waiting: A process must not wait indefinitely to enter its critical section.

Leave a Reply

Your email address will not be published. Required fields are marked *