Operating System: Question Set – 25

Operating System: Question Set – 25

What is the difference between preemptive and non-preemptive memory management?

  • Preemptive: The OS can take memory resources from a process and reallocate them.
  • Non-Preemptive: Processes retain memory resources until they release them.

What is resident memory?

The part of a process’s memory that is presently loaded in RAM rather than swapped out to secondary storage is referred to as resident memory.

What are memory fences?

In multi-threaded systems, memory gates are barriers that guarantee memory access order and prevent problems like inconsistent or stale data reads.

How do multilevel feedback queues help in memory management?

By allocating resources according to process behavior and relevance, multilevel feedback queues ensure optimal memory consumption for processes with different priorities.

What is direct memory access (DMA)?

DMA frees up the CPU for other work by enabling devices to move data to and from memory directly.

How is shared memory managed?

Through inter-process communication (IPC), shared memory enables several processes to access the same memory space. Race circumstances are avoided by synchronizing access.

What is locality of reference?

The term “locality of reference” describes a program’s propensity to often use a comparatively small area of its address space during a brief period of time, allowing for improvements like caching.

What is kernel memory?

The area of RAM set aside for the operating system’s kernel and essential functions is known as kernel memory. Applications used by users cannot access it.

What is the significance of the page size?

The page size impacts:

  1. Internal Fragmentation: Larger pages increase fragmentation.
  2. Page Table Size: Smaller pages require larger page tables.

How does memory management differ in mobile operating systems?

  • Limited RAM: Emphasis on memory-efficient applications.
  • Power Efficiency: Memory access optimized to save battery life.
  • App Lifecycles: Aggressive memory reclamation for inactive apps.

What is a memory leak?

A memory leak occurs when a program allocates memory but fails to release it after use, leading to gradual depletion of available memory.

What is the role of compaction in dynamic memory allocation?

Compaction rearranges memory to eliminate gaps caused by freed blocks, enabling larger memory allocations and reducing fragmentation.

Leave a Reply

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