DQS has got a producer, multiple queues and a consumer.
-
Producer reads requests from a socket and accomdates then into queues depeding on the delay value associated with each request.
-
A request is inserted into queue, if delay of request matches the delay of the queue. Otherwise, a new queue is created with the request's delay value.
-
Consumer accesses requests from these queues. If it consumes a request, its got to wait till delay seconds expire. Then only it is supposed the access the same queue again.
-
Open a terminal run,
sh run_dqs.sh - Waits for requests and performs DQS
-
Open another terminal run,
sh rand_req_gen.sh - Generates requests randomly and writes them to a queue
The consumption of requests for multiple queues is done! :)
- Optimizing DQS.
- Proper Makefiles.