Basic CS-Operating System [TCS Placement]: Sample Questions 25 - 26 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 25

Operating System

Write in Short

Short Answer▾

What is busy waiting?


  • The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting.
  • The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.
  • A process that wants to enter a critical section, checks first to see if the entry is allowed and if it is not the process waits in a tight loop.
  • Continuously testing a variable waiting for some value to appear is denoted as
Given the Image is Define the Busy Waiting

Question 26

Operating System

Describe in Detail


What is an idle thread?


  • In Windows NT operating systems, the System Idle Process contains one or more kernel threads which run when no other runnable thread can be scheduled on a CPU.
  • For example, there may be no runnable thread in the system, or all Runnable threads are already running on a different CPU.
  • In a multiprocessor system, there is one idle thread associated with each CPU.
  • The primary purpose of the idle process and its threads is to eliminate what would otherwise be a special case in the scheduler.
  • Without the idle threads, there could be cases when no threads were runnable, or “Ready” in terms of Windows scheduling states. Since the idle threads are always in a Ready state (if not already Running) , this can never happen.
  • Thus whenever the scheduler is called due to the current thread leaving the CPU, it can always find another thread to run on that CPU, even if it is only the CPU՚s idle thread.
Given the Image is Define the Idle Thread Execution

Developed by: