A new intuitionistic fuzzy rulebased decisionmaking system for an operating system process scheduler
 Muhammad Arif Butt^{1} and
 Muhammad Akram^{2}Email author
Received: 8 June 2016
Accepted: 5 September 2016
Published: 13 September 2016
Abstract
We present a new intuitionistic fuzzy rulebased decisionmaking system based on intuitionistic fuzzy sets for a process scheduler of a batch operating system. Our proposed intuitionistic fuzzy scheduling algorithm, inputs the nice value and burst time of all available processes in the ready queue, intuitionistically fuzzify the input values, triggers appropriate rules of our intuitionistic fuzzy inference engine and finally calculates the dynamic priority (dp) of all the processes in the ready queue. Once the dp of every process is calculated the ready queue is sorted in decreasing order of dp of every process. The process with maximum dp value is sent to the central processing unit for execution. Finally, we show complete working of our algorithm on two different data sets and give comparisons with some standard nonpreemptive process schedulers.
Keywords
Background
To tame the wild hardware inside every computer system we need a specialized software called operating system (OS). As the name suggests an operating system is used to operate the hardware and provides services to different application programs. While doing so the main task of an OS is providing an interface that is easy to use and at the same time makes the best utilization of the underlying hardware. In todays world of computing there are multiple processes/threads executing concurrently and requesting for different services from the OS. The operating system has to deal efficiently with these finite resources and competing demands. To achieve this goal the operating system has to allocate and deallocate the hardware resources among various processes in an orderly, fair, and secure manner. Some of these hardware resources are space multiplexed and some are time multiplexed among the processes (Butt and Akram 2015). For example memory is one of the important resources that is space multiplexed among the processes. Every process along with its code, data and various control structures need to reside inside the main memory to execute properly. Memory management unit, normally called the MMU is the component of the operating system kernel which implements different space management algorithms to efficiently utilize the main memory. Similarly another important hardware resource that is time multiplexed among the processes residing in memory is the central processing unit (CPU). The responsibility of efficiently utilizing this important hardware resource and time multiplexing it among various processes lies on a kernel component called CPU scheduler. The CPU scheduler also called the process scheduler gets activated on every process switch. Once activated, the CPU scheduler selects a process from ready queue based on multiple attributes and also decides the duration for which this process will execute on the central processing unit.

$ nice val command [args]

$ renice val pid
By increasing the nice value (Butt and Akram 2015) of a process the overall priority of a process decreases and vice versa. When a system tries to run too many high priority jobs at the same time, computer response time deteriorates. The UNIX renice(1) command is used to adjust scheduling priorities to avoid this problem. Scheduler in Linux kernel 2.6 onwards, is the piece of kernel code that inputs a list of runnable threads and decides which thread will be executed by the CPU next based on per process parameters like, scheduling policy, nice value, dynamic priority and CPU affinity (Kerrisk 2010).
Shortest job first (SJF), firstcomefirstserved (FCFS) are nonpreemptive, while Roundrobin (RR), shortest remaining time first (SRTF), and multilevel feed back queue are some of the preemptive versions of CPU scheudling algorithms (Galvin et al. 2013). CPU scheduling is a multipleobject decision making process with multiple factors like response, waiting and turnaround times, CPU utilization, and throughput (Butt and Akram 2015; Lin et al. 2007; Xu and Cai 2012).
Real world problems are often complex where information obtained are not always complete. In many decision making scenarios we have more than two options available and many a times complete information about those options are not available. These cases cannot be modeled using simple set theory and Boolean Logic. To handle such situations we cnormally use fuzzy set theory (Zadeh 1965) and fuzzy logic (Zadeh 1975). In spite of its vast applications, fuzzy sets suffer with the limitation of uncertainity element due to nonavailability of complete information. Among extensions of fuzzy sets, Atanassovs intuitionistic fuzzy sets (IFSs; Atanassov 1986) provide an intuitive framework to deal vagueness from imprecise information by taking into account nonmembership values in addition to membership values. More recently, fuzzy logic and its derivatives like Intuitionistic fuzzy logic have find its place in the areas of expert systems, robotics, computer networks, social sciences, management sciences, life sciences, and image processing. Early work in fuzzy decision making was motivated by the desire to mimic the control actions of an experienced human operator and to obtain smooth interpolation between discrete outputs that would normally be obtained (Atanassov 2015; Akram et al. 2014a, b; Ashraf et al. 2014a). A fuzzy controller is normally comprised of a fuzzification module, a rule base, an inference engine and a defuzzification system. Several fuzzy controller have been developed using fuzzy logic and fuzzy set theory (Liu et al. 2013; Shen et al. 2013; Boldbaatar and Lin 2015).
Applying different fuzzy models for decisionmaking problems inside an operating system is a hot area of research these days. CPU scheduler is one of the important kernel component that is responsible for selection of a process, the time quantum the selected process should execute on CPU and last but not the least, how frequently the OS should invoke the scheduler. Varshney and Akhtar (2012) gave the idea of achieving an ideal CPU time slice using fuzzy logic. The achieved time slice value is neither too large making it behave like FCFS nor too small and increasing the context switch overhead manifold. For multiprocessor systems, a fuzzy CPU scheduling system has been proposed by Hamzeh et al. (2007). Lim and Cho (2007) after differentiating bach, interactive and realtime processes have also proposed an intelligent fuzzy CPU scheduling system. They have used the CPU ticks a process executes and the sequence of system calls a process makes to differentiate between the three flavors of processes. A lot of research has been carried out in designing of fuzzy decisionmaking systems which takes input parameters like processes’s response ratio, priority values, waiting and remaining burst time. The fuzzification of these input parameters and designing of inference engines that mimic behavior of human experts, their results have shown improved average waiting and turn around times (Ajmani and Sethi 2013; Alam et al. 2011; Behera et al. 2012).
The authors already proposed a novel fuzzy decisionmaking system for a multitasking CPU scheduler (Butt and Akram 2015) and have compared their improved results with Behra’s IFCS (Behera et al. 2012) and Ajmain’s PFCS (Ajmani and Sethi 2013). This is an extension of the same algorithm but using intuitionistic fuzzification techniques for a batch operating system. By applying intuitionistic fuzzy (IF) logic in the decisionmaking process for the selection of next runnable thread, we have incoorporated the features of shortest job first as well as priority based CPU scheduler. The nice value and the burst time are the two per process parameters, which are fuzzified intuitionistically. These intuitionistically fuzzified input parameters are given to the IF inference engine composed of nine rules. The IF inference engine fire the rules in the rule base and computes dynamic priority (dp). This dynamic priority (dp) is then defuzzified using TSK formula (Leekwijck and Kerre 1999). This procedure is repeated for every process in the runqueue and later the queue is sorted by the priority attribute of each process in decreasing order. When the scheduling decision is to be made, process at the head of the runqueue is selected for execution on the CPU.
Our paper has following sections. Main components of our proposed system and its algorithm are discussed in “Basic structure and algorithm” section. The intuitionistic fuzzifier, rule base and defuzzification techniques are discussed in “Components of IFS” section. The results generated using our proposed system are shown, discussed and compared in “Results and discussion” section. Finally we have concluded and given future research directions. We have used standard definitions and terminologies in this paper. For other notations, terminologies and applications not mentioned in the paper, the readers are referred to Akram et al. (2013), Ashraf et al. (2014b), Hsu (2015), Parvathi et al. (2013) and Xu and Liao (2015).
Basic structure and algorithm
Algorithm
 1.
Begin
 2.
IFIS := Create intuitionistic fuzzy inference system
 3.
Define linguistic values of input variables; nice value and burst time
 4.
Define linguistic values of output variable dynamic priority (dp)
 5.
Initialize Process Control Block of each process
 6.
nice_value := Read nice value from PCB of process
 7.
burst_time := Read burst time value from PCB of process
 8.
[Low Medium High] := Find degree of MF for nice_value
 9.
[NLow NMedium NHigh] := Find degree of NMF for nice_value
 10.
[Low Medium High] := Find degree of MF for burst_time
 11.
[NLow NMedium NHigh] := Find degree of NMF for burst_time
 12.
Trigger appropriate rules in the intuitionistic fuzzy (IF) rule base to get degree of truth for dynamic priority of process
 13.
Apply defuzzification formulas to get crisp value of dynamic priority
 14.
On arrival of every new process go to step step 6
 15.
Sort the queue of processes
 16.
Do the selection from head of runqueue
 17.
On termination of an executing process, go to step 16
 18.
End
Components of IFS
Our proposed IFIS uses the MamdaniLarsen inference method (Mamdani 1974). The three major components are the intuitionistic fuzzifier, intuitionistic fuzzy inference engine (IFIE) and the defuzzifier.
Intuitionistic fuzzifier
Fuzzy inference engine
 R1:
if \(\langle b\_time \; is \; low \rangle\) and \(\langle nice \; is \; low \rangle\) then \(\langle dp \; is \; veryhi \rangle\)
 R2:
if \(\langle b\_time \; is \; low \rangle\) and \(\langle nice \; is \; medium \rangle\) then \(\langle dp \; is \; hi \rangle\)
 R3:
if \(\langle b\_time \; is \; low \rangle\) and \(\langle nice \; is \; hi \rangle\) then \(\langle dp \; is \; hi \rangle\)
 R4:
if \(\langle b\_time \; is \; medium \rangle\) and \(\langle nice \; is \; low \rangle\) then \(\langle dp \; is \; avg \rangle\)
 R5:
if \(\langle b\_time \; is \; medium \rangle\) and \(\langle nice \; is \; medium \rangle\) then \(\langle dp \; is \; avg \rangle\)
 R6:
if \(\langle b\_time \; is \; medium \rangle\) and \(\langle nice \; is \; hi \rangle\) then \(\langle dp \; is \; low \rangle\)
 R7:
if \(\langle b\_time \; is \; hi \rangle\) and \(\langle nice \; is \; low \rangle\) then \(\langle dp \; is \; low \rangle\)
 R8:
if \(\langle b\_time \; is \; hi \rangle\) and \(\langle nice \; is \; medium \rangle\) then \(\langle dp \; is \; verylow \rangle\)
 R9:
if \(\langle b\_time \; is \; hi \rangle\) and \(\langle nice \; is \; hi \rangle\) then \(\langle dp \; is \; verylow \rangle\)
Defuzzifier
Results and discussion
To generate the results we have used Process Scheduling Simulation, Analyzer and Visualization (PSSAV) tool for simulation of shortest job first (SJF) and nonpreemptive priority based algorithm. PSSAV is publically available under code license GNU GPL v2. To generate the results of our own algorithm, a simulation is written using Matlab R2014a(8.3.0.532). The working to generate the results for our intuitionistic fuzzy decisionmaking system (IFDMS) for nonpreemptive CPU scheduling algorithm is shown below. We have generated and compared the results using two different case studies.
The results of our two case studies are shown in Tables 7 and 8. The results of our intuitionitic fuzzy process scheduler are almost the same as the best known nonpreemptive scheduling algorithm, i.e., shortest job first (SJF). The added advantange of using our algorithm is that we can further increase/decrease the priority of a process by decreasing/increasing its nice value respectively. The same cannot be done using SJF algorithm. So our proposed algorithm not only combines the plus points of conventional shortest job first (SJF) and priority based algorithm, but further gives reduced waiting times by adding the intuitionistic fuzzy modeling technique.
Data set 1
Data set1
PID  BT  NV 

P1  3  2 
P2  6  7 
P3  4  5 
P4  5  6 
P5  2  1 
Table 1 shows that there are five processes with different burst times and nice values. We need to compute the dynamic priority of all the five processes. The detailed working for computing the dynamic priority of these processes is shown below.
Calculating dynamic priority of process P1
P1: Defuzzification of very high dp using TS formula (data set 1)
x  \(\mu _x\)  \(\nu _x\)  \(\pi _x\)  \(X=(1\pi _x)\mu _x\)  \(Y=\pi _x\mu _x\)  \(X+Y\)  \(x*(X+Y)\) 

22  0  0.3  0.7  0  0  0  0 
23  0  0.3  0.7  0  0  0  0 
24  0.2  0.3  0.5  0.1  0.1  0.2  4.8 
25  0.4  0.3  0.3  0.28  0.12  0.4  10 
26  0.6  0.3  0.1  0.54  0.06  0.6  15.6 
27  0.625  0.166  0.208  0.495  0.130  0.625  16.87 
28  0.625  0  0.375  0.391  0.234  0.625  17.5 
2.45  64.775 
Calculating dynamic priority of process P2
P2: Defuzzification of very high dp using TS formula (data set 1)
x  \(\mu _x\)  \(\nu _x\)  \(\pi _x\)  \(X=(1\pi _x)\mu _x\)  \(Y=\pi _x\mu _x\)  \(X+Y\)  \(x*(X+Y)\) 

22  0  0.6  0.4  0  0  0  0 
23  0  0.6  0.4  0  0  0  0 
24  0.2  0.6  0.2  0.16  0.04  0.2  4.8 
25  0.25  0.5  0.25  0.187  0.0625  0.25  6.25 
26  0.25  0.333  0.416  0.415  0.104  0.25  6.5 
27  0.25  0.166  0.583  0.104  0.146  0.25  6.75 
28  0.25  0  0.75  0.062  0.187  0.25  7 
1.2  31.3 
P2: Defuzzification of high dp using TS formula (data set 1)
x  \(\mu _x\)  \(\nu _x\)  \(\pi _x\)  \(X=(1\pi _x)\mu _x\)  \(Y=\pi _x\mu _x\)  \(X+Y\)  \(x*(X+Y)\) 

22  0  0.6  0.4  0  0  0  0 
23  0  0.6  0.4  0  0  0  0 
24  0.2  0.6  0.2  0.16  0.04  0.2  4.8 
25  0.25  0.5  0.25  0.187  0.0625  0.25  6.25 
26  0.25  0.333  0.416  0.415  0.104  0.25  6.5 
27  0.25  0.166  0.583  0.104  0.146  0.25  6.75 
28  0.25  0  0.75  0.062  0.187  0.25  7 
1.2  31.3 
P2: Defuzzification of average dp using TS formula (data set 1)
x  \(\mu _x\)  \(\nu _x\)  \(\pi _x\)  \(X=(1\pi _x)\mu _x\)  \(Y=\pi _x\mu _x\)  \(X+Y\)  \(x*(X+Y)\) 

22  0  0.6  0.4  0  0  0  0 
23  0  0.6  0.4  0  0  0  0 
24  0.2  0.6  0.2  0.16  0.04  0.2  4.8 
25  0.25  0.5  0.25  0.187  0.0625  0.25  6.25 
26  0.25  0.333  0.416  0.415  0.104  0.25  6.5 
27  0.25  0.166  0.583  0.104  0.146  0.25  6.75 
28  0.25  0  0.75  0.062  0.187  0.25  7 
1.2  31.3 
P2: Defuzzification of average dp using TS formula (data set 1)
x  \(\mu _x\)  \(\nu _x\)  \(\pi _x\)  \(X=(1\pi _x)\mu _x\)  \(Y=\pi _x\mu _x\)  \(X+Y\)  \(x*(X+Y)\) 

22  0  0.6  0.4  0  0  0  0 
23  0  0.6  0.4  0  0  0  0 
24  0.2  0.6  0.2  0.16  0.04  0.2  4.8 
25  0.25  0.5  0.25  0.187  0.0625  0.25  6.25 
26  0.25  0.333  0.416  0.415  0.104  0.25  6.5 
27  0.25  0.166  0.583  0.104  0.146  0.25  6.75 
28  0.25  0  0.75  0.062  0.187  0.25  7 
1.2  31.3 
The final dynamic priority value for process P2 is obtained by averaging out all the four dynamic priorities computed above, i.e., \(\frac{26.08 + 20.5 + 14 + 14}{4} = 18.65\).
The same procedure is followed for computing the dynamic priorities for the rest of the processes in the data set. Finally, the dynamic priority for processes P1, P2, P3, P4 and P5 comes out to be 26.44, 18.65, 26.33, 26.2, and 26.53 respectively.
Comparison
Results: data set1
Algorithm  Average waiting time 

Shortest job first  6 
Priority based  6 
IF scheduler  6 
Sensitivity analysis
Data set 2
Data set2
PID  BT  NV 

P1  20  5 
P2  4  31 
P3  18  7 
P4  6  25 
Table 8 shows that there are four processes with different burst times and nice values. We need to compute the dynamic priority of all the four processes. The detailed working for computing the dynamic priority of these processes is not shown as the same is shown in the previous case study. The same procedure is followed for computing the dynamic priorities of processes in data set 2. Finally, the dynamic priority for processes P1, P2, P3, and P4 comes out to be 10.5, 20.9, 14, and 17.5 respectively.
Comparison
Results: data set2
Algorithm  Average waiting time 

Shortest job first  10.5 
Priority based  25.5 
IF scheduler  10.5 
Conclusion and future work
We have extended our previous algorithm, fuzzy decision making system for CPU scheduler of a multitasking OS (Butt and Akram 2015), to intuitionistic fuzzy (IF) modeling techniques. Our proposed algorithm has shown results that are comparable to the bestknown nonpreemptive scheduler, i.e., shortest job first (SJF). We have presented a novel decisionmaking system based on intuitionistic fuzzy sets for CPU scheduling algorithm of a batch operating system. The main limitation of this algorithm is its complexity which is not a major concern in case of a batch operating system. The same can be extended for multitasking operating systems where complexity of scheduling algorithm is not a concern. Improving the selection criteria of a CPU scheduling algorithm is a hot area of research. Our proposed algorithm can give even better results if it can identify between batch and interactive processes, and intelligently increase/decrease the niceness of batch/interactive processes respectively. To identify between a batch and interactive process, one can compute and keep record of the average sleep time spent by every process in its lifetime. This will improve the overall interactiveness of a computer system to manifold.
Declarations
Authors' contributions
The authors have presented a new intuitionistic fuzzy rulebased decisionmaking system for a process scheduler of a batch operating system. Both authors read and approved the final manuscript.
Competing interests
The authors declare that they have no competing interests.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Authors’ Affiliations
References
 Ajmani P, Sethi M (2013) Proposed fuzzy CPU scheduling algorithm (PFCS) for real time operating systems. Int J Inf Technol 2231–2307(5):583–588Google Scholar
 Akram M, Shahzad S, Butt A, Khaliq A (2013) Intuitionistic fuzzy logic control for heater fans. Math Comput Sci 7(3):367–378 View ArticleMATHGoogle Scholar
 Akram M, Habib S, Javed I (2014a) Intuitionistic fuzzy logic control for washing machines. Indian J Sci Technol 7(5):654–661Google Scholar
 Akram M, Ashraf A, Sarwar M (2014b) Novel applications of intuitionistic fuzzy digraphs in decision support systems. Sci World J 2014:904606. doi:10.1155/2014/904606 Google Scholar
 Alam B, Doja M, Biswas R, Alam M (2011) Fuzzy priority CPU scheduling algorithm. IJCSI 8(6):386–390Google Scholar
 Ashraf A, Akram M, Sarwar M (2014a) Fuzzy decision support system for fertilizer. Neural Comput Appl 25(6):1495–1505View ArticleGoogle Scholar
 Ashraf A, Akram M, Sarwar M (2014b) TypeII fuzzy decision support system for fertilizer. Sci World J 2014:695815. doi:10.1155/2014/695815 View ArticleGoogle Scholar
 Atanassov KT (1986) Intuitionistic fuzzy sets. Fuzzy Sets Syst 20(1):87–96MathSciNetView ArticleMATHGoogle Scholar
 Atanassov K (2015) Intuitionistic fuzzy logics as tools for evaluation of data mining processes. KnowlBased Syst 80:122–130View ArticleGoogle Scholar
 Behera H, Pattanayak R, Mallick P (2012) An improved fuzzybased CPU scheduling (IFCS) algorithm for real time systems. Int J Soft Comput Eng 2:2231–2307Google Scholar
 Boldbaatar EA, Lin CM (2015) Selflearning fuzzy slidingmode control for a water bath temperature control system. Int J Fuzzy Syst 17(1):31–38View ArticleGoogle Scholar
 Butt MA, Akram M (2015) A novel fuzzy decisionmaking system for CPU scheduling algorithm. Neural Comput Appl 27(7):1927–1939View ArticleGoogle Scholar
 Galvin PB, Gagne G, Silberschatz A (2013) Operating system concepts. Wiley, New YorkMATHGoogle Scholar
 Hamzeh M, Fakhraie SM, Lucas C (2007) Soft realtime fuzzy task scheduling for multiprocessor systems. Int J Intell Technol 2(4):211–216Google Scholar
 Hsu W (2015) A fuzzy multiplecriteria decisionmaking system for analyzing gaps of service quality. Int J Fuzzy Syst 17(2):256–267View ArticleGoogle Scholar
 Kerrisk M (2010) The Linux programming interface. No Starch Press, San FranciscoGoogle Scholar
 Lim S, Cho SB (2007) Intelligent os process scheduling using fuzzy inference with user models. In: Okuno HG, Ali M (eds) New trends in applied artificial intelligence. Lecture notes in computer science, vol 4570. Springer, Berlin, pp 725–734Google Scholar
 Lin L, Yuan XH, Xia ZQ (2007) Multicriteria fuzzy decisionmaking methods based on intuitionistic fuzzy sets. J Comput Syst Sci 73(1):84–88MathSciNetView ArticleMATHGoogle Scholar
 Liu YJ, Tong S, Chen CP (2013) Adaptive fuzzy control via observer design for uncertain nonlinear systems with unmodeled dynamics. IEEE Trans Fuzzy Syst 21(2):275–288View ArticleGoogle Scholar
 Mamdani EH (1974) Application of fuzzy algorithms for control of simple dynamic plant. Proc Inst Electr Eng 121(12):1585–1588View ArticleGoogle Scholar
 Parvathi R, Malathi C, Akram M, Atanassov KT (2013) Intuitionistic fuzzy linear regression analysis. Fuzzy Optim Decis Mak 12(2):215–229MathSciNetView ArticleGoogle Scholar
 Rezaei J, Ortt R (2013) Supplier segmentation using fuzzy logic. Ind Mark Manag 42(4):507–517View ArticleMATHGoogle Scholar
 Shen Q, Jiang B, Cocquempot V (2013) Fuzzy logic systembased adaptive faulttolerant control for nearspace vehicle attitude dynamics with actuator faults. IEEE Trans Fuzzy Syst 21(2):289–300View ArticleGoogle Scholar
 Van Leekwijck W, Kerre EE (1999) Defuzzification: criteria and classification. Fuzzy Sets Syst 108(2):159–178MathSciNetView ArticleMATHGoogle Scholar
 Varshney S, Akhtar N (2012) Efficient CPU scheduling algorithm using fuzzy logic. In: International conference on computer technology science, vol 47. IEEE, pp 13–18Google Scholar
 Xu Z, Cai X (2012) Dynamic intuitionistic fuzzy multiattribute decision making. In: Intuitionistic fuzzy information aggregation. Springer, Berlin, pp 259–283View ArticleGoogle Scholar
 Xu Z, Liao H (2015) A survey of approaches to decision making with intuitionistic fuzzy preference relations. KnowlBased Syst 80:131–142View ArticleGoogle Scholar
 Zadeh LA (1965) Fuzzy sets. Inf Control 8(3):338–353MathSciNetView ArticleMATHGoogle Scholar
 Zadeh LA (1975) The concept of a linguistic variable and its application to approximate reasoning. Inf Sci 8(3):199–249MathSciNetView ArticleMATHGoogle Scholar