Research Article

Designing of Vague Logic Based 2-Layered Framework for CPU Scheduler

Pseudocode 1

Begin
  Initialize the variables
       = number of ready tasks
    = Static Time Quantum
  Do Loop
      Initialize the variables
         = Burst Time of task
          = Arrival Time of task
  Until (
  Initialize
  Do Loop
      sum = sum +
  Until (
  Calculate
     = sum/
  for ( to )
      
      
  endfor
  Calculate using true-membership and false-membership function
       = True_membership (, , )
       = False_membership (, , )
      
  Calculate
      
  Do Loop
      Schedule the task with CPU for time
      if a new task has arrived
          Recalculate the
      else
          continue with execution
      endif
  Until (
  Calculate waiting time , response time , turnaround time and normalized turnaround time .
  Avg_Calc( )
End