โ† All B.S.W.E. Bachelor of Software Engineering Flashcard Decks

Operating Systems & Systems Programming Flashcards

6 cards from real B.S.W.E. Bachelor of Software Engineering practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Operating Systems & Systems Programming flashcards as text
  1. What is the purpose of a semaphore in concurrent programming?

    Answer: To control access to a shared resource by multiple threads or processes

    A semaphore is a synchronization primitive that controls access to shared resources by maintaining a counter and using wait/signal operations.

  2. In C programming, what does the 'volatile' keyword indicate?

    Answer: The variable may be changed by external factors (e.g., hardware or another thread), preventing compiler optimization

    The volatile keyword tells the compiler not to optimize accesses to a variable because its value can change unexpectedly from outside the program's control flow.

  3. What is the role of the kernel in an operating system?

    Answer: It acts as the core component managing hardware resources and providing services to user programs

    The kernel is the core of an OS that manages hardware resources (CPU, memory, I/O), provides system calls, and mediates between software and hardware.

  4. Which memory region stores local variables and function call information?

    Answer: Stack

    The stack is used to store local variables, function parameters, and return addresses; it grows and shrinks automatically with function calls.

  5. What is a race condition in concurrent programming?

    Answer: A bug where program behavior depends on the relative timing or ordering of uncontrolled events

    A race condition occurs when two or more threads access shared data concurrently and the outcome depends on the non-deterministic order of their execution.

  6. What is the purpose of paging in memory management?

    Answer: To divide physical memory into fixed-size frames and logical memory into pages, enabling non-contiguous allocation

    Paging divides both physical and logical memory into fixed-size blocks (frames and pages), eliminating external fragmentation and enabling efficient memory use.