tag:blogger.com,1999:blog-6010073210891297879.post2370360451037507199..comments2023-09-03T03:30:40.979-07:00Comments on C and C++ Programs: Circular QueueLionelhttp://www.blogger.com/profile/11329883633967646018noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-6010073210891297879.post-9126869785365552422014-01-30T00:21:03.216-08:002014-01-30T00:21:03.216-08:00is it applicable in c++ ?
is it applicable in c++ ?<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-74999483767450078902012-03-04T14:47:36.096-08:002012-03-04T14:47:36.096-08:00its not 8 to be removed first, its seven, i think ...its not 8 to be removed first, its seven, i think your implementation is wrong.anth0ny989https://www.blogger.com/profile/07983906926484905785noreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-71239026610564898102012-01-28T10:52:36.894-08:002012-01-28T10:52:36.894-08:00check for the condition when front is moving as yo...check for the condition when front is moving as you pop and after that push elements until queue full conditon occurs, it ll b showing up a small mistake....Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-23609803067626614962011-10-03T11:01:32.534-07:002011-10-03T11:01:32.534-07:00Hello,
I have to build a Message Queue System for...Hello,<br /><br />I have to build a Message Queue System for the University, like Amazon SQS. Whe have n queues, p producers and q consumers. The idea: for example, we have 5 producers and 4 consumers for the queue 1. Messages are delivered from the queue to any consumer when they ask for them. On that moment, the message is setted as "unvisible" in order not to be transferred to other(s) consumer(s). Each consumer has x seconds to process the message. If that time is exceeded, the message is marked "visible" and re-enters to the head of the queue. If the message is processed before x seconds, it is deleted (the queue receives an ACK signal). Doing so, messages are never lost (system requirement).<br /><br />Messages are in plain text and others like pdf, xml, etc. But they are small (no longer than 100KB). MIME is suggested, and the use of meta-information. The programming language should be C, and should use UNIX domain sockets (Linux operating system). Also, there will be an administrator who will manage the queues (creation, destruction, etc), using other IPC protocols like pipes and/or signals<br /><br />My question is, what kind of implementation would you suggest for and why (linked list, circular buffer, etc)?<br /><br />Thanks,<br />Gabrielbolso103https://www.blogger.com/profile/05531258811525282007noreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-39721323893049364032011-10-01T07:27:11.617-07:002011-10-01T07:27:11.617-07:00i need more....i need more....VEBhttps://www.blogger.com/profile/02398780164179728778noreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-29031332625649432932011-09-06T09:44:13.800-07:002011-09-06T09:44:13.800-07:00nice bt plz post it in easy way so that i can unde...nice bt plz post it in easy way so that i can understand properly .....................arooj fatimanoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-70805064392480276922011-06-14T01:42:08.302-07:002011-06-14T01:42:08.302-07:00previous sorry .. how about J2ME programs are read...previous sorry .. how about J2ME programs are reading java / lang / nullpointer exception .. what it means .. please answer via email muhienj90@gmail.com.indrahttp://linux.blog.gunadarma.ac.idnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-27413804635196247452011-03-09T23:32:11.296-08:002011-03-09T23:32:11.296-08:00This could worked fine for me. You just have to r...This could worked fine for me. You just have to remember to make MAX equal to one more than you actually want the queue to be able to hold since there's always one unallocated slot.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-30060984963466803852010-12-29T04:49:30.167-08:002010-12-29T04:49:30.167-08:00i think it has no bug...consider f=r=0 nt pointing...i think it has no bug...consider f=r=0 nt pointing to queue n when R=1 it means 1 element has been inserted...so its fine this wayAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-6218207729695476252010-11-16T14:39:22.366-08:002010-11-16T14:39:22.366-08:00Do you keep always one slot unallocated?Do you keep always one slot unallocated?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-45650235193345896242010-04-28T01:41:03.475-07:002010-04-28T01:41:03.475-07:00well this algo has a very big bug..
make a queue ...well this algo has a very big bug..<br /><br />make a queue of size 3 and do this<br /><br />insert(1);<br />insert(2);<br />insert(3); - At this line it will say FULL, which is wrong..Tahir Rafhttp://softwaregadhagari.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-67934897615077667812009-11-01T03:32:44.274-08:002009-11-01T03:32:44.274-08:00not bad but comlexe i can solve it in easly way :P...not bad but comlexe i can solve it in easly way :P3afshikohttps://www.blogger.com/profile/01905797520132919119noreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-35933718946194948212009-10-17T07:22:18.073-07:002009-10-17T07:22:18.073-07:00at first typedef struct queue cqueue;
then
...at first typedef struct queue cqueue;<br /> then <br /> int isEmpty(cqueue * q){<br /> return(if(q->front==q->rear));<br /> }<br />will also work.<br />menu driven the program.<br />otherwise good.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-19880973087142179792009-08-15T01:44:40.174-07:002009-08-15T01:44:40.174-07:00Thank you so very much for the program on circular...Thank you so very much for the program on circular queue. It was of great help to me.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-30791271638924381512009-05-06T06:05:00.000-07:002009-05-06T06:05:00.000-07:00Askum,,,,
Thx ya artikelnya bermanfaat banget,,,,,...Askum,,,,<br />Thx ya artikelnya bermanfaat banget,,,,,<br />:)levygreen23https://www.blogger.com/profile/07664412766894346665noreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-62802181676163822142009-04-01T10:31:00.000-07:002009-04-01T10:31:00.000-07:00Yes,it's really...,really...too good........ ...Yes,it's really...,really...too good........<BR/> -G.P.SharmaAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6010073210891297879.post-68831646089775045972009-03-22T19:53:00.000-07:002009-03-22T19:53:00.000-07:00Nice job.Nice job.Anonymousnoreply@blogger.com