How to implement a M/M/1 queue in C++

Discussion in 'C++' started by martial, Jan 10, 2007.

  1. martial

    martial New Member

    Joined:
    Jan 9, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone:

    Can anyone help me how to implement a M/M/1 queue in C++?

    Thanks in advance for your help
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    I don't know what you want. A queue is a queue. The C++ STL has both a vector and deque. Your notation merely implies constraints on the arrival time, service time, and number of servers. Evaluating such a queue can be done either mathematically or by simulation.
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,345
    Likes Received:
    382
    Trophy Points:
    83
  4. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    The question is: is he trying to simulate the operation of such a queue, determine its characteristics mathematically, using C++, or just implement a single-server queue?
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,345
    Likes Received:
    382
    Trophy Points:
    83
    :confused:
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice