research article an efficient multitask scheduling model...

8
Research Article An Efficient Multitask Scheduling Model for Wireless Sensor Networks Hongsheng Yin, 1 Honggang Qi, 2 Jingwen Xu, 2,3 Xin Huang, 1 and Anping He 4 1 China University of Mining & Technology, Xuzhou 221116, China 2 University of Chinese Academy of Sciences, Beijing 101408, China 3 Institute of Electrical Engineering, Chinese Academy of Sciences, Beijing 100190, China 4 Guangxi Key Laboratory of Hybrid Computation and IC Design Analysis, Guangxi University for Nationalities, Nanning 530006, China Correspondence should be addressed to Honggang Qi; [email protected] and Anping He; [email protected] Received 5 January 2014; Accepted 19 February 2014; Published 30 March 2014 Academic Editor: X. Song Copyright © 2014 Hongsheng Yin et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. e sensor nodes of multitask wireless network are constrained in performance-driven computation. eoretical studies on the data processing model of wireless sensor nodes suggest satisfying the requirements of high qualities of service (QoS) of multiple application networks, thus improving the efficiency of network. In this paper, we present the priority based data processing model for multitask sensor nodes in the architecture of multitask wireless sensor network. e proposed model is deduced with the M/M/1 queuing model based on the queuing theory where the average delay of data packets passing by sensor nodes is estimated. e model is validated with the real data from the Huoerxinhe Coal Mine. By applying the proposed priority based data processing model in the multitask wireless sensor network, the average delay of data packets in a sensor nodes is reduced nearly to 50%. e simulation results show that the proposed model can improve the throughput of network efficiently. 1. Introduction Wireless sensor network (WSN) is a basic network for accessing the data information in the sensor layer of the Internet of ings (IOS). WSN is widely applied in various areas [1]. For instance, in military, the troop and equipment can be identified and services can be coordinated to fight with the assistance of WSN. In the aspect of biomedical, human health can be monitored by the surgical sensors implanted in body, which is a typical application of WSN. Moreover, in earthquake prediction, ad hoc deployment of seismic sensors along the volcanic area can detect the devel- opment of earthquakes and eruptions [2]. WSN integrates the technologies of information sensing, data processing and transmission, which is a multitask system. Numerous data services are operating on the multitask system, such as the wireless monitoring and information management systems for coalmine safety production. e types of the service data provided by WSN are classified as automatic control command, safety monitoring data, audio and video data, and so on [3]. Usually, the coverage range of wireless sensor network is not very large. us, the transmission delay of electromagnetic wave may be neglected. As the sensor nodes are constrained in computation, storage, and energy, it is difficult to meet the requirement of good quality of service (QoS) for more tasks running in a network. Moreover, due to the unreliable wireless channel interfered by noise, QoS of the wireless transmission is oſten depressed, which is especially significant in multitask wireless network. And therefore, in order to improve the performance of multitask wireless sensor network, it is very important to carry out research on the high-efficient multitask scheduling model for wireless sensor network. TinyOS is an operating system, which is widely used in wireless sensor networks. e operating system adopts First Come First Served (FCFS) scheduling strategy for task scheduling, which is efficient to reduce the requirements of storing space [4, 5]. However, as there are no the priorities among various kinds of service data, some real-time services cannot be timely responded, so that many services are missed, Hindawi Publishing Corporation Journal of Applied Mathematics Volume 2014, Article ID 969523, 7 pages http://dx.doi.org/10.1155/2014/969523

Upload: others

Post on 29-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

Research ArticleAn Efficient Multitask Scheduling Model forWireless Sensor Networks

Hongsheng Yin1 Honggang Qi2 Jingwen Xu23 Xin Huang1 and Anping He4

1 China University of Mining amp Technology Xuzhou 221116 China2University of Chinese Academy of Sciences Beijing 101408 China3 Institute of Electrical Engineering Chinese Academy of Sciences Beijing 100190 China4Guangxi Key Laboratory of Hybrid Computation and IC Design Analysis Guangxi University for NationalitiesNanning 530006 China

Correspondence should be addressed to Honggang Qi hgqiucasaccn and Anping He hapetisgmailcom

Received 5 January 2014 Accepted 19 February 2014 Published 30 March 2014

Academic Editor X Song

Copyright copy 2014 Hongsheng Yin et alThis is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

The sensor nodes of multitask wireless network are constrained in performance-driven computation Theoretical studies on thedata processing model of wireless sensor nodes suggest satisfying the requirements of high qualities of service (QoS) of multipleapplication networks thus improving the efficiency of network In this paper we present the priority based data processing modelformultitask sensor nodes in the architecture of multitask wireless sensor networkThe proposedmodel is deduced with theMM1queuingmodel based on the queuing theorywhere the average delay of data packets passing by sensor nodes is estimatedThemodelis validated with the real data from the Huoerxinhe Coal Mine By applying the proposed priority based data processing model inthe multitask wireless sensor network the average delay of data packets in a sensor nodes is reduced nearly to 50The simulationresults show that the proposed model can improve the throughput of network efficiently

1 Introduction

Wireless sensor network (WSN) is a basic network foraccessing the data information in the sensor layer of theInternet of Things (IOS) WSN is widely applied in variousareas [1] For instance in military the troop and equipmentcan be identified and services can be coordinated to fightwith the assistance of WSN In the aspect of biomedicalhuman health can be monitored by the surgical sensorsimplanted in body which is a typical application of WSNMoreover in earthquake prediction ad hoc deployment ofseismic sensors along the volcanic area can detect the devel-opment of earthquakes and eruptions [2] WSN integratesthe technologies of information sensing data processingand transmission which is a multitask system Numerousdata services are operating on the multitask system suchas the wireless monitoring and information managementsystems for coalmine safety production The types of theservice data provided by WSN are classified as automaticcontrol command safety monitoring data audio and video

data and so on [3] Usually the coverage range of wirelesssensor network is not very largeThus the transmission delayof electromagnetic wave may be neglected As the sensornodes are constrained in computation storage and energyit is difficult to meet the requirement of good quality ofservice (QoS) formore tasks running in a networkMoreoverdue to the unreliable wireless channel interfered by noiseQoS of the wireless transmission is often depressed whichis especially significant in multitask wireless network Andtherefore in order to improve the performance of multitaskwireless sensor network it is very important to carry outresearch on the high-efficient multitask scheduling model forwireless sensor network

TinyOS is an operating system which is widely usedin wireless sensor networks The operating system adoptsFirst Come First Served (FCFS) scheduling strategy for taskscheduling which is efficient to reduce the requirements ofstoring space [4 5] However as there are no the prioritiesamong various kinds of service data some real-time servicescannot be timely responded so thatmany services aremissed

Hindawi Publishing CorporationJournal of Applied MathematicsVolume 2014 Article ID 969523 7 pageshttpdxdoiorg1011552014969523

2 Journal of Applied Mathematics

Sensor nodeCluster head Sink

Database server Workstations Different application servers

Ethernet

Figure 1 Multiapplication system architecture of wireless sensor network

which results in the low throughput of network [6] Forthe drawback of TinyOS in the scheduling strategy theresearchers have done many researches for improving thescheduling strategy The contribution [7] introduced a dualcircular-based task scheduling strategy In this strategy thesingle circular queue is substituted with the dual circularqueues with different priorities The tasks are assigned dif-ferent priorities and then are allocated in the two circularqueues according to their priorities The tasks in differentqueues are dynamically switched according to their timevariations for guaranteeing them to be responded as muchas possible The strategy improves the speed of responseto real-time tasks but the throughput of network is stilllow In contribution [8 9] a priority based soft real-timetask scheduling strategy was proposed which increases thethroughput of network but does not satisfy the real-timerequirement of some high-priority tasks For solving theexisting problem in [8 9] the contribution [10] introducedan improving scheduling strategy EF-RM (emergency taskfirst rate monotonic) which is the preemptive schedulingfor both periodical and nonperiodical tasks to ensure theimplementation of the important task of priority in TinyOSThe contribution [11] proposed the IS-EDF (idle sleep-earliestdeadline first) scheduling strategy which adjusts the priorityof tasks dynamically to ensure that the important task is real-time processed

In this paper through further research on the relevantcontributions mentioned above we propose the priorityqueue-based data processing model for multitask networkand deduce the theoretical formulas of the QoS of networkwith the proposed model including average queue lengthdelay and delay jitter The performance of the proposedmodels is analyzed and compared by the practical simulationexperiments

The rest of this paper is organized as follows The archi-tecture of multitask wireless sensor network is presented inSection 2 Then the queue theory is introduced in Section 3first Subsequently in Sections 4 and 5 two queue models are

described respectivelyThe experimental results are shown inSection 6 Finally we conclude this paper in Section 7

2 Architecture of MultitaskWireless Sensor Network

In the wireless sensor network a large number of wirelesssensor nodes are densely and fully deployed in the networkThese wireless sensor nodes are organized intomany clustersEach cluster is composed of a cluster head andmultiple sensornodesThe internal sensor nodes can communicate with eachother in the cluster The external communications betweenclusters are fulfilled by the cluster heads in these clustersMoreover the cluster head is responsible for assigning thetime slot for each sensor nodes in its cluster The datacollected from each wireless sensor nodes are first gatheredin the cluster heads and then transmitted to a database inthe server by the sink nodes through the wired Ethernet Allapplications in the network share the data in the databasefor different functions The architecture of multitask wirelesssensor network is shown in Figure 1

3 Concept of Queuing Theory

Queuing theory is a mathematical method for analyzing thecongestion and delays of data packets in a link With queuingtheory the arrival service and depart of data packets can beaccurately evaluated so that the data packets can be efficientlyscheduled in a link For describing the proposed modelbased on the queuing theory easily we give the followingdefinitions

Definition 1 (inputting distribution 119860(119905)) In the inputtingprocess let 119862

119899be the 119899th data packet arriving at the network

node and the arrival time is 120591119899 then 119905

119899= 120591119899minus 120591119899minus1

whichmeans the time interval between 119862

119899and 119862

119899minus1 Assume that

1205910= 0 and the arriving data packets are independent then

Journal of Applied Mathematics 3

Packetarrivals

120583

120582

Packetbuffer queue

Scheduler Packetdepartures

Figure 2 Data processing model for the queuing system without priority

120583120583 120583 120583120583 120583

120582 120582 120582 120582 120582 120582

middot middot middotmiddot middot middot i + 1i0 1 2

Figure 3 State diagram of birth-death process for queuing system without priority

119905119899 is the sequence of independent random variables written

as 119860(119905)

Definition 2 (serving distribution 119861(119905)) In the service pro-cess let the service time of data packet 119862

119899be ]119899 Assume that

the services of data packets are independent then V119899 is the

dependent sequence of random variables written as 119861(119905)

Definition 3 (arrival probability of data packet119901(119899)) Let119873(119905)be the number of data packets in a network node at time 119905 andlet 119901(119899) be the arrival probability of 119899 data packets in timeinterval (119905

1 1199052) then there is the relation

119901 (119899) = 119875 119873 (1199052) minus 119873 (119905

1) = 119899 (119905

2gt 1199051 119899 ge 0) (1)

Definition 4 (arrival rate of data packet 120582) An averagenumber of data packets arrive at a network node in unit timewhich reflects how fast the data packets arrive at a networknode 1120582 is just the average arrival time interval of datapackets

Definition 5 (service rate of network node 120583) An averagenumber of served data packets depart from a network nodein unit time which reflects how fast the services are in thenetwork node 1120583 is just the average time of the data packetssevered in a network node

Definition 6 (service intensity 120588) The average service timeof each network node in unit time which is an importantindicator for measuring how busy the network nodes is 120588 =120582120583 0 le 120588 lt 1

In the real situation of wireless sensor network thedata packets arrive at sensor nodes continuously Thus thenumber of data packets is regarded as infinite For simplicitythe arrival times of data packets are assumed to followMM1queue model The input process of data packets that is thearrival times is similar to the Poisson stream with parameter120582 The arriving time interval 119860(119905) and service time 119861(119905)follow the negative exponential distribution with parameters120582 and 120583 respectively where the service window size is 1Based on the reasonable assumptions and the definitions on

queue theory mentioned above two queue system modelsnonpriority and priority models are analyzed and comparedas follows And therefore the high efficient queue model isproposed in this paper

4 Data Processing Model Based onNonpriority Queue System

As shown in Figure 2 the data packets enter the networknodes continuously and are lined up in a queue with theaverage arrival rate 120582 The data packets depart in turn fromthe queue and data services are scheduled in the scheduler atthe average processing rate 120583 The node state 119873 at time 119905 isdenoted as119873(119905) = (119894) where 119894 is the number of data packetsincluding the processing data packet that is the queue lengthIt is easy to be proved that 119873(119905) 119905 ge 0 is birth-death process[12ndash16]

Let 119901(119894 119905) = 119875119873(119905) = (119894) where 119901(119894) =

lim119905rarrinfin

119901(119894 119905) 119894 ge 0 Referring to Figure 3 if 120588 = 120582120583 lt 1the balance equations are as follows

120582119901 (0) = 120583119901 (1)

(120582 + 120583) 119901 (1) = 120582119901 (0) + 120583119901 (2)

(120582 + 120583) 119901 (2) = 120582119901 (1) + 120583119901 (3)

sdot sdot sdot

(120582 + 120583) 119901 (119894) = 120582119901 (119894 minus 1) + 120583119901 (119894 + 1)

(2)

Because there is suminfin119894=0119901(119894) = 1 and 119901(119894) = (1 minus 120588)120588119894 holds so

the average length of data packets in network node is

119876 =

infin

sum

119894=0

119894119901 (119894) =

infin

sum

119894=0

119894 (1 minus 120588) 120588119894

=120588

1 minus 120588(3)

And the average waiting queue length of data packets innetwork node is

119882 =

infin

sum

119894=0

119894119901 (119894 + 1) =

infin

sum

119894=0

119894 (1 minus 120588) 120588119894+1

=1205882

1 minus 120588(4)

4 Journal of Applied Mathematics

Packetarrival Classifier 120582

1205821

1205822

Packet buffer queuewith priority

Packet buffer queuewithout priority

Priorityjudge Scheduler Packet

forwarding

120583(1205831 1205832)

Figure 4 Data processing model for the queuing system with priority

1205821 1205821 1205822i minus 1 0 i 0 i + 1 0 i 1

1205831 12058311205832middot middot middotmiddot middot middot

(a) state (119894 0) as center

12058211205822 1205822

12058311205832 1205832middot middot middot0 j minus 1 0 j 0 j + 1 1 j

(b) State (0 119895) as center

1205822

1205832

1205821

1205831

middot middot middot middot middot middot0 1 0 0 1 0

(c) State (0 0) as center

1205821 12058211205822 1205822

1205831 1205831

middot middot middoti j minus 1 i minus 1 j i j i + 1 j i j + 1

(d) State (119894 119895) as center

Figure 5 State diagram of birth-death process for queuing system with priority

According to the Little theorem the average waiting time ofa data packet is expressed as

119879119908=119882

120582=

1205882

120582 (1 minus 120588)=

120588

120583 (1 minus 120588) (5)

And the average residence time of a data packet in networknode that is delay of a data packet is

119879119876= 119879119882+1

120583=

1

120583 (1 minus 120588)=

1

120583 minus 120582 (6)

And the delay jitter of a data packet in network node that isvariance of delay is

119869119876=

1

(120583 minus 120582)2 (7)

5 Data Processing Model ofQueue with Priority

In this model the data packets entering the network nodeare classified into two queues with different priorities at theaverage rates 120582

1and 120582

2by the classifier as shown in Figure 4

In the scheduler according to the service rule given by thepriority decision module the services are obtained at theaverage processing rates 120583

1and 120583

2 The priority decision

module decides the processing sequence of data packets forthe scheduler It employs the preemptive priority service rulewhich allows that the services of low-priority data packets areinterrupted and free up resource for serving the high-prioritydata packets The data packets with the same priority will beserviced according to the FCFS rule

The data packet with priority is denoted by C1 andthe data packet without priority is denoted by C2

The data packets C1 and C2 arrive at the network nodein independent Poisson distribution with the parameters1205821and 120582

2 respectively and their service times follow the

negative exponential distribution with the parameters 1205831

and 1205832 The system utilization is denoted by 120588 which is

the time rate of service busy That is the proportion of timethat the scheduler busies 120582 is the average arrival rate ofall data packets and 120583 is the average processing rate for alldata packets The relations between these parameters can beexpressed as 120582 = 120582

1+ 1205822 120588 = 120588

1+ 1205882 120588 = 120582120583 120588

1= 12058211205831

and 1205882= 12058221205832

The state of network node at time 119905 is denoted as 119873(119905) =(119894 119895) If the number of data packets C1 is 119894 and the number ofdata packets C2 is 119895 it is easy to prove that 119873(119905) 119905 ge 0 is thebirth-death process [12ndash16] The state diagram of birth-deathprocess for queuing systemwith priority is shown in Figure 5

Let

119901 (119894 119895 119905) = 119875 119873 (119905) = (119894 119895)

119901 (119894 119895) = lim119905rarrinfin

119901 (119894 119895 119905) 119894 119895 ge 0(8)

According to the states in Figure 5 if 120588 = 1205881+ 1205882= 12058211205831+

12058221205832le 1 then the following equations hold

(1205821+ 1205822) 119901 (0 0) = 120583

1119901 (1 0) + 120583

2119901 (0 1)

(1205821+ 1205822+ 1205831) 119901 (119894 0) = 120583

1119901 (119894 + 1 0)

+ 1205821119901 (119894 minus 1 0) 119894 gt 0

(1205821+ 1205822+ 1205832) 119901 (0 119895) = 120582

2119901 (0 119895 minus 1) + 120583

1119901 (1 119895)

+ 1205832119901 (0 119895 + 1) 119895 gt 0

Journal of Applied Mathematics 5

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW = 00040779 sResidence time curve TQ = 00091234 s

(a)

The queue length curve Q = 081201 s

Pack

et q

ueue

leng

th 15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 6 The curve of the time and queue length in the queuing model without priority

(1205821+ 1205822+ 1205831) 119901 (119894 119895) = 120582

1119901 (119894 minus 1 119895) + 120582

2119901 (119894 119895 minus 1)

+ 1205831119901 (119894 + 1 119895) 119894 119895 gt 0

(9)

The process of solving the equations (9) can be referredto [12ndash16] which solves 119901(119894 119895) through the inverse solvingmethod with the following generating function 120595(119906 119911)

120595 (119906 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881119906120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(10)

where 120596(119911) = (1205821

+ 1205831

+ 1205822(1 minus 119911) minus

radic[1205821+ 1205831+ 1205822(1 minus 119911)]

2

minus 412058211205831)21205821 The solution of

function 119901(119894 119895) is solved by the differential generatingfunction 120595(119906 119911) that is

119901 (119894 119895) =1

119894119895sdot120597119894+119895

120595(119906 119911)

120597119906119894120597119911119895

100381610038161003816100381610038161003816100381610038161003816119906=119911=0

(11)

Let the probabilities of 119894 C1 data packets and 119895 C2 datapackets in network node be 119901

119894∙and 119901

∙119895 respectively Their

probabilities of generating functions are 120595(119906 1) and 120595(1 119911)By formula (10) let 119911 rarr 1 using the LrsquoHospital Rule we

can get

120595 (119906 1) =1 minus 1205881

1 minus 1205881119906=

infin

sum

119894=0

(1 minus 1205881) 120588119894

1119906119894

(12)

Thus 119901119894∙= (1 minus 120588

1)120588119894

1 which is the same as the MM1 queue

system with only one kind of client As a result it shows thatthe existence of C2 data packets has no effect on the C1 datapackets which is in accord with the practical situation ofnetwork Similarly the average length of C1 data packet queueand the average length of C1 data packet waiting queue can begot as

1198761=

1205881

1 minus 1205881

1198821=

1205882

1

1 minus 1205881

(13)

The simulation curveThe theoretical curve

Service intensity 120588

0 01 02 03 04 05 06 07 08 09 1

20

18

16

14

12

10

8

6

4

2

0

The a

vera

ge w

aitin

g tim

e (s)

Figure 7 Theoretical and simulation curves of the average waitingtime in the queuing model without priority

And the average waiting time and average residence time ofsingle C1 data packet are

1198791198821

=1205881

1205831(1 minus 120588

1)

(14)

1198791198761

=1

1205831(1 minus 120588

1)=

1

1205831minus 1205821

(15)

The delay jitter of a C1 data packet in the network node thatis the delay variance is as follows

1198691198761

=1

(1205831minus 1205821)2 (16)

Then by formula (10) we get

120595 (1 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(17)

6 Journal of Applied Mathematics

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW1= 00020987 s

Residence time curve TQ1= 00050838 s

(a)

The queue length curve Q = 021762 s

Pack

et q

ueue

leng

th

15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 8 The curves of the time and queue length in the queuing model with priority

Derivate formula (17) by 119911 and then let 119911 = 1 the averagequeue length of C2 data packets can be deduced as

1198762=

infin

sum

119895=0

119895119901∙119895=

1205882

1 minus 1205881minus 1205882

[1 +12058321205881

1205831(1 minus 120588

1)] (18)

Thus the average residence time of a C2 data packet is

1198791198762

= 11987611198791198761

+1198762

1205822

=1205881

1205831(1 minus 120588

1)2+

1

1205832(1 minus 120588

1minus 1205882)[1 +

12058321205881

1205831(1 minus 120588

1)]

(19)

6 Simulation Experiments and Discussion

The proposed multitask schedule model can be used in manynetwork applications In coalmine there are many monitor-ing and information management systems for its safety andproduction which are the typical multitask wireless sensornetwork applications In this kind of monitoring systemsthe usual detecting period is 20 seconds and the numberof monitoring nodes is usually more than 200 Thus theproposed model applied in the gas warning system needs toprocess the data of thousands of sensor nodes Moreover thenetwork delay and processing time need to be considered inpractice applications

In this experiment we use the practical data from Huo-erxinhe CoalMine China which lay the gas warningwirelessnetwork with the same system structure as in Figure 1 Inthis network the backbone network is optical fiber Ethernetbased on which network is partitioned into many zones Ineach zone a number of wireless sensor nodes are evenly laidout Various monitoring data such as gas concentration COconcentration CO

2concentration and so on are detected in

real time by the sensor nodes These data will be collectedto the Sink node in the zone Subsequently all data aretransferred to the server by the sink nodes in each zoneThe transfer capability of Sink nodes is the bottleneck ofthe capability of the network system In the test data setfrom Huoerxinhe Coal Mine a Sink node is able to send200 UDP packets per second from which 90 UDP packetsarrive at the target node Each UDP packet contains 85 bytes

The parameters 120582 1205821 1205822 120583 1205831 and 120583

2in formula (6) (15)

and (19) are decided according to the field testIf the priority processing rule is not employed that is the

sink node employs the data processingmodel based on queuesystem without priority the 120582 = 90 packetss and 120583 = 200sAccording to formula (6) the average delay of each packet is91ms If the priority processing rule is employed that is thesink node employs the data processingmodel based on queuesystem with priority the data are distinguished with differentpriorities Taking the coal monitoring system as an examplethe gas concentration and monitoring control command arewith higher priority and others are with lower priority

According to the statistics the probability of C1 occur-rence is 010 and the probability of C2 occurrence is 090Meanwhile120583

1= 1205832= 200 packetss120582 = 90 packetss120582

1= 9

packetss and 1205822= 81 packetssThus according to formulas

(15) and (19) the average delay of C1 packets is 52ms and theaverage delay of C2 packets is 97ms

The theoretical analysis shows that compared with thedata processing model based on queue system withoutpriority the average delay of data packets processed with themodel based on queue system with priority is reduced upto 43 However the average delay of data packets withoutpriority is slightly reduced only 66

For observing the queue and service process of datapackets in network nodes with the proposed model we useMatLab to simulate the model The model parameters 120582 120582

1

1205822 120583 1205831 and 120583

2are set in accordance with the theoretical

analysis The simulation results are shown in Figures 67 8 and 9 which show the same results with theoreticalanalysis In fact operation practice of multitask wirelesssensor network inHuoerxinhe CoalMine also confirmed ourtheoretical analysis and simulation experiments

7 Conclusions

In this paper two data processing models with and withoutpriority are proposed for multitask wireless sensor networksThe proposed models are established from the MM1 queuemodel The average delay theory of data packets based onthe proposed models is also deduced The practical datafrom Huoerxinhe Coal Mine are used for testing the per-formances of the proposed two models applied in the coal

Journal of Applied Mathematics 7

The simulation curve without priorityThe simulation curve with priority

The a

vera

ge w

aitin

g tim

e (s)

Service intensity 120588

3

25

2

15

1

05

00 01 02 03 04 05 06 07

Figure 9 The curves of the average waiting time in the queuingmodels with priority and without priority

safety monitoring system which is a typical wireless sensornetwork application The simulation results show that theaverage delay of data packets processed with the proposedmodel is significantly reduced Compared with the averagedelay of data packets without priority the proposed modelcan be applied to the multitask wireless sensor networkharmonically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

Thiswork is supported by theNational Natural Science Foun-dation of China 61379100 and 61001108 Bagui scholarshipproject the Natural Science Foundation of Guangxi underGrant no 2011GXNSFA018154 and 2012GXNSFGA060003the Science and Technology Foundation of Guangxi underGrant no 10169-1 Guangxi Scientific Research Projectno 201012MS274 Funded Projects of Innovation Plan forGuangxi Graduate Education no gxun-chx2013t18 andGuangxi University for Nationalities Project no 2012QD017

References

[1] I F Akyildiz W Su Y Sankarasubramaniam and E CayircildquoWireless sensor networks a surveyrdquo Computer Networks vol38 no 4 pp 393ndash422 2002

[2] J Yick B Mukherjee and D Ghosal ldquoWireless sensor networksurveyrdquoComputerNetworks vol 52 no 12 pp 2292ndash2330 2008

[3] H-S Yin Z Liu J-S Qian K Zhang and J Wu ldquoQoS modelof multimedia integrated services digital network in coal minerdquoJournal of China University of Mining and Technology vol 39no 1 pp 109ndash115 2010

[4] M M R Mozumdar L Lavagno and L Vanzago ldquoA compari-son of software platforms for wireless sensor networks MAN-TIS TinyOS and ZigBeerdquo ACM Transactions on EmbeddedComputing Systems vol 8 no 2 pp 123ndash129 2009

[5] C Karlof and D Wagner ldquoSecure routing in wireless sensornetworks attacks and countermeasuresrdquo Ad Hoc Networks vol1 no 2-3 pp 293ndash315 2003

[6] J Ager and L Clare ldquoAn integrated architecture for cooperativesensing networksrdquo Computer vol 33 no 5 pp 106ndash108 2000

[7] N Nasser L Karim and T Taleb ldquoDynamic multilevel prioritypacket scheduling scheme for wireless sensor networkrdquo IEEETransactions on Wireless Communications vol 12 no 4 pp1448ndash1459 2013

[8] C Duffy U Roedig J Herbert and C J Sreenan ldquoAddingpreemption to TinyOSrdquo in Proceedings of the 4th Workshop onEmbedded Networked Sensors (EmNets rsquo07) pp 88ndash92 CorkIreland June 2007

[9] Y Zhao Q Wang W Wang D Jiang and Y Liu ldquoResearchon the priority-based soft real-time task scheduling in TinyOSrdquoin Proceedings of the International Conference on InformationTechnology and Computer Science (ITCS rsquo09) pp 562ndash565 KievUkraine July 2009

[10] M Yu S Xiahou and X Y Li ldquoA survey of studying ontask scheduling mechanism for TinyOSrdquo in Proceedings ofthe 4th International Conference on Wireless CommunicationsNetworking and Mobile Computing (WiCOM rsquo08) pp 1ndash4Dalian China October 2008

[11] K Mizanian R Hajisheykhi M Baharloo and A H JahangirldquoRACE a real-time scheduling policy and communicationarchitecture for large-scale wireless sensor networksrdquo in Pro-ceedings of the 7th Annual Communication Networks and Ser-vices Research Conference (CNSR rsquo09) pp 458ndash460 MonctonCanada May 2009

[12] J-S Qian H-S Yin X-R Liu GHua and Y-G Xu ldquoData pro-cessingmodel of coalmine gas early-warning systemrdquo Journal ofChina University of Mining and Technology vol 17 no 1 pp 20ndash24 2007

[13] S Asmussen Applied Probability and Queues Springer NewYork NY USA 2nd edition 2003

[14] L Lipsky Queueing Theory A Linear Algebraic ApproachSpringer New York NY USA 2nd edition 2009

[15] D Gross and C M Harris Fundamentals of Queueing TheoryJohn Wiley amp Sons New York NY USA 1998

[16] P J Smith A Firag P A Dmochowski and M Shafi ldquoAnalysisof the MMNN queue with two types of arrival processapplications to future mobile radio systemsrdquo Journal of AppliedMathematics vol 2012 Article ID 123808 14 pages 2012

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

2 Journal of Applied Mathematics

Sensor nodeCluster head Sink

Database server Workstations Different application servers

Ethernet

Figure 1 Multiapplication system architecture of wireless sensor network

which results in the low throughput of network [6] Forthe drawback of TinyOS in the scheduling strategy theresearchers have done many researches for improving thescheduling strategy The contribution [7] introduced a dualcircular-based task scheduling strategy In this strategy thesingle circular queue is substituted with the dual circularqueues with different priorities The tasks are assigned dif-ferent priorities and then are allocated in the two circularqueues according to their priorities The tasks in differentqueues are dynamically switched according to their timevariations for guaranteeing them to be responded as muchas possible The strategy improves the speed of responseto real-time tasks but the throughput of network is stilllow In contribution [8 9] a priority based soft real-timetask scheduling strategy was proposed which increases thethroughput of network but does not satisfy the real-timerequirement of some high-priority tasks For solving theexisting problem in [8 9] the contribution [10] introducedan improving scheduling strategy EF-RM (emergency taskfirst rate monotonic) which is the preemptive schedulingfor both periodical and nonperiodical tasks to ensure theimplementation of the important task of priority in TinyOSThe contribution [11] proposed the IS-EDF (idle sleep-earliestdeadline first) scheduling strategy which adjusts the priorityof tasks dynamically to ensure that the important task is real-time processed

In this paper through further research on the relevantcontributions mentioned above we propose the priorityqueue-based data processing model for multitask networkand deduce the theoretical formulas of the QoS of networkwith the proposed model including average queue lengthdelay and delay jitter The performance of the proposedmodels is analyzed and compared by the practical simulationexperiments

The rest of this paper is organized as follows The archi-tecture of multitask wireless sensor network is presented inSection 2 Then the queue theory is introduced in Section 3first Subsequently in Sections 4 and 5 two queue models are

described respectivelyThe experimental results are shown inSection 6 Finally we conclude this paper in Section 7

2 Architecture of MultitaskWireless Sensor Network

In the wireless sensor network a large number of wirelesssensor nodes are densely and fully deployed in the networkThese wireless sensor nodes are organized intomany clustersEach cluster is composed of a cluster head andmultiple sensornodesThe internal sensor nodes can communicate with eachother in the cluster The external communications betweenclusters are fulfilled by the cluster heads in these clustersMoreover the cluster head is responsible for assigning thetime slot for each sensor nodes in its cluster The datacollected from each wireless sensor nodes are first gatheredin the cluster heads and then transmitted to a database inthe server by the sink nodes through the wired Ethernet Allapplications in the network share the data in the databasefor different functions The architecture of multitask wirelesssensor network is shown in Figure 1

3 Concept of Queuing Theory

Queuing theory is a mathematical method for analyzing thecongestion and delays of data packets in a link With queuingtheory the arrival service and depart of data packets can beaccurately evaluated so that the data packets can be efficientlyscheduled in a link For describing the proposed modelbased on the queuing theory easily we give the followingdefinitions

Definition 1 (inputting distribution 119860(119905)) In the inputtingprocess let 119862

119899be the 119899th data packet arriving at the network

node and the arrival time is 120591119899 then 119905

119899= 120591119899minus 120591119899minus1

whichmeans the time interval between 119862

119899and 119862

119899minus1 Assume that

1205910= 0 and the arriving data packets are independent then

Journal of Applied Mathematics 3

Packetarrivals

120583

120582

Packetbuffer queue

Scheduler Packetdepartures

Figure 2 Data processing model for the queuing system without priority

120583120583 120583 120583120583 120583

120582 120582 120582 120582 120582 120582

middot middot middotmiddot middot middot i + 1i0 1 2

Figure 3 State diagram of birth-death process for queuing system without priority

119905119899 is the sequence of independent random variables written

as 119860(119905)

Definition 2 (serving distribution 119861(119905)) In the service pro-cess let the service time of data packet 119862

119899be ]119899 Assume that

the services of data packets are independent then V119899 is the

dependent sequence of random variables written as 119861(119905)

Definition 3 (arrival probability of data packet119901(119899)) Let119873(119905)be the number of data packets in a network node at time 119905 andlet 119901(119899) be the arrival probability of 119899 data packets in timeinterval (119905

1 1199052) then there is the relation

119901 (119899) = 119875 119873 (1199052) minus 119873 (119905

1) = 119899 (119905

2gt 1199051 119899 ge 0) (1)

Definition 4 (arrival rate of data packet 120582) An averagenumber of data packets arrive at a network node in unit timewhich reflects how fast the data packets arrive at a networknode 1120582 is just the average arrival time interval of datapackets

Definition 5 (service rate of network node 120583) An averagenumber of served data packets depart from a network nodein unit time which reflects how fast the services are in thenetwork node 1120583 is just the average time of the data packetssevered in a network node

Definition 6 (service intensity 120588) The average service timeof each network node in unit time which is an importantindicator for measuring how busy the network nodes is 120588 =120582120583 0 le 120588 lt 1

In the real situation of wireless sensor network thedata packets arrive at sensor nodes continuously Thus thenumber of data packets is regarded as infinite For simplicitythe arrival times of data packets are assumed to followMM1queue model The input process of data packets that is thearrival times is similar to the Poisson stream with parameter120582 The arriving time interval 119860(119905) and service time 119861(119905)follow the negative exponential distribution with parameters120582 and 120583 respectively where the service window size is 1Based on the reasonable assumptions and the definitions on

queue theory mentioned above two queue system modelsnonpriority and priority models are analyzed and comparedas follows And therefore the high efficient queue model isproposed in this paper

4 Data Processing Model Based onNonpriority Queue System

As shown in Figure 2 the data packets enter the networknodes continuously and are lined up in a queue with theaverage arrival rate 120582 The data packets depart in turn fromthe queue and data services are scheduled in the scheduler atthe average processing rate 120583 The node state 119873 at time 119905 isdenoted as119873(119905) = (119894) where 119894 is the number of data packetsincluding the processing data packet that is the queue lengthIt is easy to be proved that 119873(119905) 119905 ge 0 is birth-death process[12ndash16]

Let 119901(119894 119905) = 119875119873(119905) = (119894) where 119901(119894) =

lim119905rarrinfin

119901(119894 119905) 119894 ge 0 Referring to Figure 3 if 120588 = 120582120583 lt 1the balance equations are as follows

120582119901 (0) = 120583119901 (1)

(120582 + 120583) 119901 (1) = 120582119901 (0) + 120583119901 (2)

(120582 + 120583) 119901 (2) = 120582119901 (1) + 120583119901 (3)

sdot sdot sdot

(120582 + 120583) 119901 (119894) = 120582119901 (119894 minus 1) + 120583119901 (119894 + 1)

(2)

Because there is suminfin119894=0119901(119894) = 1 and 119901(119894) = (1 minus 120588)120588119894 holds so

the average length of data packets in network node is

119876 =

infin

sum

119894=0

119894119901 (119894) =

infin

sum

119894=0

119894 (1 minus 120588) 120588119894

=120588

1 minus 120588(3)

And the average waiting queue length of data packets innetwork node is

119882 =

infin

sum

119894=0

119894119901 (119894 + 1) =

infin

sum

119894=0

119894 (1 minus 120588) 120588119894+1

=1205882

1 minus 120588(4)

4 Journal of Applied Mathematics

Packetarrival Classifier 120582

1205821

1205822

Packet buffer queuewith priority

Packet buffer queuewithout priority

Priorityjudge Scheduler Packet

forwarding

120583(1205831 1205832)

Figure 4 Data processing model for the queuing system with priority

1205821 1205821 1205822i minus 1 0 i 0 i + 1 0 i 1

1205831 12058311205832middot middot middotmiddot middot middot

(a) state (119894 0) as center

12058211205822 1205822

12058311205832 1205832middot middot middot0 j minus 1 0 j 0 j + 1 1 j

(b) State (0 119895) as center

1205822

1205832

1205821

1205831

middot middot middot middot middot middot0 1 0 0 1 0

(c) State (0 0) as center

1205821 12058211205822 1205822

1205831 1205831

middot middot middoti j minus 1 i minus 1 j i j i + 1 j i j + 1

(d) State (119894 119895) as center

Figure 5 State diagram of birth-death process for queuing system with priority

According to the Little theorem the average waiting time ofa data packet is expressed as

119879119908=119882

120582=

1205882

120582 (1 minus 120588)=

120588

120583 (1 minus 120588) (5)

And the average residence time of a data packet in networknode that is delay of a data packet is

119879119876= 119879119882+1

120583=

1

120583 (1 minus 120588)=

1

120583 minus 120582 (6)

And the delay jitter of a data packet in network node that isvariance of delay is

119869119876=

1

(120583 minus 120582)2 (7)

5 Data Processing Model ofQueue with Priority

In this model the data packets entering the network nodeare classified into two queues with different priorities at theaverage rates 120582

1and 120582

2by the classifier as shown in Figure 4

In the scheduler according to the service rule given by thepriority decision module the services are obtained at theaverage processing rates 120583

1and 120583

2 The priority decision

module decides the processing sequence of data packets forthe scheduler It employs the preemptive priority service rulewhich allows that the services of low-priority data packets areinterrupted and free up resource for serving the high-prioritydata packets The data packets with the same priority will beserviced according to the FCFS rule

The data packet with priority is denoted by C1 andthe data packet without priority is denoted by C2

The data packets C1 and C2 arrive at the network nodein independent Poisson distribution with the parameters1205821and 120582

2 respectively and their service times follow the

negative exponential distribution with the parameters 1205831

and 1205832 The system utilization is denoted by 120588 which is

the time rate of service busy That is the proportion of timethat the scheduler busies 120582 is the average arrival rate ofall data packets and 120583 is the average processing rate for alldata packets The relations between these parameters can beexpressed as 120582 = 120582

1+ 1205822 120588 = 120588

1+ 1205882 120588 = 120582120583 120588

1= 12058211205831

and 1205882= 12058221205832

The state of network node at time 119905 is denoted as 119873(119905) =(119894 119895) If the number of data packets C1 is 119894 and the number ofdata packets C2 is 119895 it is easy to prove that 119873(119905) 119905 ge 0 is thebirth-death process [12ndash16] The state diagram of birth-deathprocess for queuing systemwith priority is shown in Figure 5

Let

119901 (119894 119895 119905) = 119875 119873 (119905) = (119894 119895)

119901 (119894 119895) = lim119905rarrinfin

119901 (119894 119895 119905) 119894 119895 ge 0(8)

According to the states in Figure 5 if 120588 = 1205881+ 1205882= 12058211205831+

12058221205832le 1 then the following equations hold

(1205821+ 1205822) 119901 (0 0) = 120583

1119901 (1 0) + 120583

2119901 (0 1)

(1205821+ 1205822+ 1205831) 119901 (119894 0) = 120583

1119901 (119894 + 1 0)

+ 1205821119901 (119894 minus 1 0) 119894 gt 0

(1205821+ 1205822+ 1205832) 119901 (0 119895) = 120582

2119901 (0 119895 minus 1) + 120583

1119901 (1 119895)

+ 1205832119901 (0 119895 + 1) 119895 gt 0

Journal of Applied Mathematics 5

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW = 00040779 sResidence time curve TQ = 00091234 s

(a)

The queue length curve Q = 081201 s

Pack

et q

ueue

leng

th 15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 6 The curve of the time and queue length in the queuing model without priority

(1205821+ 1205822+ 1205831) 119901 (119894 119895) = 120582

1119901 (119894 minus 1 119895) + 120582

2119901 (119894 119895 minus 1)

+ 1205831119901 (119894 + 1 119895) 119894 119895 gt 0

(9)

The process of solving the equations (9) can be referredto [12ndash16] which solves 119901(119894 119895) through the inverse solvingmethod with the following generating function 120595(119906 119911)

120595 (119906 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881119906120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(10)

where 120596(119911) = (1205821

+ 1205831

+ 1205822(1 minus 119911) minus

radic[1205821+ 1205831+ 1205822(1 minus 119911)]

2

minus 412058211205831)21205821 The solution of

function 119901(119894 119895) is solved by the differential generatingfunction 120595(119906 119911) that is

119901 (119894 119895) =1

119894119895sdot120597119894+119895

120595(119906 119911)

120597119906119894120597119911119895

100381610038161003816100381610038161003816100381610038161003816119906=119911=0

(11)

Let the probabilities of 119894 C1 data packets and 119895 C2 datapackets in network node be 119901

119894∙and 119901

∙119895 respectively Their

probabilities of generating functions are 120595(119906 1) and 120595(1 119911)By formula (10) let 119911 rarr 1 using the LrsquoHospital Rule we

can get

120595 (119906 1) =1 minus 1205881

1 minus 1205881119906=

infin

sum

119894=0

(1 minus 1205881) 120588119894

1119906119894

(12)

Thus 119901119894∙= (1 minus 120588

1)120588119894

1 which is the same as the MM1 queue

system with only one kind of client As a result it shows thatthe existence of C2 data packets has no effect on the C1 datapackets which is in accord with the practical situation ofnetwork Similarly the average length of C1 data packet queueand the average length of C1 data packet waiting queue can begot as

1198761=

1205881

1 minus 1205881

1198821=

1205882

1

1 minus 1205881

(13)

The simulation curveThe theoretical curve

Service intensity 120588

0 01 02 03 04 05 06 07 08 09 1

20

18

16

14

12

10

8

6

4

2

0

The a

vera

ge w

aitin

g tim

e (s)

Figure 7 Theoretical and simulation curves of the average waitingtime in the queuing model without priority

And the average waiting time and average residence time ofsingle C1 data packet are

1198791198821

=1205881

1205831(1 minus 120588

1)

(14)

1198791198761

=1

1205831(1 minus 120588

1)=

1

1205831minus 1205821

(15)

The delay jitter of a C1 data packet in the network node thatis the delay variance is as follows

1198691198761

=1

(1205831minus 1205821)2 (16)

Then by formula (10) we get

120595 (1 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(17)

6 Journal of Applied Mathematics

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW1= 00020987 s

Residence time curve TQ1= 00050838 s

(a)

The queue length curve Q = 021762 s

Pack

et q

ueue

leng

th

15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 8 The curves of the time and queue length in the queuing model with priority

Derivate formula (17) by 119911 and then let 119911 = 1 the averagequeue length of C2 data packets can be deduced as

1198762=

infin

sum

119895=0

119895119901∙119895=

1205882

1 minus 1205881minus 1205882

[1 +12058321205881

1205831(1 minus 120588

1)] (18)

Thus the average residence time of a C2 data packet is

1198791198762

= 11987611198791198761

+1198762

1205822

=1205881

1205831(1 minus 120588

1)2+

1

1205832(1 minus 120588

1minus 1205882)[1 +

12058321205881

1205831(1 minus 120588

1)]

(19)

6 Simulation Experiments and Discussion

The proposed multitask schedule model can be used in manynetwork applications In coalmine there are many monitor-ing and information management systems for its safety andproduction which are the typical multitask wireless sensornetwork applications In this kind of monitoring systemsthe usual detecting period is 20 seconds and the numberof monitoring nodes is usually more than 200 Thus theproposed model applied in the gas warning system needs toprocess the data of thousands of sensor nodes Moreover thenetwork delay and processing time need to be considered inpractice applications

In this experiment we use the practical data from Huo-erxinhe CoalMine China which lay the gas warningwirelessnetwork with the same system structure as in Figure 1 Inthis network the backbone network is optical fiber Ethernetbased on which network is partitioned into many zones Ineach zone a number of wireless sensor nodes are evenly laidout Various monitoring data such as gas concentration COconcentration CO

2concentration and so on are detected in

real time by the sensor nodes These data will be collectedto the Sink node in the zone Subsequently all data aretransferred to the server by the sink nodes in each zoneThe transfer capability of Sink nodes is the bottleneck ofthe capability of the network system In the test data setfrom Huoerxinhe Coal Mine a Sink node is able to send200 UDP packets per second from which 90 UDP packetsarrive at the target node Each UDP packet contains 85 bytes

The parameters 120582 1205821 1205822 120583 1205831 and 120583

2in formula (6) (15)

and (19) are decided according to the field testIf the priority processing rule is not employed that is the

sink node employs the data processingmodel based on queuesystem without priority the 120582 = 90 packetss and 120583 = 200sAccording to formula (6) the average delay of each packet is91ms If the priority processing rule is employed that is thesink node employs the data processingmodel based on queuesystem with priority the data are distinguished with differentpriorities Taking the coal monitoring system as an examplethe gas concentration and monitoring control command arewith higher priority and others are with lower priority

According to the statistics the probability of C1 occur-rence is 010 and the probability of C2 occurrence is 090Meanwhile120583

1= 1205832= 200 packetss120582 = 90 packetss120582

1= 9

packetss and 1205822= 81 packetssThus according to formulas

(15) and (19) the average delay of C1 packets is 52ms and theaverage delay of C2 packets is 97ms

The theoretical analysis shows that compared with thedata processing model based on queue system withoutpriority the average delay of data packets processed with themodel based on queue system with priority is reduced upto 43 However the average delay of data packets withoutpriority is slightly reduced only 66

For observing the queue and service process of datapackets in network nodes with the proposed model we useMatLab to simulate the model The model parameters 120582 120582

1

1205822 120583 1205831 and 120583

2are set in accordance with the theoretical

analysis The simulation results are shown in Figures 67 8 and 9 which show the same results with theoreticalanalysis In fact operation practice of multitask wirelesssensor network inHuoerxinhe CoalMine also confirmed ourtheoretical analysis and simulation experiments

7 Conclusions

In this paper two data processing models with and withoutpriority are proposed for multitask wireless sensor networksThe proposed models are established from the MM1 queuemodel The average delay theory of data packets based onthe proposed models is also deduced The practical datafrom Huoerxinhe Coal Mine are used for testing the per-formances of the proposed two models applied in the coal

Journal of Applied Mathematics 7

The simulation curve without priorityThe simulation curve with priority

The a

vera

ge w

aitin

g tim

e (s)

Service intensity 120588

3

25

2

15

1

05

00 01 02 03 04 05 06 07

Figure 9 The curves of the average waiting time in the queuingmodels with priority and without priority

safety monitoring system which is a typical wireless sensornetwork application The simulation results show that theaverage delay of data packets processed with the proposedmodel is significantly reduced Compared with the averagedelay of data packets without priority the proposed modelcan be applied to the multitask wireless sensor networkharmonically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

Thiswork is supported by theNational Natural Science Foun-dation of China 61379100 and 61001108 Bagui scholarshipproject the Natural Science Foundation of Guangxi underGrant no 2011GXNSFA018154 and 2012GXNSFGA060003the Science and Technology Foundation of Guangxi underGrant no 10169-1 Guangxi Scientific Research Projectno 201012MS274 Funded Projects of Innovation Plan forGuangxi Graduate Education no gxun-chx2013t18 andGuangxi University for Nationalities Project no 2012QD017

References

[1] I F Akyildiz W Su Y Sankarasubramaniam and E CayircildquoWireless sensor networks a surveyrdquo Computer Networks vol38 no 4 pp 393ndash422 2002

[2] J Yick B Mukherjee and D Ghosal ldquoWireless sensor networksurveyrdquoComputerNetworks vol 52 no 12 pp 2292ndash2330 2008

[3] H-S Yin Z Liu J-S Qian K Zhang and J Wu ldquoQoS modelof multimedia integrated services digital network in coal minerdquoJournal of China University of Mining and Technology vol 39no 1 pp 109ndash115 2010

[4] M M R Mozumdar L Lavagno and L Vanzago ldquoA compari-son of software platforms for wireless sensor networks MAN-TIS TinyOS and ZigBeerdquo ACM Transactions on EmbeddedComputing Systems vol 8 no 2 pp 123ndash129 2009

[5] C Karlof and D Wagner ldquoSecure routing in wireless sensornetworks attacks and countermeasuresrdquo Ad Hoc Networks vol1 no 2-3 pp 293ndash315 2003

[6] J Ager and L Clare ldquoAn integrated architecture for cooperativesensing networksrdquo Computer vol 33 no 5 pp 106ndash108 2000

[7] N Nasser L Karim and T Taleb ldquoDynamic multilevel prioritypacket scheduling scheme for wireless sensor networkrdquo IEEETransactions on Wireless Communications vol 12 no 4 pp1448ndash1459 2013

[8] C Duffy U Roedig J Herbert and C J Sreenan ldquoAddingpreemption to TinyOSrdquo in Proceedings of the 4th Workshop onEmbedded Networked Sensors (EmNets rsquo07) pp 88ndash92 CorkIreland June 2007

[9] Y Zhao Q Wang W Wang D Jiang and Y Liu ldquoResearchon the priority-based soft real-time task scheduling in TinyOSrdquoin Proceedings of the International Conference on InformationTechnology and Computer Science (ITCS rsquo09) pp 562ndash565 KievUkraine July 2009

[10] M Yu S Xiahou and X Y Li ldquoA survey of studying ontask scheduling mechanism for TinyOSrdquo in Proceedings ofthe 4th International Conference on Wireless CommunicationsNetworking and Mobile Computing (WiCOM rsquo08) pp 1ndash4Dalian China October 2008

[11] K Mizanian R Hajisheykhi M Baharloo and A H JahangirldquoRACE a real-time scheduling policy and communicationarchitecture for large-scale wireless sensor networksrdquo in Pro-ceedings of the 7th Annual Communication Networks and Ser-vices Research Conference (CNSR rsquo09) pp 458ndash460 MonctonCanada May 2009

[12] J-S Qian H-S Yin X-R Liu GHua and Y-G Xu ldquoData pro-cessingmodel of coalmine gas early-warning systemrdquo Journal ofChina University of Mining and Technology vol 17 no 1 pp 20ndash24 2007

[13] S Asmussen Applied Probability and Queues Springer NewYork NY USA 2nd edition 2003

[14] L Lipsky Queueing Theory A Linear Algebraic ApproachSpringer New York NY USA 2nd edition 2009

[15] D Gross and C M Harris Fundamentals of Queueing TheoryJohn Wiley amp Sons New York NY USA 1998

[16] P J Smith A Firag P A Dmochowski and M Shafi ldquoAnalysisof the MMNN queue with two types of arrival processapplications to future mobile radio systemsrdquo Journal of AppliedMathematics vol 2012 Article ID 123808 14 pages 2012

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

Journal of Applied Mathematics 3

Packetarrivals

120583

120582

Packetbuffer queue

Scheduler Packetdepartures

Figure 2 Data processing model for the queuing system without priority

120583120583 120583 120583120583 120583

120582 120582 120582 120582 120582 120582

middot middot middotmiddot middot middot i + 1i0 1 2

Figure 3 State diagram of birth-death process for queuing system without priority

119905119899 is the sequence of independent random variables written

as 119860(119905)

Definition 2 (serving distribution 119861(119905)) In the service pro-cess let the service time of data packet 119862

119899be ]119899 Assume that

the services of data packets are independent then V119899 is the

dependent sequence of random variables written as 119861(119905)

Definition 3 (arrival probability of data packet119901(119899)) Let119873(119905)be the number of data packets in a network node at time 119905 andlet 119901(119899) be the arrival probability of 119899 data packets in timeinterval (119905

1 1199052) then there is the relation

119901 (119899) = 119875 119873 (1199052) minus 119873 (119905

1) = 119899 (119905

2gt 1199051 119899 ge 0) (1)

Definition 4 (arrival rate of data packet 120582) An averagenumber of data packets arrive at a network node in unit timewhich reflects how fast the data packets arrive at a networknode 1120582 is just the average arrival time interval of datapackets

Definition 5 (service rate of network node 120583) An averagenumber of served data packets depart from a network nodein unit time which reflects how fast the services are in thenetwork node 1120583 is just the average time of the data packetssevered in a network node

Definition 6 (service intensity 120588) The average service timeof each network node in unit time which is an importantindicator for measuring how busy the network nodes is 120588 =120582120583 0 le 120588 lt 1

In the real situation of wireless sensor network thedata packets arrive at sensor nodes continuously Thus thenumber of data packets is regarded as infinite For simplicitythe arrival times of data packets are assumed to followMM1queue model The input process of data packets that is thearrival times is similar to the Poisson stream with parameter120582 The arriving time interval 119860(119905) and service time 119861(119905)follow the negative exponential distribution with parameters120582 and 120583 respectively where the service window size is 1Based on the reasonable assumptions and the definitions on

queue theory mentioned above two queue system modelsnonpriority and priority models are analyzed and comparedas follows And therefore the high efficient queue model isproposed in this paper

4 Data Processing Model Based onNonpriority Queue System

As shown in Figure 2 the data packets enter the networknodes continuously and are lined up in a queue with theaverage arrival rate 120582 The data packets depart in turn fromthe queue and data services are scheduled in the scheduler atthe average processing rate 120583 The node state 119873 at time 119905 isdenoted as119873(119905) = (119894) where 119894 is the number of data packetsincluding the processing data packet that is the queue lengthIt is easy to be proved that 119873(119905) 119905 ge 0 is birth-death process[12ndash16]

Let 119901(119894 119905) = 119875119873(119905) = (119894) where 119901(119894) =

lim119905rarrinfin

119901(119894 119905) 119894 ge 0 Referring to Figure 3 if 120588 = 120582120583 lt 1the balance equations are as follows

120582119901 (0) = 120583119901 (1)

(120582 + 120583) 119901 (1) = 120582119901 (0) + 120583119901 (2)

(120582 + 120583) 119901 (2) = 120582119901 (1) + 120583119901 (3)

sdot sdot sdot

(120582 + 120583) 119901 (119894) = 120582119901 (119894 minus 1) + 120583119901 (119894 + 1)

(2)

Because there is suminfin119894=0119901(119894) = 1 and 119901(119894) = (1 minus 120588)120588119894 holds so

the average length of data packets in network node is

119876 =

infin

sum

119894=0

119894119901 (119894) =

infin

sum

119894=0

119894 (1 minus 120588) 120588119894

=120588

1 minus 120588(3)

And the average waiting queue length of data packets innetwork node is

119882 =

infin

sum

119894=0

119894119901 (119894 + 1) =

infin

sum

119894=0

119894 (1 minus 120588) 120588119894+1

=1205882

1 minus 120588(4)

4 Journal of Applied Mathematics

Packetarrival Classifier 120582

1205821

1205822

Packet buffer queuewith priority

Packet buffer queuewithout priority

Priorityjudge Scheduler Packet

forwarding

120583(1205831 1205832)

Figure 4 Data processing model for the queuing system with priority

1205821 1205821 1205822i minus 1 0 i 0 i + 1 0 i 1

1205831 12058311205832middot middot middotmiddot middot middot

(a) state (119894 0) as center

12058211205822 1205822

12058311205832 1205832middot middot middot0 j minus 1 0 j 0 j + 1 1 j

(b) State (0 119895) as center

1205822

1205832

1205821

1205831

middot middot middot middot middot middot0 1 0 0 1 0

(c) State (0 0) as center

1205821 12058211205822 1205822

1205831 1205831

middot middot middoti j minus 1 i minus 1 j i j i + 1 j i j + 1

(d) State (119894 119895) as center

Figure 5 State diagram of birth-death process for queuing system with priority

According to the Little theorem the average waiting time ofa data packet is expressed as

119879119908=119882

120582=

1205882

120582 (1 minus 120588)=

120588

120583 (1 minus 120588) (5)

And the average residence time of a data packet in networknode that is delay of a data packet is

119879119876= 119879119882+1

120583=

1

120583 (1 minus 120588)=

1

120583 minus 120582 (6)

And the delay jitter of a data packet in network node that isvariance of delay is

119869119876=

1

(120583 minus 120582)2 (7)

5 Data Processing Model ofQueue with Priority

In this model the data packets entering the network nodeare classified into two queues with different priorities at theaverage rates 120582

1and 120582

2by the classifier as shown in Figure 4

In the scheduler according to the service rule given by thepriority decision module the services are obtained at theaverage processing rates 120583

1and 120583

2 The priority decision

module decides the processing sequence of data packets forthe scheduler It employs the preemptive priority service rulewhich allows that the services of low-priority data packets areinterrupted and free up resource for serving the high-prioritydata packets The data packets with the same priority will beserviced according to the FCFS rule

The data packet with priority is denoted by C1 andthe data packet without priority is denoted by C2

The data packets C1 and C2 arrive at the network nodein independent Poisson distribution with the parameters1205821and 120582

2 respectively and their service times follow the

negative exponential distribution with the parameters 1205831

and 1205832 The system utilization is denoted by 120588 which is

the time rate of service busy That is the proportion of timethat the scheduler busies 120582 is the average arrival rate ofall data packets and 120583 is the average processing rate for alldata packets The relations between these parameters can beexpressed as 120582 = 120582

1+ 1205822 120588 = 120588

1+ 1205882 120588 = 120582120583 120588

1= 12058211205831

and 1205882= 12058221205832

The state of network node at time 119905 is denoted as 119873(119905) =(119894 119895) If the number of data packets C1 is 119894 and the number ofdata packets C2 is 119895 it is easy to prove that 119873(119905) 119905 ge 0 is thebirth-death process [12ndash16] The state diagram of birth-deathprocess for queuing systemwith priority is shown in Figure 5

Let

119901 (119894 119895 119905) = 119875 119873 (119905) = (119894 119895)

119901 (119894 119895) = lim119905rarrinfin

119901 (119894 119895 119905) 119894 119895 ge 0(8)

According to the states in Figure 5 if 120588 = 1205881+ 1205882= 12058211205831+

12058221205832le 1 then the following equations hold

(1205821+ 1205822) 119901 (0 0) = 120583

1119901 (1 0) + 120583

2119901 (0 1)

(1205821+ 1205822+ 1205831) 119901 (119894 0) = 120583

1119901 (119894 + 1 0)

+ 1205821119901 (119894 minus 1 0) 119894 gt 0

(1205821+ 1205822+ 1205832) 119901 (0 119895) = 120582

2119901 (0 119895 minus 1) + 120583

1119901 (1 119895)

+ 1205832119901 (0 119895 + 1) 119895 gt 0

Journal of Applied Mathematics 5

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW = 00040779 sResidence time curve TQ = 00091234 s

(a)

The queue length curve Q = 081201 s

Pack

et q

ueue

leng

th 15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 6 The curve of the time and queue length in the queuing model without priority

(1205821+ 1205822+ 1205831) 119901 (119894 119895) = 120582

1119901 (119894 minus 1 119895) + 120582

2119901 (119894 119895 minus 1)

+ 1205831119901 (119894 + 1 119895) 119894 119895 gt 0

(9)

The process of solving the equations (9) can be referredto [12ndash16] which solves 119901(119894 119895) through the inverse solvingmethod with the following generating function 120595(119906 119911)

120595 (119906 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881119906120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(10)

where 120596(119911) = (1205821

+ 1205831

+ 1205822(1 minus 119911) minus

radic[1205821+ 1205831+ 1205822(1 minus 119911)]

2

minus 412058211205831)21205821 The solution of

function 119901(119894 119895) is solved by the differential generatingfunction 120595(119906 119911) that is

119901 (119894 119895) =1

119894119895sdot120597119894+119895

120595(119906 119911)

120597119906119894120597119911119895

100381610038161003816100381610038161003816100381610038161003816119906=119911=0

(11)

Let the probabilities of 119894 C1 data packets and 119895 C2 datapackets in network node be 119901

119894∙and 119901

∙119895 respectively Their

probabilities of generating functions are 120595(119906 1) and 120595(1 119911)By formula (10) let 119911 rarr 1 using the LrsquoHospital Rule we

can get

120595 (119906 1) =1 minus 1205881

1 minus 1205881119906=

infin

sum

119894=0

(1 minus 1205881) 120588119894

1119906119894

(12)

Thus 119901119894∙= (1 minus 120588

1)120588119894

1 which is the same as the MM1 queue

system with only one kind of client As a result it shows thatthe existence of C2 data packets has no effect on the C1 datapackets which is in accord with the practical situation ofnetwork Similarly the average length of C1 data packet queueand the average length of C1 data packet waiting queue can begot as

1198761=

1205881

1 minus 1205881

1198821=

1205882

1

1 minus 1205881

(13)

The simulation curveThe theoretical curve

Service intensity 120588

0 01 02 03 04 05 06 07 08 09 1

20

18

16

14

12

10

8

6

4

2

0

The a

vera

ge w

aitin

g tim

e (s)

Figure 7 Theoretical and simulation curves of the average waitingtime in the queuing model without priority

And the average waiting time and average residence time ofsingle C1 data packet are

1198791198821

=1205881

1205831(1 minus 120588

1)

(14)

1198791198761

=1

1205831(1 minus 120588

1)=

1

1205831minus 1205821

(15)

The delay jitter of a C1 data packet in the network node thatis the delay variance is as follows

1198691198761

=1

(1205831minus 1205821)2 (16)

Then by formula (10) we get

120595 (1 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(17)

6 Journal of Applied Mathematics

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW1= 00020987 s

Residence time curve TQ1= 00050838 s

(a)

The queue length curve Q = 021762 s

Pack

et q

ueue

leng

th

15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 8 The curves of the time and queue length in the queuing model with priority

Derivate formula (17) by 119911 and then let 119911 = 1 the averagequeue length of C2 data packets can be deduced as

1198762=

infin

sum

119895=0

119895119901∙119895=

1205882

1 minus 1205881minus 1205882

[1 +12058321205881

1205831(1 minus 120588

1)] (18)

Thus the average residence time of a C2 data packet is

1198791198762

= 11987611198791198761

+1198762

1205822

=1205881

1205831(1 minus 120588

1)2+

1

1205832(1 minus 120588

1minus 1205882)[1 +

12058321205881

1205831(1 minus 120588

1)]

(19)

6 Simulation Experiments and Discussion

The proposed multitask schedule model can be used in manynetwork applications In coalmine there are many monitor-ing and information management systems for its safety andproduction which are the typical multitask wireless sensornetwork applications In this kind of monitoring systemsthe usual detecting period is 20 seconds and the numberof monitoring nodes is usually more than 200 Thus theproposed model applied in the gas warning system needs toprocess the data of thousands of sensor nodes Moreover thenetwork delay and processing time need to be considered inpractice applications

In this experiment we use the practical data from Huo-erxinhe CoalMine China which lay the gas warningwirelessnetwork with the same system structure as in Figure 1 Inthis network the backbone network is optical fiber Ethernetbased on which network is partitioned into many zones Ineach zone a number of wireless sensor nodes are evenly laidout Various monitoring data such as gas concentration COconcentration CO

2concentration and so on are detected in

real time by the sensor nodes These data will be collectedto the Sink node in the zone Subsequently all data aretransferred to the server by the sink nodes in each zoneThe transfer capability of Sink nodes is the bottleneck ofthe capability of the network system In the test data setfrom Huoerxinhe Coal Mine a Sink node is able to send200 UDP packets per second from which 90 UDP packetsarrive at the target node Each UDP packet contains 85 bytes

The parameters 120582 1205821 1205822 120583 1205831 and 120583

2in formula (6) (15)

and (19) are decided according to the field testIf the priority processing rule is not employed that is the

sink node employs the data processingmodel based on queuesystem without priority the 120582 = 90 packetss and 120583 = 200sAccording to formula (6) the average delay of each packet is91ms If the priority processing rule is employed that is thesink node employs the data processingmodel based on queuesystem with priority the data are distinguished with differentpriorities Taking the coal monitoring system as an examplethe gas concentration and monitoring control command arewith higher priority and others are with lower priority

According to the statistics the probability of C1 occur-rence is 010 and the probability of C2 occurrence is 090Meanwhile120583

1= 1205832= 200 packetss120582 = 90 packetss120582

1= 9

packetss and 1205822= 81 packetssThus according to formulas

(15) and (19) the average delay of C1 packets is 52ms and theaverage delay of C2 packets is 97ms

The theoretical analysis shows that compared with thedata processing model based on queue system withoutpriority the average delay of data packets processed with themodel based on queue system with priority is reduced upto 43 However the average delay of data packets withoutpriority is slightly reduced only 66

For observing the queue and service process of datapackets in network nodes with the proposed model we useMatLab to simulate the model The model parameters 120582 120582

1

1205822 120583 1205831 and 120583

2are set in accordance with the theoretical

analysis The simulation results are shown in Figures 67 8 and 9 which show the same results with theoreticalanalysis In fact operation practice of multitask wirelesssensor network inHuoerxinhe CoalMine also confirmed ourtheoretical analysis and simulation experiments

7 Conclusions

In this paper two data processing models with and withoutpriority are proposed for multitask wireless sensor networksThe proposed models are established from the MM1 queuemodel The average delay theory of data packets based onthe proposed models is also deduced The practical datafrom Huoerxinhe Coal Mine are used for testing the per-formances of the proposed two models applied in the coal

Journal of Applied Mathematics 7

The simulation curve without priorityThe simulation curve with priority

The a

vera

ge w

aitin

g tim

e (s)

Service intensity 120588

3

25

2

15

1

05

00 01 02 03 04 05 06 07

Figure 9 The curves of the average waiting time in the queuingmodels with priority and without priority

safety monitoring system which is a typical wireless sensornetwork application The simulation results show that theaverage delay of data packets processed with the proposedmodel is significantly reduced Compared with the averagedelay of data packets without priority the proposed modelcan be applied to the multitask wireless sensor networkharmonically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

Thiswork is supported by theNational Natural Science Foun-dation of China 61379100 and 61001108 Bagui scholarshipproject the Natural Science Foundation of Guangxi underGrant no 2011GXNSFA018154 and 2012GXNSFGA060003the Science and Technology Foundation of Guangxi underGrant no 10169-1 Guangxi Scientific Research Projectno 201012MS274 Funded Projects of Innovation Plan forGuangxi Graduate Education no gxun-chx2013t18 andGuangxi University for Nationalities Project no 2012QD017

References

[1] I F Akyildiz W Su Y Sankarasubramaniam and E CayircildquoWireless sensor networks a surveyrdquo Computer Networks vol38 no 4 pp 393ndash422 2002

[2] J Yick B Mukherjee and D Ghosal ldquoWireless sensor networksurveyrdquoComputerNetworks vol 52 no 12 pp 2292ndash2330 2008

[3] H-S Yin Z Liu J-S Qian K Zhang and J Wu ldquoQoS modelof multimedia integrated services digital network in coal minerdquoJournal of China University of Mining and Technology vol 39no 1 pp 109ndash115 2010

[4] M M R Mozumdar L Lavagno and L Vanzago ldquoA compari-son of software platforms for wireless sensor networks MAN-TIS TinyOS and ZigBeerdquo ACM Transactions on EmbeddedComputing Systems vol 8 no 2 pp 123ndash129 2009

[5] C Karlof and D Wagner ldquoSecure routing in wireless sensornetworks attacks and countermeasuresrdquo Ad Hoc Networks vol1 no 2-3 pp 293ndash315 2003

[6] J Ager and L Clare ldquoAn integrated architecture for cooperativesensing networksrdquo Computer vol 33 no 5 pp 106ndash108 2000

[7] N Nasser L Karim and T Taleb ldquoDynamic multilevel prioritypacket scheduling scheme for wireless sensor networkrdquo IEEETransactions on Wireless Communications vol 12 no 4 pp1448ndash1459 2013

[8] C Duffy U Roedig J Herbert and C J Sreenan ldquoAddingpreemption to TinyOSrdquo in Proceedings of the 4th Workshop onEmbedded Networked Sensors (EmNets rsquo07) pp 88ndash92 CorkIreland June 2007

[9] Y Zhao Q Wang W Wang D Jiang and Y Liu ldquoResearchon the priority-based soft real-time task scheduling in TinyOSrdquoin Proceedings of the International Conference on InformationTechnology and Computer Science (ITCS rsquo09) pp 562ndash565 KievUkraine July 2009

[10] M Yu S Xiahou and X Y Li ldquoA survey of studying ontask scheduling mechanism for TinyOSrdquo in Proceedings ofthe 4th International Conference on Wireless CommunicationsNetworking and Mobile Computing (WiCOM rsquo08) pp 1ndash4Dalian China October 2008

[11] K Mizanian R Hajisheykhi M Baharloo and A H JahangirldquoRACE a real-time scheduling policy and communicationarchitecture for large-scale wireless sensor networksrdquo in Pro-ceedings of the 7th Annual Communication Networks and Ser-vices Research Conference (CNSR rsquo09) pp 458ndash460 MonctonCanada May 2009

[12] J-S Qian H-S Yin X-R Liu GHua and Y-G Xu ldquoData pro-cessingmodel of coalmine gas early-warning systemrdquo Journal ofChina University of Mining and Technology vol 17 no 1 pp 20ndash24 2007

[13] S Asmussen Applied Probability and Queues Springer NewYork NY USA 2nd edition 2003

[14] L Lipsky Queueing Theory A Linear Algebraic ApproachSpringer New York NY USA 2nd edition 2009

[15] D Gross and C M Harris Fundamentals of Queueing TheoryJohn Wiley amp Sons New York NY USA 1998

[16] P J Smith A Firag P A Dmochowski and M Shafi ldquoAnalysisof the MMNN queue with two types of arrival processapplications to future mobile radio systemsrdquo Journal of AppliedMathematics vol 2012 Article ID 123808 14 pages 2012

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

4 Journal of Applied Mathematics

Packetarrival Classifier 120582

1205821

1205822

Packet buffer queuewith priority

Packet buffer queuewithout priority

Priorityjudge Scheduler Packet

forwarding

120583(1205831 1205832)

Figure 4 Data processing model for the queuing system with priority

1205821 1205821 1205822i minus 1 0 i 0 i + 1 0 i 1

1205831 12058311205832middot middot middotmiddot middot middot

(a) state (119894 0) as center

12058211205822 1205822

12058311205832 1205832middot middot middot0 j minus 1 0 j 0 j + 1 1 j

(b) State (0 119895) as center

1205822

1205832

1205821

1205831

middot middot middot middot middot middot0 1 0 0 1 0

(c) State (0 0) as center

1205821 12058211205822 1205822

1205831 1205831

middot middot middoti j minus 1 i minus 1 j i j i + 1 j i j + 1

(d) State (119894 119895) as center

Figure 5 State diagram of birth-death process for queuing system with priority

According to the Little theorem the average waiting time ofa data packet is expressed as

119879119908=119882

120582=

1205882

120582 (1 minus 120588)=

120588

120583 (1 minus 120588) (5)

And the average residence time of a data packet in networknode that is delay of a data packet is

119879119876= 119879119882+1

120583=

1

120583 (1 minus 120588)=

1

120583 minus 120582 (6)

And the delay jitter of a data packet in network node that isvariance of delay is

119869119876=

1

(120583 minus 120582)2 (7)

5 Data Processing Model ofQueue with Priority

In this model the data packets entering the network nodeare classified into two queues with different priorities at theaverage rates 120582

1and 120582

2by the classifier as shown in Figure 4

In the scheduler according to the service rule given by thepriority decision module the services are obtained at theaverage processing rates 120583

1and 120583

2 The priority decision

module decides the processing sequence of data packets forthe scheduler It employs the preemptive priority service rulewhich allows that the services of low-priority data packets areinterrupted and free up resource for serving the high-prioritydata packets The data packets with the same priority will beserviced according to the FCFS rule

The data packet with priority is denoted by C1 andthe data packet without priority is denoted by C2

The data packets C1 and C2 arrive at the network nodein independent Poisson distribution with the parameters1205821and 120582

2 respectively and their service times follow the

negative exponential distribution with the parameters 1205831

and 1205832 The system utilization is denoted by 120588 which is

the time rate of service busy That is the proportion of timethat the scheduler busies 120582 is the average arrival rate ofall data packets and 120583 is the average processing rate for alldata packets The relations between these parameters can beexpressed as 120582 = 120582

1+ 1205822 120588 = 120588

1+ 1205882 120588 = 120582120583 120588

1= 12058211205831

and 1205882= 12058221205832

The state of network node at time 119905 is denoted as 119873(119905) =(119894 119895) If the number of data packets C1 is 119894 and the number ofdata packets C2 is 119895 it is easy to prove that 119873(119905) 119905 ge 0 is thebirth-death process [12ndash16] The state diagram of birth-deathprocess for queuing systemwith priority is shown in Figure 5

Let

119901 (119894 119895 119905) = 119875 119873 (119905) = (119894 119895)

119901 (119894 119895) = lim119905rarrinfin

119901 (119894 119895 119905) 119894 119895 ge 0(8)

According to the states in Figure 5 if 120588 = 1205881+ 1205882= 12058211205831+

12058221205832le 1 then the following equations hold

(1205821+ 1205822) 119901 (0 0) = 120583

1119901 (1 0) + 120583

2119901 (0 1)

(1205821+ 1205822+ 1205831) 119901 (119894 0) = 120583

1119901 (119894 + 1 0)

+ 1205821119901 (119894 minus 1 0) 119894 gt 0

(1205821+ 1205822+ 1205832) 119901 (0 119895) = 120582

2119901 (0 119895 minus 1) + 120583

1119901 (1 119895)

+ 1205832119901 (0 119895 + 1) 119895 gt 0

Journal of Applied Mathematics 5

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW = 00040779 sResidence time curve TQ = 00091234 s

(a)

The queue length curve Q = 081201 s

Pack

et q

ueue

leng

th 15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 6 The curve of the time and queue length in the queuing model without priority

(1205821+ 1205822+ 1205831) 119901 (119894 119895) = 120582

1119901 (119894 minus 1 119895) + 120582

2119901 (119894 119895 minus 1)

+ 1205831119901 (119894 + 1 119895) 119894 119895 gt 0

(9)

The process of solving the equations (9) can be referredto [12ndash16] which solves 119901(119894 119895) through the inverse solvingmethod with the following generating function 120595(119906 119911)

120595 (119906 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881119906120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(10)

where 120596(119911) = (1205821

+ 1205831

+ 1205822(1 minus 119911) minus

radic[1205821+ 1205831+ 1205822(1 minus 119911)]

2

minus 412058211205831)21205821 The solution of

function 119901(119894 119895) is solved by the differential generatingfunction 120595(119906 119911) that is

119901 (119894 119895) =1

119894119895sdot120597119894+119895

120595(119906 119911)

120597119906119894120597119911119895

100381610038161003816100381610038161003816100381610038161003816119906=119911=0

(11)

Let the probabilities of 119894 C1 data packets and 119895 C2 datapackets in network node be 119901

119894∙and 119901

∙119895 respectively Their

probabilities of generating functions are 120595(119906 1) and 120595(1 119911)By formula (10) let 119911 rarr 1 using the LrsquoHospital Rule we

can get

120595 (119906 1) =1 minus 1205881

1 minus 1205881119906=

infin

sum

119894=0

(1 minus 1205881) 120588119894

1119906119894

(12)

Thus 119901119894∙= (1 minus 120588

1)120588119894

1 which is the same as the MM1 queue

system with only one kind of client As a result it shows thatthe existence of C2 data packets has no effect on the C1 datapackets which is in accord with the practical situation ofnetwork Similarly the average length of C1 data packet queueand the average length of C1 data packet waiting queue can begot as

1198761=

1205881

1 minus 1205881

1198821=

1205882

1

1 minus 1205881

(13)

The simulation curveThe theoretical curve

Service intensity 120588

0 01 02 03 04 05 06 07 08 09 1

20

18

16

14

12

10

8

6

4

2

0

The a

vera

ge w

aitin

g tim

e (s)

Figure 7 Theoretical and simulation curves of the average waitingtime in the queuing model without priority

And the average waiting time and average residence time ofsingle C1 data packet are

1198791198821

=1205881

1205831(1 minus 120588

1)

(14)

1198791198761

=1

1205831(1 minus 120588

1)=

1

1205831minus 1205821

(15)

The delay jitter of a C1 data packet in the network node thatis the delay variance is as follows

1198691198761

=1

(1205831minus 1205821)2 (16)

Then by formula (10) we get

120595 (1 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(17)

6 Journal of Applied Mathematics

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW1= 00020987 s

Residence time curve TQ1= 00050838 s

(a)

The queue length curve Q = 021762 s

Pack

et q

ueue

leng

th

15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 8 The curves of the time and queue length in the queuing model with priority

Derivate formula (17) by 119911 and then let 119911 = 1 the averagequeue length of C2 data packets can be deduced as

1198762=

infin

sum

119895=0

119895119901∙119895=

1205882

1 minus 1205881minus 1205882

[1 +12058321205881

1205831(1 minus 120588

1)] (18)

Thus the average residence time of a C2 data packet is

1198791198762

= 11987611198791198761

+1198762

1205822

=1205881

1205831(1 minus 120588

1)2+

1

1205832(1 minus 120588

1minus 1205882)[1 +

12058321205881

1205831(1 minus 120588

1)]

(19)

6 Simulation Experiments and Discussion

The proposed multitask schedule model can be used in manynetwork applications In coalmine there are many monitor-ing and information management systems for its safety andproduction which are the typical multitask wireless sensornetwork applications In this kind of monitoring systemsthe usual detecting period is 20 seconds and the numberof monitoring nodes is usually more than 200 Thus theproposed model applied in the gas warning system needs toprocess the data of thousands of sensor nodes Moreover thenetwork delay and processing time need to be considered inpractice applications

In this experiment we use the practical data from Huo-erxinhe CoalMine China which lay the gas warningwirelessnetwork with the same system structure as in Figure 1 Inthis network the backbone network is optical fiber Ethernetbased on which network is partitioned into many zones Ineach zone a number of wireless sensor nodes are evenly laidout Various monitoring data such as gas concentration COconcentration CO

2concentration and so on are detected in

real time by the sensor nodes These data will be collectedto the Sink node in the zone Subsequently all data aretransferred to the server by the sink nodes in each zoneThe transfer capability of Sink nodes is the bottleneck ofthe capability of the network system In the test data setfrom Huoerxinhe Coal Mine a Sink node is able to send200 UDP packets per second from which 90 UDP packetsarrive at the target node Each UDP packet contains 85 bytes

The parameters 120582 1205821 1205822 120583 1205831 and 120583

2in formula (6) (15)

and (19) are decided according to the field testIf the priority processing rule is not employed that is the

sink node employs the data processingmodel based on queuesystem without priority the 120582 = 90 packetss and 120583 = 200sAccording to formula (6) the average delay of each packet is91ms If the priority processing rule is employed that is thesink node employs the data processingmodel based on queuesystem with priority the data are distinguished with differentpriorities Taking the coal monitoring system as an examplethe gas concentration and monitoring control command arewith higher priority and others are with lower priority

According to the statistics the probability of C1 occur-rence is 010 and the probability of C2 occurrence is 090Meanwhile120583

1= 1205832= 200 packetss120582 = 90 packetss120582

1= 9

packetss and 1205822= 81 packetssThus according to formulas

(15) and (19) the average delay of C1 packets is 52ms and theaverage delay of C2 packets is 97ms

The theoretical analysis shows that compared with thedata processing model based on queue system withoutpriority the average delay of data packets processed with themodel based on queue system with priority is reduced upto 43 However the average delay of data packets withoutpriority is slightly reduced only 66

For observing the queue and service process of datapackets in network nodes with the proposed model we useMatLab to simulate the model The model parameters 120582 120582

1

1205822 120583 1205831 and 120583

2are set in accordance with the theoretical

analysis The simulation results are shown in Figures 67 8 and 9 which show the same results with theoreticalanalysis In fact operation practice of multitask wirelesssensor network inHuoerxinhe CoalMine also confirmed ourtheoretical analysis and simulation experiments

7 Conclusions

In this paper two data processing models with and withoutpriority are proposed for multitask wireless sensor networksThe proposed models are established from the MM1 queuemodel The average delay theory of data packets based onthe proposed models is also deduced The practical datafrom Huoerxinhe Coal Mine are used for testing the per-formances of the proposed two models applied in the coal

Journal of Applied Mathematics 7

The simulation curve without priorityThe simulation curve with priority

The a

vera

ge w

aitin

g tim

e (s)

Service intensity 120588

3

25

2

15

1

05

00 01 02 03 04 05 06 07

Figure 9 The curves of the average waiting time in the queuingmodels with priority and without priority

safety monitoring system which is a typical wireless sensornetwork application The simulation results show that theaverage delay of data packets processed with the proposedmodel is significantly reduced Compared with the averagedelay of data packets without priority the proposed modelcan be applied to the multitask wireless sensor networkharmonically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

Thiswork is supported by theNational Natural Science Foun-dation of China 61379100 and 61001108 Bagui scholarshipproject the Natural Science Foundation of Guangxi underGrant no 2011GXNSFA018154 and 2012GXNSFGA060003the Science and Technology Foundation of Guangxi underGrant no 10169-1 Guangxi Scientific Research Projectno 201012MS274 Funded Projects of Innovation Plan forGuangxi Graduate Education no gxun-chx2013t18 andGuangxi University for Nationalities Project no 2012QD017

References

[1] I F Akyildiz W Su Y Sankarasubramaniam and E CayircildquoWireless sensor networks a surveyrdquo Computer Networks vol38 no 4 pp 393ndash422 2002

[2] J Yick B Mukherjee and D Ghosal ldquoWireless sensor networksurveyrdquoComputerNetworks vol 52 no 12 pp 2292ndash2330 2008

[3] H-S Yin Z Liu J-S Qian K Zhang and J Wu ldquoQoS modelof multimedia integrated services digital network in coal minerdquoJournal of China University of Mining and Technology vol 39no 1 pp 109ndash115 2010

[4] M M R Mozumdar L Lavagno and L Vanzago ldquoA compari-son of software platforms for wireless sensor networks MAN-TIS TinyOS and ZigBeerdquo ACM Transactions on EmbeddedComputing Systems vol 8 no 2 pp 123ndash129 2009

[5] C Karlof and D Wagner ldquoSecure routing in wireless sensornetworks attacks and countermeasuresrdquo Ad Hoc Networks vol1 no 2-3 pp 293ndash315 2003

[6] J Ager and L Clare ldquoAn integrated architecture for cooperativesensing networksrdquo Computer vol 33 no 5 pp 106ndash108 2000

[7] N Nasser L Karim and T Taleb ldquoDynamic multilevel prioritypacket scheduling scheme for wireless sensor networkrdquo IEEETransactions on Wireless Communications vol 12 no 4 pp1448ndash1459 2013

[8] C Duffy U Roedig J Herbert and C J Sreenan ldquoAddingpreemption to TinyOSrdquo in Proceedings of the 4th Workshop onEmbedded Networked Sensors (EmNets rsquo07) pp 88ndash92 CorkIreland June 2007

[9] Y Zhao Q Wang W Wang D Jiang and Y Liu ldquoResearchon the priority-based soft real-time task scheduling in TinyOSrdquoin Proceedings of the International Conference on InformationTechnology and Computer Science (ITCS rsquo09) pp 562ndash565 KievUkraine July 2009

[10] M Yu S Xiahou and X Y Li ldquoA survey of studying ontask scheduling mechanism for TinyOSrdquo in Proceedings ofthe 4th International Conference on Wireless CommunicationsNetworking and Mobile Computing (WiCOM rsquo08) pp 1ndash4Dalian China October 2008

[11] K Mizanian R Hajisheykhi M Baharloo and A H JahangirldquoRACE a real-time scheduling policy and communicationarchitecture for large-scale wireless sensor networksrdquo in Pro-ceedings of the 7th Annual Communication Networks and Ser-vices Research Conference (CNSR rsquo09) pp 458ndash460 MonctonCanada May 2009

[12] J-S Qian H-S Yin X-R Liu GHua and Y-G Xu ldquoData pro-cessingmodel of coalmine gas early-warning systemrdquo Journal ofChina University of Mining and Technology vol 17 no 1 pp 20ndash24 2007

[13] S Asmussen Applied Probability and Queues Springer NewYork NY USA 2nd edition 2003

[14] L Lipsky Queueing Theory A Linear Algebraic ApproachSpringer New York NY USA 2nd edition 2009

[15] D Gross and C M Harris Fundamentals of Queueing TheoryJohn Wiley amp Sons New York NY USA 1998

[16] P J Smith A Firag P A Dmochowski and M Shafi ldquoAnalysisof the MMNN queue with two types of arrival processapplications to future mobile radio systemsrdquo Journal of AppliedMathematics vol 2012 Article ID 123808 14 pages 2012

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

Journal of Applied Mathematics 5

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW = 00040779 sResidence time curve TQ = 00091234 s

(a)

The queue length curve Q = 081201 s

Pack

et q

ueue

leng

th 15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 6 The curve of the time and queue length in the queuing model without priority

(1205821+ 1205822+ 1205831) 119901 (119894 119895) = 120582

1119901 (119894 minus 1 119895) + 120582

2119901 (119894 119895 minus 1)

+ 1205831119901 (119894 + 1 119895) 119894 119895 gt 0

(9)

The process of solving the equations (9) can be referredto [12ndash16] which solves 119901(119894 119895) through the inverse solvingmethod with the following generating function 120595(119906 119911)

120595 (119906 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881119906120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(10)

where 120596(119911) = (1205821

+ 1205831

+ 1205822(1 minus 119911) minus

radic[1205821+ 1205831+ 1205822(1 minus 119911)]

2

minus 412058211205831)21205821 The solution of

function 119901(119894 119895) is solved by the differential generatingfunction 120595(119906 119911) that is

119901 (119894 119895) =1

119894119895sdot120597119894+119895

120595(119906 119911)

120597119906119894120597119911119895

100381610038161003816100381610038161003816100381610038161003816119906=119911=0

(11)

Let the probabilities of 119894 C1 data packets and 119895 C2 datapackets in network node be 119901

119894∙and 119901

∙119895 respectively Their

probabilities of generating functions are 120595(119906 1) and 120595(1 119911)By formula (10) let 119911 rarr 1 using the LrsquoHospital Rule we

can get

120595 (119906 1) =1 minus 1205881

1 minus 1205881119906=

infin

sum

119894=0

(1 minus 1205881) 120588119894

1119906119894

(12)

Thus 119901119894∙= (1 minus 120588

1)120588119894

1 which is the same as the MM1 queue

system with only one kind of client As a result it shows thatthe existence of C2 data packets has no effect on the C1 datapackets which is in accord with the practical situation ofnetwork Similarly the average length of C1 data packet queueand the average length of C1 data packet waiting queue can begot as

1198761=

1205881

1 minus 1205881

1198821=

1205882

1

1 minus 1205881

(13)

The simulation curveThe theoretical curve

Service intensity 120588

0 01 02 03 04 05 06 07 08 09 1

20

18

16

14

12

10

8

6

4

2

0

The a

vera

ge w

aitin

g tim

e (s)

Figure 7 Theoretical and simulation curves of the average waitingtime in the queuing model without priority

And the average waiting time and average residence time ofsingle C1 data packet are

1198791198821

=1205881

1205831(1 minus 120588

1)

(14)

1198791198761

=1

1205831(1 minus 120588

1)=

1

1205831minus 1205821

(15)

The delay jitter of a C1 data packet in the network node thatis the delay variance is as follows

1198691198761

=1

(1205831minus 1205821)2 (16)

Then by formula (10) we get

120595 (1 119911)

=(1 minus 120588

1minus 1205882) (1 minus 119911) 120596 (119911)

[1205881120596 (119911) minus 1] (120583

11205832) [1 minus 120596 (119911)] 119911 minus (1 minus 119911) 120596 (119911)

(17)

6 Journal of Applied Mathematics

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW1= 00020987 s

Residence time curve TQ1= 00050838 s

(a)

The queue length curve Q = 021762 s

Pack

et q

ueue

leng

th

15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 8 The curves of the time and queue length in the queuing model with priority

Derivate formula (17) by 119911 and then let 119911 = 1 the averagequeue length of C2 data packets can be deduced as

1198762=

infin

sum

119895=0

119895119901∙119895=

1205882

1 minus 1205881minus 1205882

[1 +12058321205881

1205831(1 minus 120588

1)] (18)

Thus the average residence time of a C2 data packet is

1198791198762

= 11987611198791198761

+1198762

1205822

=1205881

1205831(1 minus 120588

1)2+

1

1205832(1 minus 120588

1minus 1205882)[1 +

12058321205881

1205831(1 minus 120588

1)]

(19)

6 Simulation Experiments and Discussion

The proposed multitask schedule model can be used in manynetwork applications In coalmine there are many monitor-ing and information management systems for its safety andproduction which are the typical multitask wireless sensornetwork applications In this kind of monitoring systemsthe usual detecting period is 20 seconds and the numberof monitoring nodes is usually more than 200 Thus theproposed model applied in the gas warning system needs toprocess the data of thousands of sensor nodes Moreover thenetwork delay and processing time need to be considered inpractice applications

In this experiment we use the practical data from Huo-erxinhe CoalMine China which lay the gas warningwirelessnetwork with the same system structure as in Figure 1 Inthis network the backbone network is optical fiber Ethernetbased on which network is partitioned into many zones Ineach zone a number of wireless sensor nodes are evenly laidout Various monitoring data such as gas concentration COconcentration CO

2concentration and so on are detected in

real time by the sensor nodes These data will be collectedto the Sink node in the zone Subsequently all data aretransferred to the server by the sink nodes in each zoneThe transfer capability of Sink nodes is the bottleneck ofthe capability of the network system In the test data setfrom Huoerxinhe Coal Mine a Sink node is able to send200 UDP packets per second from which 90 UDP packetsarrive at the target node Each UDP packet contains 85 bytes

The parameters 120582 1205821 1205822 120583 1205831 and 120583

2in formula (6) (15)

and (19) are decided according to the field testIf the priority processing rule is not employed that is the

sink node employs the data processingmodel based on queuesystem without priority the 120582 = 90 packetss and 120583 = 200sAccording to formula (6) the average delay of each packet is91ms If the priority processing rule is employed that is thesink node employs the data processingmodel based on queuesystem with priority the data are distinguished with differentpriorities Taking the coal monitoring system as an examplethe gas concentration and monitoring control command arewith higher priority and others are with lower priority

According to the statistics the probability of C1 occur-rence is 010 and the probability of C2 occurrence is 090Meanwhile120583

1= 1205832= 200 packetss120582 = 90 packetss120582

1= 9

packetss and 1205822= 81 packetssThus according to formulas

(15) and (19) the average delay of C1 packets is 52ms and theaverage delay of C2 packets is 97ms

The theoretical analysis shows that compared with thedata processing model based on queue system withoutpriority the average delay of data packets processed with themodel based on queue system with priority is reduced upto 43 However the average delay of data packets withoutpriority is slightly reduced only 66

For observing the queue and service process of datapackets in network nodes with the proposed model we useMatLab to simulate the model The model parameters 120582 120582

1

1205822 120583 1205831 and 120583

2are set in accordance with the theoretical

analysis The simulation results are shown in Figures 67 8 and 9 which show the same results with theoreticalanalysis In fact operation practice of multitask wirelesssensor network inHuoerxinhe CoalMine also confirmed ourtheoretical analysis and simulation experiments

7 Conclusions

In this paper two data processing models with and withoutpriority are proposed for multitask wireless sensor networksThe proposed models are established from the MM1 queuemodel The average delay theory of data packets based onthe proposed models is also deduced The practical datafrom Huoerxinhe Coal Mine are used for testing the per-formances of the proposed two models applied in the coal

Journal of Applied Mathematics 7

The simulation curve without priorityThe simulation curve with priority

The a

vera

ge w

aitin

g tim

e (s)

Service intensity 120588

3

25

2

15

1

05

00 01 02 03 04 05 06 07

Figure 9 The curves of the average waiting time in the queuingmodels with priority and without priority

safety monitoring system which is a typical wireless sensornetwork application The simulation results show that theaverage delay of data packets processed with the proposedmodel is significantly reduced Compared with the averagedelay of data packets without priority the proposed modelcan be applied to the multitask wireless sensor networkharmonically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

Thiswork is supported by theNational Natural Science Foun-dation of China 61379100 and 61001108 Bagui scholarshipproject the Natural Science Foundation of Guangxi underGrant no 2011GXNSFA018154 and 2012GXNSFGA060003the Science and Technology Foundation of Guangxi underGrant no 10169-1 Guangxi Scientific Research Projectno 201012MS274 Funded Projects of Innovation Plan forGuangxi Graduate Education no gxun-chx2013t18 andGuangxi University for Nationalities Project no 2012QD017

References

[1] I F Akyildiz W Su Y Sankarasubramaniam and E CayircildquoWireless sensor networks a surveyrdquo Computer Networks vol38 no 4 pp 393ndash422 2002

[2] J Yick B Mukherjee and D Ghosal ldquoWireless sensor networksurveyrdquoComputerNetworks vol 52 no 12 pp 2292ndash2330 2008

[3] H-S Yin Z Liu J-S Qian K Zhang and J Wu ldquoQoS modelof multimedia integrated services digital network in coal minerdquoJournal of China University of Mining and Technology vol 39no 1 pp 109ndash115 2010

[4] M M R Mozumdar L Lavagno and L Vanzago ldquoA compari-son of software platforms for wireless sensor networks MAN-TIS TinyOS and ZigBeerdquo ACM Transactions on EmbeddedComputing Systems vol 8 no 2 pp 123ndash129 2009

[5] C Karlof and D Wagner ldquoSecure routing in wireless sensornetworks attacks and countermeasuresrdquo Ad Hoc Networks vol1 no 2-3 pp 293ndash315 2003

[6] J Ager and L Clare ldquoAn integrated architecture for cooperativesensing networksrdquo Computer vol 33 no 5 pp 106ndash108 2000

[7] N Nasser L Karim and T Taleb ldquoDynamic multilevel prioritypacket scheduling scheme for wireless sensor networkrdquo IEEETransactions on Wireless Communications vol 12 no 4 pp1448ndash1459 2013

[8] C Duffy U Roedig J Herbert and C J Sreenan ldquoAddingpreemption to TinyOSrdquo in Proceedings of the 4th Workshop onEmbedded Networked Sensors (EmNets rsquo07) pp 88ndash92 CorkIreland June 2007

[9] Y Zhao Q Wang W Wang D Jiang and Y Liu ldquoResearchon the priority-based soft real-time task scheduling in TinyOSrdquoin Proceedings of the International Conference on InformationTechnology and Computer Science (ITCS rsquo09) pp 562ndash565 KievUkraine July 2009

[10] M Yu S Xiahou and X Y Li ldquoA survey of studying ontask scheduling mechanism for TinyOSrdquo in Proceedings ofthe 4th International Conference on Wireless CommunicationsNetworking and Mobile Computing (WiCOM rsquo08) pp 1ndash4Dalian China October 2008

[11] K Mizanian R Hajisheykhi M Baharloo and A H JahangirldquoRACE a real-time scheduling policy and communicationarchitecture for large-scale wireless sensor networksrdquo in Pro-ceedings of the 7th Annual Communication Networks and Ser-vices Research Conference (CNSR rsquo09) pp 458ndash460 MonctonCanada May 2009

[12] J-S Qian H-S Yin X-R Liu GHua and Y-G Xu ldquoData pro-cessingmodel of coalmine gas early-warning systemrdquo Journal ofChina University of Mining and Technology vol 17 no 1 pp 20ndash24 2007

[13] S Asmussen Applied Probability and Queues Springer NewYork NY USA 2nd edition 2003

[14] L Lipsky Queueing Theory A Linear Algebraic ApproachSpringer New York NY USA 2nd edition 2009

[15] D Gross and C M Harris Fundamentals of Queueing TheoryJohn Wiley amp Sons New York NY USA 1998

[16] P J Smith A Firag P A Dmochowski and M Shafi ldquoAnalysisof the MMNN queue with two types of arrival processapplications to future mobile radio systemsrdquo Journal of AppliedMathematics vol 2012 Article ID 123808 14 pages 2012

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

6 Journal of Applied Mathematics

008

006

004

002

00 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

The number of packets

Tim

et(s

)

Wait time curve TW1= 00020987 s

Residence time curve TQ1= 00050838 s

(a)

The queue length curve Q = 021762 s

Pack

et q

ueue

leng

th

15

10

5

00 20 40 60 80 100 120

Time t (s)

(b)

Figure 8 The curves of the time and queue length in the queuing model with priority

Derivate formula (17) by 119911 and then let 119911 = 1 the averagequeue length of C2 data packets can be deduced as

1198762=

infin

sum

119895=0

119895119901∙119895=

1205882

1 minus 1205881minus 1205882

[1 +12058321205881

1205831(1 minus 120588

1)] (18)

Thus the average residence time of a C2 data packet is

1198791198762

= 11987611198791198761

+1198762

1205822

=1205881

1205831(1 minus 120588

1)2+

1

1205832(1 minus 120588

1minus 1205882)[1 +

12058321205881

1205831(1 minus 120588

1)]

(19)

6 Simulation Experiments and Discussion

The proposed multitask schedule model can be used in manynetwork applications In coalmine there are many monitor-ing and information management systems for its safety andproduction which are the typical multitask wireless sensornetwork applications In this kind of monitoring systemsthe usual detecting period is 20 seconds and the numberof monitoring nodes is usually more than 200 Thus theproposed model applied in the gas warning system needs toprocess the data of thousands of sensor nodes Moreover thenetwork delay and processing time need to be considered inpractice applications

In this experiment we use the practical data from Huo-erxinhe CoalMine China which lay the gas warningwirelessnetwork with the same system structure as in Figure 1 Inthis network the backbone network is optical fiber Ethernetbased on which network is partitioned into many zones Ineach zone a number of wireless sensor nodes are evenly laidout Various monitoring data such as gas concentration COconcentration CO

2concentration and so on are detected in

real time by the sensor nodes These data will be collectedto the Sink node in the zone Subsequently all data aretransferred to the server by the sink nodes in each zoneThe transfer capability of Sink nodes is the bottleneck ofthe capability of the network system In the test data setfrom Huoerxinhe Coal Mine a Sink node is able to send200 UDP packets per second from which 90 UDP packetsarrive at the target node Each UDP packet contains 85 bytes

The parameters 120582 1205821 1205822 120583 1205831 and 120583

2in formula (6) (15)

and (19) are decided according to the field testIf the priority processing rule is not employed that is the

sink node employs the data processingmodel based on queuesystem without priority the 120582 = 90 packetss and 120583 = 200sAccording to formula (6) the average delay of each packet is91ms If the priority processing rule is employed that is thesink node employs the data processingmodel based on queuesystem with priority the data are distinguished with differentpriorities Taking the coal monitoring system as an examplethe gas concentration and monitoring control command arewith higher priority and others are with lower priority

According to the statistics the probability of C1 occur-rence is 010 and the probability of C2 occurrence is 090Meanwhile120583

1= 1205832= 200 packetss120582 = 90 packetss120582

1= 9

packetss and 1205822= 81 packetssThus according to formulas

(15) and (19) the average delay of C1 packets is 52ms and theaverage delay of C2 packets is 97ms

The theoretical analysis shows that compared with thedata processing model based on queue system withoutpriority the average delay of data packets processed with themodel based on queue system with priority is reduced upto 43 However the average delay of data packets withoutpriority is slightly reduced only 66

For observing the queue and service process of datapackets in network nodes with the proposed model we useMatLab to simulate the model The model parameters 120582 120582

1

1205822 120583 1205831 and 120583

2are set in accordance with the theoretical

analysis The simulation results are shown in Figures 67 8 and 9 which show the same results with theoreticalanalysis In fact operation practice of multitask wirelesssensor network inHuoerxinhe CoalMine also confirmed ourtheoretical analysis and simulation experiments

7 Conclusions

In this paper two data processing models with and withoutpriority are proposed for multitask wireless sensor networksThe proposed models are established from the MM1 queuemodel The average delay theory of data packets based onthe proposed models is also deduced The practical datafrom Huoerxinhe Coal Mine are used for testing the per-formances of the proposed two models applied in the coal

Journal of Applied Mathematics 7

The simulation curve without priorityThe simulation curve with priority

The a

vera

ge w

aitin

g tim

e (s)

Service intensity 120588

3

25

2

15

1

05

00 01 02 03 04 05 06 07

Figure 9 The curves of the average waiting time in the queuingmodels with priority and without priority

safety monitoring system which is a typical wireless sensornetwork application The simulation results show that theaverage delay of data packets processed with the proposedmodel is significantly reduced Compared with the averagedelay of data packets without priority the proposed modelcan be applied to the multitask wireless sensor networkharmonically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

Thiswork is supported by theNational Natural Science Foun-dation of China 61379100 and 61001108 Bagui scholarshipproject the Natural Science Foundation of Guangxi underGrant no 2011GXNSFA018154 and 2012GXNSFGA060003the Science and Technology Foundation of Guangxi underGrant no 10169-1 Guangxi Scientific Research Projectno 201012MS274 Funded Projects of Innovation Plan forGuangxi Graduate Education no gxun-chx2013t18 andGuangxi University for Nationalities Project no 2012QD017

References

[1] I F Akyildiz W Su Y Sankarasubramaniam and E CayircildquoWireless sensor networks a surveyrdquo Computer Networks vol38 no 4 pp 393ndash422 2002

[2] J Yick B Mukherjee and D Ghosal ldquoWireless sensor networksurveyrdquoComputerNetworks vol 52 no 12 pp 2292ndash2330 2008

[3] H-S Yin Z Liu J-S Qian K Zhang and J Wu ldquoQoS modelof multimedia integrated services digital network in coal minerdquoJournal of China University of Mining and Technology vol 39no 1 pp 109ndash115 2010

[4] M M R Mozumdar L Lavagno and L Vanzago ldquoA compari-son of software platforms for wireless sensor networks MAN-TIS TinyOS and ZigBeerdquo ACM Transactions on EmbeddedComputing Systems vol 8 no 2 pp 123ndash129 2009

[5] C Karlof and D Wagner ldquoSecure routing in wireless sensornetworks attacks and countermeasuresrdquo Ad Hoc Networks vol1 no 2-3 pp 293ndash315 2003

[6] J Ager and L Clare ldquoAn integrated architecture for cooperativesensing networksrdquo Computer vol 33 no 5 pp 106ndash108 2000

[7] N Nasser L Karim and T Taleb ldquoDynamic multilevel prioritypacket scheduling scheme for wireless sensor networkrdquo IEEETransactions on Wireless Communications vol 12 no 4 pp1448ndash1459 2013

[8] C Duffy U Roedig J Herbert and C J Sreenan ldquoAddingpreemption to TinyOSrdquo in Proceedings of the 4th Workshop onEmbedded Networked Sensors (EmNets rsquo07) pp 88ndash92 CorkIreland June 2007

[9] Y Zhao Q Wang W Wang D Jiang and Y Liu ldquoResearchon the priority-based soft real-time task scheduling in TinyOSrdquoin Proceedings of the International Conference on InformationTechnology and Computer Science (ITCS rsquo09) pp 562ndash565 KievUkraine July 2009

[10] M Yu S Xiahou and X Y Li ldquoA survey of studying ontask scheduling mechanism for TinyOSrdquo in Proceedings ofthe 4th International Conference on Wireless CommunicationsNetworking and Mobile Computing (WiCOM rsquo08) pp 1ndash4Dalian China October 2008

[11] K Mizanian R Hajisheykhi M Baharloo and A H JahangirldquoRACE a real-time scheduling policy and communicationarchitecture for large-scale wireless sensor networksrdquo in Pro-ceedings of the 7th Annual Communication Networks and Ser-vices Research Conference (CNSR rsquo09) pp 458ndash460 MonctonCanada May 2009

[12] J-S Qian H-S Yin X-R Liu GHua and Y-G Xu ldquoData pro-cessingmodel of coalmine gas early-warning systemrdquo Journal ofChina University of Mining and Technology vol 17 no 1 pp 20ndash24 2007

[13] S Asmussen Applied Probability and Queues Springer NewYork NY USA 2nd edition 2003

[14] L Lipsky Queueing Theory A Linear Algebraic ApproachSpringer New York NY USA 2nd edition 2009

[15] D Gross and C M Harris Fundamentals of Queueing TheoryJohn Wiley amp Sons New York NY USA 1998

[16] P J Smith A Firag P A Dmochowski and M Shafi ldquoAnalysisof the MMNN queue with two types of arrival processapplications to future mobile radio systemsrdquo Journal of AppliedMathematics vol 2012 Article ID 123808 14 pages 2012

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

Journal of Applied Mathematics 7

The simulation curve without priorityThe simulation curve with priority

The a

vera

ge w

aitin

g tim

e (s)

Service intensity 120588

3

25

2

15

1

05

00 01 02 03 04 05 06 07

Figure 9 The curves of the average waiting time in the queuingmodels with priority and without priority

safety monitoring system which is a typical wireless sensornetwork application The simulation results show that theaverage delay of data packets processed with the proposedmodel is significantly reduced Compared with the averagedelay of data packets without priority the proposed modelcan be applied to the multitask wireless sensor networkharmonically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

Thiswork is supported by theNational Natural Science Foun-dation of China 61379100 and 61001108 Bagui scholarshipproject the Natural Science Foundation of Guangxi underGrant no 2011GXNSFA018154 and 2012GXNSFGA060003the Science and Technology Foundation of Guangxi underGrant no 10169-1 Guangxi Scientific Research Projectno 201012MS274 Funded Projects of Innovation Plan forGuangxi Graduate Education no gxun-chx2013t18 andGuangxi University for Nationalities Project no 2012QD017

References

[1] I F Akyildiz W Su Y Sankarasubramaniam and E CayircildquoWireless sensor networks a surveyrdquo Computer Networks vol38 no 4 pp 393ndash422 2002

[2] J Yick B Mukherjee and D Ghosal ldquoWireless sensor networksurveyrdquoComputerNetworks vol 52 no 12 pp 2292ndash2330 2008

[3] H-S Yin Z Liu J-S Qian K Zhang and J Wu ldquoQoS modelof multimedia integrated services digital network in coal minerdquoJournal of China University of Mining and Technology vol 39no 1 pp 109ndash115 2010

[4] M M R Mozumdar L Lavagno and L Vanzago ldquoA compari-son of software platforms for wireless sensor networks MAN-TIS TinyOS and ZigBeerdquo ACM Transactions on EmbeddedComputing Systems vol 8 no 2 pp 123ndash129 2009

[5] C Karlof and D Wagner ldquoSecure routing in wireless sensornetworks attacks and countermeasuresrdquo Ad Hoc Networks vol1 no 2-3 pp 293ndash315 2003

[6] J Ager and L Clare ldquoAn integrated architecture for cooperativesensing networksrdquo Computer vol 33 no 5 pp 106ndash108 2000

[7] N Nasser L Karim and T Taleb ldquoDynamic multilevel prioritypacket scheduling scheme for wireless sensor networkrdquo IEEETransactions on Wireless Communications vol 12 no 4 pp1448ndash1459 2013

[8] C Duffy U Roedig J Herbert and C J Sreenan ldquoAddingpreemption to TinyOSrdquo in Proceedings of the 4th Workshop onEmbedded Networked Sensors (EmNets rsquo07) pp 88ndash92 CorkIreland June 2007

[9] Y Zhao Q Wang W Wang D Jiang and Y Liu ldquoResearchon the priority-based soft real-time task scheduling in TinyOSrdquoin Proceedings of the International Conference on InformationTechnology and Computer Science (ITCS rsquo09) pp 562ndash565 KievUkraine July 2009

[10] M Yu S Xiahou and X Y Li ldquoA survey of studying ontask scheduling mechanism for TinyOSrdquo in Proceedings ofthe 4th International Conference on Wireless CommunicationsNetworking and Mobile Computing (WiCOM rsquo08) pp 1ndash4Dalian China October 2008

[11] K Mizanian R Hajisheykhi M Baharloo and A H JahangirldquoRACE a real-time scheduling policy and communicationarchitecture for large-scale wireless sensor networksrdquo in Pro-ceedings of the 7th Annual Communication Networks and Ser-vices Research Conference (CNSR rsquo09) pp 458ndash460 MonctonCanada May 2009

[12] J-S Qian H-S Yin X-R Liu GHua and Y-G Xu ldquoData pro-cessingmodel of coalmine gas early-warning systemrdquo Journal ofChina University of Mining and Technology vol 17 no 1 pp 20ndash24 2007

[13] S Asmussen Applied Probability and Queues Springer NewYork NY USA 2nd edition 2003

[14] L Lipsky Queueing Theory A Linear Algebraic ApproachSpringer New York NY USA 2nd edition 2009

[15] D Gross and C M Harris Fundamentals of Queueing TheoryJohn Wiley amp Sons New York NY USA 1998

[16] P J Smith A Firag P A Dmochowski and M Shafi ldquoAnalysisof the MMNN queue with two types of arrival processapplications to future mobile radio systemsrdquo Journal of AppliedMathematics vol 2012 Article ID 123808 14 pages 2012

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Research Article An Efficient Multitask Scheduling Model ...downloads.hindawi.com/journals/jam/2014/969523.pdf · An Efficient Multitask Scheduling Model for Wireless Sensor Networks

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of