it is really practical and useful for showing the process of message queue
@ShriramVasudevan2 жыл бұрын
Thanks and glad u liked
@techlearner63357 жыл бұрын
One of the best! I have searched for many, but this is the best! Hats off!
@amina15584 жыл бұрын
++++
@greymind00724 жыл бұрын
That's really amazing and one of the best lucid explanation and code walk through i ever seen on youtube for linux system programming. Your way to teaching is really amazing. Please Add the youtube tags for more reach and will help the youtube channel to grow. Thanks and best wishes for channel
@ShriramVasudevan4 жыл бұрын
Thanks bro. This is very encouraging
@RobertStineIsTheBest6 жыл бұрын
Bro, despite the fact that I was having pretty tough time understanding your accent (I am not a native English speaker either), your video helped me a ton. Thank you very much for the video !
@ShriramVasudevan6 жыл бұрын
Thanks Bro and yea accent is a problem when the country gets different bro. :)
@memorylanezz4 жыл бұрын
Thanks for the video. Very useful and straight forward by showing the code step by step. Thank you.
@ShriramVasudevan4 жыл бұрын
Thanks and glad you liked it
@vajjasunilkumar39472 жыл бұрын
Hello sir, your explanation is very clear for basic level. But my question is like if use this message quie along with multi threading various threads try need to get access to same message quie on that moment I can do all the procedure for every thread how to manage at that instance. I'm I know my question is a bit crazy but in real world this happens...
@sunandhinim60835 жыл бұрын
This is the best! Clear, Concise, Elegant!
@sukanya36344 жыл бұрын
wow...very clear explanation..
@ShriramVasudevan4 жыл бұрын
Thanks n glad you liked it
@a.t.venkateswarareddy7 жыл бұрын
very good content on message queues . thank you
@AbdulQadir-el4ql5 жыл бұрын
well teaching sir....
@ShriramVasudevan5 жыл бұрын
Thank you very much
@AbdulQadir-el4ql5 жыл бұрын
@@ShriramVasudevan sir please make lecture on socket programming and mutex
@ShriramVasudevan5 жыл бұрын
@@AbdulQadir-el4ql both done..pl check bro.
@AbdulQadir-el4ql5 жыл бұрын
@@ShriramVasudevan OK , I will check it ..thanks sir
@ShriramVasudevan5 жыл бұрын
@@AbdulQadir-el4ql thanks bro.
@profdurgahere90077 жыл бұрын
very good content on message queues
@divyas75164 жыл бұрын
Hi Bro. I tried the programs. But facing an issue, that receiver program gets a different messageId and seems due to which messages are not received. Can u please help
@divyas75164 жыл бұрын
Same works fine if I don't check the return of any of the calls. Also it works fine if there is no file exist for the pah mentione in ftok(path , 65)
@ShriramVasudevan4 жыл бұрын
Ftok can be done with any file but.. give appropriate path. Else it won work. Or.. give key value and try
@MSNarassima7 жыл бұрын
Logically explained
@imtiyazaaresh91757 жыл бұрын
thank you it's very useful to me
@ShriramVasudevan7 жыл бұрын
Thanks! :)
@arvindg5534 жыл бұрын
100% clear
@ShriramVasudevan4 жыл бұрын
Thanks
@technologyexcitesme88297 жыл бұрын
very useful sir.
@geethurohith5 жыл бұрын
Helped alott thnq 😊
@ShriramVasudevan5 жыл бұрын
Glad u liked.
@avishekdutta19014 жыл бұрын
Sir plzz make more videos on this topic or suggest some sources with examples
@ShriramVasudevan4 жыл бұрын
Kindly check the playlist linux system programming. You will find a lot.
@narasimhareddymv7486 жыл бұрын
Simply well said
@nareshpothula39665 жыл бұрын
Shriram, in the msgsend file to generate a key you used 3_msgsnd.c as 1st argument to ftok(); in the msgrcv file to generate a key you used msgsnd.c as 1st argument to ftok(); If that file is open successfully then key will be generated differently. if key is different how your message is delivered to another end ??
@darpanpatel24404 жыл бұрын
in this example , msgsend.c file you used 3_msgsend.c for a key (it can be any file ) and same file should be receiver end for validity purpose , but in msgrcv.c there is msgsnd.c file you have used ,
@ShriramVasudevan4 жыл бұрын
Key must be through the same file.. I mentioned it.. may be i could have recorded it later and edited.
@darpanpatel24404 жыл бұрын
@@ShriramVasudevan ok No problem ,that's why i was confused :) , by the way all videos are superb ✌
@ShriramVasudevan4 жыл бұрын
@@darpanpatel2440 thanks bro.
@msaravanaselvam128Ай бұрын
Is this code work on codeblocks?
@bezayitmeles1976 жыл бұрын
beautiful
@ShriramVasudevan5 жыл бұрын
@Bezayit Meles, Thank you and happy to know that you liked this!
@mekings04227 жыл бұрын
wonderful.. thanks very much. sir can you please post links to the codes you used here
@ed_conansayshi34646 жыл бұрын
helped a lot, thanks bro
@ShriramVasudevan6 жыл бұрын
Thanks bro. Good you liked.
@pranjalbankar88713 жыл бұрын
Thanks sir, I have one doubt, I kept the msg size 20 instead of 200 But still the program is not terminating What's the reason behind it
@ShriramVasudevan3 жыл бұрын
Buffer initiation error it could be
@pranjalbankar88713 жыл бұрын
@@ShriramVasudevan ohk sir thank you😇
@ShriramVasudevan3 жыл бұрын
@@pranjalbankar8871 welcome..hope the content was useful
@bobbyisk6 жыл бұрын
Very good explanation sir :) btw can i get the whole code of sending and receiving for the better understanding? Thank you very much
@ShriramVasudevan6 жыл бұрын
I have authored a book and blogs are there as well. But.. I wish you refer man page to learn. . if you need any help let me know
@vardhansanka47795 жыл бұрын
What is the difference between the two files 3_msgsnd and msgsnd sir? Just asking my doubt.
@ShriramVasudevan5 жыл бұрын
Both are same..i did the naming different. Nothing beyond :)
@vardhansanka47795 жыл бұрын
@@ShriramVasudevan Thanks for a fast reply sir. Can I know why you have used 3_msgsnd in msgsnd and only msgsnd in msgrcv program to generate a key. I am having a doubt that if two different files are used can we get the interprocess communication mechanism right or wrong ?
@ShriramVasudevan5 жыл бұрын
@@vardhansanka4779 key should be with the same file only. So, don't get confused..both sender and receiver must share the same key..
@ShriramVasudevan5 жыл бұрын
@@vardhansanka4779it's my pleasure helping you. :)
@vardhansanka47795 жыл бұрын
@@ShriramVasudevan sir, what that 0 in msgsnd(step-3) and 1,0 is msgrcv(step-3)meant for? Are they used for standard input and standard output purpose or anything else?
@prashanthkumar42225 жыл бұрын
nice one
@ShriramVasudevan5 жыл бұрын
Thank you. Good you liked it.
@seshadrinm4185 жыл бұрын
Nice one!!
@bkissa124 жыл бұрын
Please send the code in description too
@venkatsubbu28027 жыл бұрын
Tnqqqqq sir make a video on file locks
@chsaiman0j9615 жыл бұрын
where did u specify the receiver (who has to receive the sent message) in sender code? I'm sry if I'm asking u a wrong question, but I got this doubt.
@ShriramVasudevan5 жыл бұрын
Hi.. we need not specify explicitly. they share the same key and that's sufficient. Also.. you see the place where write and where we read.
@ShriramVasudevan5 жыл бұрын
And ...no question is silly. :)
@garimagupta22895 жыл бұрын
could you please tell any real life example where message queues are used? Thanks :)
@ShriramVasudevan5 жыл бұрын
Hello Garima.. it starts from the simple chat application you Develop. It can be used to send the messages in appropriate order.
@bhargavtupakula98963 жыл бұрын
please paste the code in description.
@ShriramVasudevan3 жыл бұрын
It's long code. You can take it from git. @shriramkv
@iamtechieforever6787 жыл бұрын
Useful, elegant!
@vaishnavamaruthi50817 жыл бұрын
thanku for very usefull
@mohitjoshi77225 жыл бұрын
Tutorial is really awesome.Can you please share file links…
@ShriramVasudevan5 жыл бұрын
Glad you liked. Shall share the link soon
@stiliyangoranov30156 жыл бұрын
thanks a lot!
@ShriramVasudevan6 жыл бұрын
Thanks and good you liked.
@neetabisht72716 жыл бұрын
Hi, could you please tell from where 3_msgrcv.c file came ?
@ShriramVasudevan6 жыл бұрын
That's just the file name..
@manjunathg82405 жыл бұрын
Sir please can you make a video on IPC DBUS. Create a client and server process, build the interface using fidl file. Try to communicate between client and server.
@ShriramVasudevan5 жыл бұрын
That's a cool suggestion. Install do that for sure. Give me some time.
@manjunathg82405 жыл бұрын
@@ShriramVasudevan Thank you sir. I will be waiting.. I asked for this coz now it's the most commonly used IPC especially for Infotainment domain. Which will be very helpful.
@alphaman37653 жыл бұрын
Sir,can you pls put the code in GitHub and post in the description
@ShriramVasudevan3 жыл бұрын
@shriramkv .. check in GIT
@eduardoalmeida81587 жыл бұрын
how can i do for the send to also receive and the receiver to also send just like and chat application /*its a work for college and im tottaly stuck please help :(*/
@alexandrahancu12317 жыл бұрын
you should use 2 message queues a=>b a
@killerthoughts61507 жыл бұрын
Very neat sir !
@wasimakram53715 жыл бұрын
Where I can get the file used in explanation ?
@rgriff295 жыл бұрын
See Chapter 45&46 from TLPI - Download the source code from TLPI www.man7.org/tlpi/code/index.html
@hanhpham-pl8yd7 жыл бұрын
please given link full project. !
@sakwiley196 жыл бұрын
Elegance!
@revathsaikiran62487 жыл бұрын
Sir I got an error in msgid isn't what is the problem
@ShriramVasudevan7 жыл бұрын
revath revath I need to know what is the error.. send me screen shot.
@yogeshasati68926 жыл бұрын
thankyou...
@mergimuka67757 жыл бұрын
When I execute "./snd and ./rcv" it says: key: No such file or directory
@ShriramVasudevan7 жыл бұрын
Mërgim Uka did you compile the file with gcc -o msgsnd filename.c
@mergimuka67757 жыл бұрын
Yes I did, but I am stucked on it. P.s I am beginner in Linux (Ubuntu)
@ShriramVasudevan7 жыл бұрын
I shall send u guidelines .. give me time
@mergimuka67757 жыл бұрын
Sure Shriram. Thanks for this awesome tutorial.
@ShriramVasudevan7 жыл бұрын
You need to the following steps: 1. Compile the file 1. gcc -o snd msgsnd.c 2. Compile the file 2 gcc -o rcv msgrcv.c 3. Open a new terminal. Go the path where you have stored the files. 4. Open another terminal as well with same path. 5. In terminal one do ./snd 6. in terminal 2 do ./rcv 7. It should work. if not let me know.
@vinuVA5 жыл бұрын
There's a huge bug on this program.. the msgid generated here shouldn't be equal = 0 , and also this process never ends as both loops for send and receive are indefinite.and also the queue is not cleared up anytime soon because of this loop. try this code instead: //msgsnd() program: int main() { int count =0; int msgid; int sndid; char w[4] = "EXIT"; //to exit the send operation anytime struct msgbuff{ long settype; char msgtxt[50]; }; struct msgbuff msg; //setting type msg.settype = 2; //MSG ID creation if((msgid = msgget((key_t)1253,0644|IPC_CREAT))==-1) //the IPC_CREAT should used only once. { perror("\KEY or MSGID NOT GENERATED "); return 0; } printf(" The msgid [SEND] : [%d] ",msgid); //THE RETURN VALUE OF MSGID SHOULDN'T BE
@rahulreddy99343 жыл бұрын
11:41 Thank you fork()s
@ShriramVasudevan3 жыл бұрын
:)
@marathisahityaparishad24463 жыл бұрын
It needs magnifier.
@ShriramVasudevan3 жыл бұрын
Codes :)
@atiqshaikh72456 жыл бұрын
nice tutorial sir sir,can u plz share source code thank you
@mittalkrishna9873 жыл бұрын
please attach the files
@abdulrehmankaimkhani98926 жыл бұрын
can you plz share code..?
@arshianozary44886 жыл бұрын
would you send me the codes?
@embeddedsystems10515 жыл бұрын
upload code also
@haneenqurt82707 жыл бұрын
i want the codes plz :'(
@ShriramVasudevan7 жыл бұрын
Haneen Qurt email.id ?
@haneenqurt82706 жыл бұрын
haneenqurt@gmail.com
@rajatjaiswal21596 жыл бұрын
Me too ID is rajat.19699@gmail.com
@pavanshinde81546 жыл бұрын
er.pavanshinde@gmail.com
@rohitkishore126 жыл бұрын
rohitkishore1243@outlook.com
@Someone_artist6 жыл бұрын
indentation nam ki cheez hoti hai
@rgriff295 жыл бұрын
Very good sir. Definitive examples in Chapter 45/46 of TLPI - download from www.man7.org/tlpi/code/index.html or view online.