Fuzzy based CPU scheduler has become of great interest by operating system because of its ability to handle imprecise information associated with task. This paper introduces an extension to the fuzzy based round robin scheduler to a Vague Logic Based Round Robin (VBRR) scheduler. VBRR scheduler works on 2-layered framework. At the first layer, scheduler has a vague inference system which has the ability to handle the impreciseness of task using vague logic. At the second layer, Vague Logic Based Round Robin (VBRR) scheduling algorithm works to schedule the tasks. VBRR scheduler has the learning capability based on which scheduler adapts intelligently an optimum length for time quantum. An optimum time quantum reduces the overhead on scheduler by reducing the unnecessary context switches which lead to improve the overall performance of system. The work is simulated using MATLAB and compared with the conventional round robin scheduler and the other two fuzzy based approaches to CPU scheduler. Given simulation analysis and results prove the effectiveness and efficiency of VBRR scheduler.

Multitasking environment of a computer system defines the role of CPU scheduler. The scheduler uses a scheduling algorithm to decide when to schedule the task and for how long. The goal of system designer is to design the CPU scheduler in such a way that it gives users more effective and efficient throughput [

Traditional RR CPU scheduler is not able enough to know the exact attributes of task like burst time, length of time quantum, arrival time, and so forth which affect the performance of system. Recent research works handle the uncertainty of attributes using fuzzy logic [

VBRR scheduler functions are fourfold. First, it addresses the impreciseness and uncertainty using vague logic. Second, it dynamically provides an optimum length of time quantum. Third, it reduces the unnecessary context switches which further reduce the scheduler overhead. Fourth, and the last, it improves the overall performance of system in terms of average response time, average waiting time, average turnaround time, and average normalized turnaround time.

VBRR scheduler works on 2-layered framework. First layer is of vague inference system which itself contains four units: Vague Logic Unit, Grade Function Unit, Data Base Unit, and

The rest of paper is organized as follows. Section

Round robin (RR) scheduling is specially designed for multitasking systems where users get an impression that multiple tasks are simultaneously running. It is the simplest, fairest, and most widely used scheduling algorithm by CPU scheduler [

Round robin scheduling.

RR scheduling algorithm improves the response time of tasks as compared to other scheduling algorithms. Racu et al. have analyzed the RR scheduling algorithm with respect to response time in 2007. They have derived a best case response time algorithm from the worst case response time algorithm [

RR scheduling algorithm provides an effective response time but with increased waiting time and turnaround time due to the fixed size time quantum. In 2008, Park et al. gave an approach of quantum based fixed priority scheduling [

Number of context switches depends on the size of time quantum used. The smaller size quantum increases the context switches which will degrade the performance of system [

Thus, the system designer has an option to decide the size of time quantum by making it not too long and not too short. For example, consider a process whose CPU burst time is 6.2 ms and the fixed time quantum is 2 ms. After execution of 3 cycles, this task will be preempted and assigned to the ready queue. Task needs 0.2 ms more and if before preemption 0.2 ms is given to the process, it will complete its execution. Consequently, its waiting time may be reduced and a chance for another process to be in the queue [

Fuzzy logic uses a concept of single membership value which cannot consider both the evidences of user: evidence in favor and evidence in against. Vague logic effectively handles the impreciseness using both the evidences which fuzzy logic cannot handle [

A number of mathematicians and researchers have been providing a solution to deal with vagueness and impreciseness of knowledge. Professor Zadeh [

A fuzzy set

Fuzzy membership function.

A vague set

Vague membership functions.

The grade of membership of

Let

VBRR CPU scheduler works with 2-layered framework as shown in Figure

2-layered framework for VBRR scheduler.

Next sections describe both the layers in detail.

Our VIS contains four units as shown in Figure

Vague Logic Unit.

Grade Function Unit.

Data Base Unit.

Vague inference system for optimum time quantum.

VLU takes the input burst time (

Axiom 1:

Axiom 2:

Axiom 3:

Axiom 4:

GFU evaluates the degree of accuracy of vague value. The Grade Function is applied to the membership values

Axiom 5:

Grade value.

It stores all the related information about the tasks like burst time, arrival time, number of currently active tasks, maximum and minimum value of burst time, average burst time, and so forth. All other units extract the current required information from the database.

In our proposed VBRR scheduling algorithm, the tasks are sorted according to their burst time, so that task with shortest burst time will be removed earlier from the ready queue. Optimum time quantum is calculated from the VIS defined in previous section and is used by all active tasks until the complete execution of them. The author discusses the algorithm in Algorithm

Begin

Initialize the variables

sum = sum +

Schedule the task with CPU for

if a new task has arrived

Recalculate the

else

continue with execution

endif

End

True_membership (

return (

endfunction

False_membership (

endfunction

Avg_Calc ( )

Calculate average waiting time (AWT)

Calculate average response time (ART)

Calculate average turnaround time (ATT)

Calculate average normalized turnaround time (ANT)

endfunction

The author has analyzed the performance of proposed work with the RR, FBRR, and BFRR scheduling algorithms. For each comparison, selected sets of tasks were considered and for each case the performance metrics are computed. Results prove that VBRR has better performance as compared to other three algorithms. She presents a Sample Task Set to show the detailed performance analyses of all scheduling algorithms with the help of Gantt chart.

Assume a set of five tasks with burst time (

Assume the static time quantum

(a) Gantt chart using RR approach. (b) Gantt chart using FBRR scheduling algorithm. (c) Gantt chart using BFRR scheduling algorithm.

Similarly, the size of time quantum for the Sample Task Set after applying the FBRR scheduling approach is

After applying BFRR scheduling algorithm, the size of time quantum for the Sample Task Set is

VBRR algorithm firstly initializes the following variables:

Vaguification to degree of accuracy (Sample Task Set).

Gantt chart using VBRR scheduling algorithm.

To evaluate the performance of VBRR scheduler, the author has chosen all the major performance metrics as discussed below.

Waiting time is the total time a task waits in ready queue for its turn of execution. Let us consider the time, when task has arrived in the system as arrival time and when task has got the CPU as start time. Waiting time can be calculated as

Response time is the first start time of task from its arrival to the system. It represents the time when first time task has got the CPU. It is calculated as

Turnaround time is the total life time of a task which means the total time a task takes to finish its execution. It can be calculated as

Average turnaround time is calculated as the turnaround time of all the active tasks in ready queue using (

Normalized turnaround time represents the relative delay of a task. It is simply a ratio of turnaround time to burst time. It is calculated as

Context switch is a mechanism that is followed by the CPU to switch from one task to another task in a multitasking system. It saves and loads the computer registers. It allows multiple tasks to run; basically it shares a CPU among multiple tasks. Context switching is computationally intensive and does not perform any useful task, so the focus of designers is to optimize the number of context switches.

From the Gantt charts shown in Figures

All the graphs for Sample Task Set shown in Figure

(a) Waiting time (Sample Task Set). (b) Turnaround time (Sample Task Set). (c) Response time (Sample Task Set). (d) Normalized turnaround time (Sample Task Set). (e) Context switches (Sample Task Set). (f) Overall performance (Sample Task Set).

This paper considers multiple task sets to better evaluate the performance of VBRR scheduler over other three approaches. In this work, the author is illustrating the performance with the help of results of 15 task sets.

Figures

Average waiting time.

Average response time.

Average turnaround time.

Average normalized turnaround time.

Number of context switches.

VBRR scheduler improves the performance of CPU scheduler mainly by three reasons. Firstly, it deals with the associated impreciseness and uncertainity with task. Secondly, it provides a dynamic environment of execution for tasks by assigning a dynamic time quantum. Thirdly, it improves the performance of system by reducing the average waiting time, average turnaround time, average normalized turn aroound time, and number of context switches.

As discussed above, round robin scheduling algorithm improves the response time of the tasks, but with increased waiting time and turnaround time. Moreover, the size of time quantum plays the key role in the performance of RR algorithm. Smaller size can increase the number of context switches that makes the performance of scheduler even worse. There must be a technique inside CPU scheduler, which allows it to dynamically calculate the size of time quantum rather than a fixed size time quantum. This work provides a solution to all the above issues with RR scheduling. The author has introduced a Vague Logic Based Round Robin CPU scheduler. At first layer of VBRR, a vague inference system is designed which dealt with the imprecise parameters of task like burst time, static time quantum by considering the current state of active tasks. Based on the current situation, this vague inference system finally generated an optimum value for time quantum which makes the scheduler work in a dynamic environment. At the second layer, a Vague Logic Based Round Robin scheduling algorithm is introduced to schedule the tasks. The author has evaluated the performance of VBRR algorithm over multiple task sets and compared the performance with RR, BFRR, and FBRR scheduling algorithms. Simulation results illustrate that the VBRR scheduler improves the performance in terms of average waiting time, average turnaround time, and average normalized turnaround time by maintaining the average response time. It consequently improves the performance of the system by reducing the number of context switches.

The author declares that she has no competing interests.