Email simulator Queue

Status
Not open for further replies.

moon5896

Estimable
Nov 10, 2014
2
0
4,510
0
Queues are commonly used in network systems. For example, e-mail is placed in queues while it is waiting to be sent and after it arrives at the recipient's mailbox. A problem occurs, however, if the outgoing mail processor cannot send one or more of the messages in the queue. For example, a message might not be sent because the recipient's system is not available. Write an e-mail simulator that processes mail at an average of 40 messages per minute. As mesages are recieved, they are placed in a queue. For the simulation, assume that the messages arrive at an average rate of 30 messages per minute. Remember, the messages must arrive randomly, so you will need to use a random number generator to determine when messages are recieved. Each minute, you can dequeue up to 40 messages and send them. Assume that 25% of the messages in the queue cannot be sent in any processing cycle. Again, you will need to use a random number to determine whether a given message can be sent. If it can't be sent, put it back at the end of the queue(enqueue it). Run the simulation for 24(simulated) hours, tracing the number of times each message had to be requeued. At the end of the simulation, print the statistics that show:
a. The total messages processed.
b. The average arrival rate.
c. The average number of messages sent per minute.
d. The average number of messages in the queue in a minute.
e. The number of messages send on the first attempt, the number sent on the second attempt, and so forth.
f. The average number of times messages had to be requeued (do not include the messages sent the first time in this average).

C programming source code..anyone help..
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
L Apps General Discussion 3
S Apps General Discussion 1
S Apps General Discussion 3
M Apps General Discussion 2
L Apps General Discussion 1
G Apps General Discussion 1
TechyInAZ Apps General Discussion 2
D Apps General Discussion 5
R Apps General Discussion 1
B Apps General Discussion 2
F Apps General Discussion 1
S Apps General Discussion 3
C Apps General Discussion 1
derridada Apps General Discussion 4
B Apps General Discussion 8
madmaxnxc Apps General Discussion 1
A Apps General Discussion 1
B Apps General Discussion 2
H Apps General Discussion 2
R Apps General Discussion 1

ASK THE COMMUNITY