Order PDF of any content from our website with a little minor Fee to donate for hard work. Online MCQs are fully free but PDF books are paid. For details: contact whatsapp +923028700085 Important notes based PDF Books are available in very little price, starting from 500/-PKR; Order Now: contact whatsapp +923028700085

Past Papers CS101 โ€“ VU Computer Science Process Schedulers in Operating System Shorts Answers

Process Schedulers in Operating System

Q#1: How do the scheduler and dispatcher work together within the operating system’s kernel to manage processes?
Answer:

  • The scheduler maintains a record of processes, adds new processes to the process pool, and removes completed processes.
  • It also maintains a process table in memory.
  • The dispatcher oversees execution of scheduled processes, using time slices and interrupts to switch between them.
  • Together, they ensure processes are executed efficiently and fairly.

Q#2: What is the role of the process table, and what information does it contain?
Answer:

  • The process table is maintained by the scheduler in main memory.
  • Contains information about each process:
    • Memory area assigned to the process
    • Priority
    • Whether the process is ready or waiting for an external event
  • Allows the OS to manage processes systematically.

Q#3: How is the concept of mutual exclusion related to the use of semaphores in operating systems?
Answer:

  • Mutual exclusion ensures only one process executes a critical region at a time.
  • Semaphores are used to enforce mutual exclusion.
  • A process must check and set a semaphore before entering a critical region, preventing concurrent access.

Q#4: What are the three conditions that must be satisfied for a deadlock to occur in resource allocation, and how can these conditions be addressed?
Answer:

  • Three conditions for deadlock:
    1. Competition for non-sharable resources
    2. Partial resource requests
    3. Inability to forcibly retrieve allocated resources
  • Deadlock handling methods:
    • Detection and correction: e.g., killing processes
    • Avoidance schemes: e.g., requiring all resources requested at once or converting non-sharable resources into sharable resources
Contents Copyrights Reserved By T4Tutorials