6opnetm m 1 queue

Upload: thang-tran

Post on 04-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 6opnetm m 1 Queue

    1/9

    M/M/1 Queue

    An M/M/1 queue consists of a first-in-first-out (FIFO) buffer with packets arriving

    rando!" according to a #oisson process$and a processor$ ca!!ed a server$ thatretrievespackets fro the buffer at a specified servicerate% In this !esson$ "ou wi!!

    e&p!ore the 'odeditor and how it can be used to create an M/M/1 queue% ou wi!!

    a!so*

    + ,se the #robe ditor to gather different t"pes of statistics%

    + earn how to app!" fi!ters to data gathered during siu!ation%

    + Matheatica!!" ana!".e the statistica! data fro the siu!ation%

    M/M/1 ueue Overview

    0o set up a new proect and scenario for this !esson*

    1) 2!ose an" e&isting proects%

    3) Open a new proect and a new scenario% 'ae the new proect _mm1net

    and the scenario 1%

    4) In the 5tartup 6i.ard$ c!ick uit% ou wi!! set up the scenario after the node ode!

    has been created%

    7) Fro the Fi!e enu$ choose 'ew$ then se!ect 'ode Mode! fro the pu!!-down !ist

    and c!ick O8%

    0he 'ode ditor opens as a new window%

    1) 2!ick on the Create Processoraction button%

    3) 2!ick in the workspace where "ou want the odu!e to be p!aced%

    A processor appears in the 'ode ditor workspace%

    4) 9ight-c!ick to end the operation%

    M/M/1 ueue 0he 'ode ditor0o set the odu!e:s attributes*

    1) 9ight-c!ick on the processor odu!e and se!ectEdit Attributesfro the processor:s

    Obect pop-up enu%

    3) 2hange the name attributeto src (for source) b" !eft-c!icking in the ;a!ue co!un$

    t"ping src$ then pressing 9eturn%

    4) 2hange the process ode! attribute to simple_source%

  • 8/13/2019 6opnetm m 1 Queue

    2/9

    =) 5e!ect exponentialfro theDistribution Namepop-up enu% 0his sets the

    interarriva! ties of generated packets to be e&ponentia!!" distributed$ as in a #oisson

    process%

    >) 5et theMean utcometo 1%? and c!ick O8% 0his sets the ean interarriva! tie of

    a packet to 1 second%

    @) 2hange thePacket !i"eattribute so that istribution 'ae is exponentialand

    Mean utcome is #$$$% 2!ose the 5pecification dia!og bo& b" c!icking O8% 0his sets

    the si.e of the generated packets to be e&ponentia!!" distributed with a ean si.e of

    B??? bits per packet%

    C) 2!ick O8 to c!ose the Attributes dia!og bo&%

    0he ne&t step is to create a queue odu!e that eu!ates both the

    infinite buffer and the server of the M/M/1 queue%

    1) 2!ick on the Create %ueue Moduleaction button$ and p!ace a queue odu!e to the

    right of the generator odu!e in the workspace%

    3) 9ight-c!ick to end the operation%

    4) 9ight-c!ick on the queue odu!e and se!ectEdit Attributesto bring up its

    attributes%

    7) 2hange the name attributeto &ueue%=) 2hange theprocess modelattribute to acb_'i'o(the reasoning behind this is

    discussed on the ne&t page)%

    >) Make sure the service_rateattribute is set to B>??$ then press 9eturn%

    @) 2!ick O8 to c!ose the dia!og bo&%

    For proper eor" anageent$ packets shou!d be destro"ed

    when the" are no !onger needed% For this task$ "ou can use a sink odu!e%

    1) 2!ick on the Create Processor Moduleaction button and p!ace

    a processor odu!e to the right of the queue odu!e$ as shown be!ow%

  • 8/13/2019 6opnetm m 1 Queue

    3/9

    3) 9ight-c!ick on the processor to open its

    Attributes dia!og bo&%

    4) 2hange the name attributeto sink%

    /M/1 ueue 0he 'ode ditor

    'ote here that the defau!t va!ue of the process modelattribute is sink%

    1) 2!ose the dia!og bo& b" c!icking on the O8 button%

    ueue 0he 'ode ditor

    'ow that a!! the odu!es to eu!ate the M/M/1 queue have been p!aced in the

    workspace and proper!" configured$ the" ust be connected via packet streas so

    that the packets can be transferred fro odu!e to odu!e%

    1) 2!ick on the 2reate #acket 5trea action button%

    3) 2onnect the src odu!e to the queue odu!e b" c!icking on the src icon$ then

    c!icking on the queue icon%

    4) 2onnect the queue odu!e with the sink odu!e b" c!icking on the queue icon$

    then c!icking on the sink icon% 9eeber to end the 2reate #acket 5trea operation

    b" right-c!icking%

    ou have finished creating the node odu!e and are read" to create the network

    ode!% First$ "ou shou!d save "our work*

  • 8/13/2019 6opnetm m 1 Queue

    4/9

    1) Fro the Fi!e enu$ choose!ave% 'ae the node

    _mm1$ then c!ick O8% 2!ose the 'ode ditor%M/M/1

    0he first step to creating the network ode! is to create a new obect pa!ette% In this

    wa"$ "ou can custoi.e the pa!ette to ho!d on!" the network obects "ou wi!! use to

    create the network ode!% 0o construct "our own obect pa!ette*

    1) 2!ick on the pen b(ect Paletteaction button%

    3) 2!ick on the Con'i)ure Palettebutton in the obect pa!ette%

    DD 0his brings up a nuber of options that a!!ow "ou to custoi.e "our pa!ette%

    4) 2!ick on theModel *ist radiobutton if it is not a!read" se!ected%

    7) 2!ick on the Clearbutton in the 2onfigure #a!ette dia!og bo&% 0his reoves a!!

    ode!s fro the pa!ette e&cept for the subnet icon$ which is a!wa"s present%

    =) 2!ick on theNode Modelsbutton to bring up the !ist of avai!ab!e node ode!s%

    /M/1 ueue 2reating the 'etwork

    >) 5cro!! in the tab!e unti! "ou find the _mm1node ode!% 2!ick in the

    5tatus co!un ne&t to Einitia!sD1 to change it fro not inc!uded to inc!uded%

    @) 2!ick O8 to c!ose the tab!e%

    DD 0he pa!ette now contains the icon for the new!"-inc!uded node ode!%

    C) 2!ick on the 5ave button in the 2onfigure #a!ette dia!og bo& to save the pa!ette

    configuration% nter the nae Einitia!sD1pa!ette at the propt and c!ick O8%

    0he pa!ette now contains the node ode! "ou created in theNode Model Editor+

    M/M/1 ueue 2reating the 'etwork

    B) 2!ick on the O8 button in the 2onfigure #a!ette dia!og bo& to c!ose the dia!og bo&$

    ending the pa!ette configuration operation% ou cannot se!ect an" of the icons in the

    pa!ette unti! the configuration operation is ended%e'ow that "ou have configured a

    custo pa!ette$ "ou can create the network ode!%

    1) 2!ick and drag the _mm1node ode! fro the obect pa!ette to the

  • 8/13/2019 6opnetm m 1 Queue

    5/9

    workspace% 9eeber to right-c!ick to end the operation%

    3) 9ight-c!ick on the node obect and se!ect!et Namefro the

    Obect pop-up enu%

    4) nter m1as the nae$ then c!ick O8%

    'ow that "ou have finished creating the node$ "ou need to set the statistics to co!!ect

    during siu!ation% In this !esson$ "ou wi!! use the #robe ditor (a!though "ou cou!d

    a!so use the 2hoose 9esu!ts option on the obect pop-up enu) to set the statistics%

    Gut first$ save "our network ode!*

    1) Fro the Fi!e enu$ choose!ave% 2!ick O8 to accept the

    e&isting nae _mm1net+M/M/1 ueue 2o!!ecting 9esu!ts with the #robe

    ditorM/M/1 ueue 2o!!ecting 9esu!ts with the #robe ditor

    For the M/M/1 queue$ there are severa! statistics to be co!!ected$

    inc!uding*

    + 0he average tie a packet is de!a"ed in the infinite buffer (queue de!a")%

    + 0he average nuber of packets that are in the queue (queue si.e$ in packets)%

    0hese two statistics are necessar" to answer the two priar" questions we have for

    this network ode!$ nae!"*

    + oes the average tie a packet waits in the queue e&ceed an acceptab!e !iitH For

    this tutoria!$ we wi!! sa" that the acceptab!e !iit is 1= seconds%

    + oes the queue si.e increase onotonica!!"$ or does it reach stead" stateH If the

    queue si.e does not reach stead" state$ that a" be an indication that the s"ste

    (especia!!" the server$ in this case) is over!oaded%

    For this !esson$ "ou wi!! use the #robe ditor to co!!ect queue de!a" and queue si.e

    statistics%M/1 ueue 2o!!ecting 9esu!ts with the #robe dit

    0he #robe ditor wi!! be used to co!!ect the queue si.e and queue de!a" statistics*

  • 8/13/2019 6opnetm m 1 Queue

    6/9

    1) Fro the Fi!e enu $chooseNe,$ then se!ectProbe Modeland c!ick O8%

    DD 0he #robe ditor opens%

    6hen using the #robe ditor to co!!ect statistics$ "ou ust specif" the network ode!

    fro which "ou wish to co!!ect statistics*

    1) Fro the Obects enu$ choose!et Net,ork Model+

    3) 2hoose the _mm1net-mm1network ode! fro the !ist of avai!ab!e

    ode!s%/M/1 ueue 2o!!ecting 9esu!ts with the #robe ditor

    'ow that the network ode! is set correct!"$ "ou need to set the probes% 0o set the

    queue de!a" probe*

    1) 2!ick on the Create Node !tatistic Probeaction button and a probe appears be!ow

    'ode 5tatistic #robe in the workspace%

    ou can either anua!!" t"pe in the attributes for the probe$ or "ou can use the

    autoatic se!ection ethod to set the attributes as fo!!ows*

    1) 9ight-c!ick on the probe and se!ect C.oose Probed b(ect fro the pop-up enu%

    3) 2!ick on the arrow ne&t to the 1 node to show its coponents%

    4) 2!ick on the queue odu!e in the node diagra%

    7) 2!ick O8 to disiss the dia!og bo&%

    =) 9ight c!ick on the probe and se!ectEdit Attributesfro the pop-up enu%

    >) 5et the nae attribute to %ueue Dela/+

    @) 5et thesubmoduleattribute to sub&ueue 0$+

    Instructions are continued on the ne&t page%

    C) eft-c!ick in the ;a!ue co!un of the statistic row%

    DD 0he Avai!ab!e 5tatistics dia!og bo& appears% 0his dia!og bo& !ists both the statistic

    and the group it be!ongs to%

    B) 5e!ect &ueue+&ueuin) dela/fro the !ist and c!ick O8%

    DD In the dit Attributes dia!og bo&$ the group attribute changes to queue and the

    statistic attribute changes to queuing de!a"%1?)2!ick O8 to c!ose the probe:s Attribute dia!og bo&%M/

  • 8/13/2019 6opnetm m 1 Queue

    7/9

    M/1 ueue 2o!!ecting 9esu!ts with the

    'e&t$ "ou need to specif" the reaining probe for queue si.e in packets%

    1) 2!ick on theCreate Node !tatistic Probeaction button%

    3) 9ight-c!ick on the new probe and se!ectEdit Attributes+2hange the attributes of

    the probe to the fo!!owing va!ues*

    4) 2!ick O8 to c!ose the probe:s Attribute dia!og bo&%

    DD 0he changes appear in the #robe ditor%

    'ow that "ou have set up the probes correct!" to co!!ect the desired statistics$ save the

    probe fi!e*

    1) Fro the Fi!e enu$ choose!ave% 'ae the fi!e _mm1probe+

    3) 2!ose the #robe ditor%

    'ow that "ou have created probes to co!!ect statistics during siu!ation$ "ou need to

    run the siu!ation% In the previous !esson$ "ou ran the siu!ation fro the #roect

    ditor% For this !esson$ "ou wi!! use the 5iu!ation 0oo!%

  • 8/13/2019 6opnetm m 1 Queue

    8/9

    1) In the #roect ditor$ choose Con'i)ure !imulation 2Advanced3fro the

    5iu!ation enu%

    DD 0he 5iu!ation 0oo! opens%

    3) 9ight-c!ick on the siu!ation set icon in the workspace and se!ect Edit Attributes+

    4) 5et the probe fi!e to _mm1probe4 the seedto 741$ and simulation

    durationto @ hours%

    7) 2!ick O8 when "ou are finished$ then c!ick on the &ecute 5iu!ation 5equence

    action button to begin the siu!ation% (ou can go on to the ne&t page whi!e the

    siu!ation runs%)%M/M/1 ueue ;iewing 9esu!ts epending on the speed of "our

    achine$ the siu!ation shou!d take !ess than a inute to cop!ete% 6hen the

    5iu!ation 5equence dia!og bo& shows that the siu!ation has cop!eted$ "ou can

    view the resu!ts co!!ected% In the first !esson$ "ou viewed the resu!ts ro "our

    siu!ation direct!" in the #roect ditor% ou can a!so use the Ana!"sis 0oo! to view

    resu!ts*

    1) Fro the #roect ditor:s Fi!e enu$ choosepen+

    3) Fro the pu!!-down enu in the Open dia!og bo&$ change the t"pe of fi!e to open

    toAnal/sis Con'i)uration$ then se!ect Einitia!sD1net-1 and c!ick O8%

    DD 0he Ana!"sis 0oo! opens as a new window in O#'0% 0he Ana!"sis 0oo! provides

    severa! features for viewing resu!ts that are not avai!ab!e in the #roect ditor%

    0he first statistic of interest is the ean queuing de!a"$ which

    shows the de!a" e&perienced b" packets in the queue during the siu!ation% 0o view

    the ean queuing de!a"*

    1) eft-c!ick on the create a )rap. o' a statisticaction button%

    DD 0he ;iew 9esu!ts dia!og bo& opens%

    3) In the ;iew 9esu!ts dia!og bo&$ !eft-c!ick on the fo!!owing hierarch" !eve!s* 5ile

    !tatistics6 _mm1net-mm16 b(ect !tatistics6 m16 &ueue6 sub&ueue 0$6

    &ueue+

    4) eft-c!ick on the queuing de!a" statistic%

    DD A check-ark appears in the bo& ne&t to the statistic nae%

  • 8/13/2019 6opnetm m 1 Queue

    9/9

    ueue ;iewing 9esu!ts

    7) Fro the pu!!-down !ist of fi!ters$ se!ect average%

    =) 2!ick on the 5how button (the graph is shown on the ne&t page)%M/M/1 ueue

    ;iewing 9esu!ts

    0he graph of the average queuing de!a" appears be!ow*

    0he !arge change ear!" in the siu!ation ref!ects the sensitivit" of

    averages to the re!ative!" sa!! nuber of sap!es co!!ected%

    0owards the end of the siu!ation$ the average stabi!i.es%