Message Queue - IPC Mechanism

  Рет қаралды 59,982

Shriram Vasudevan

Shriram Vasudevan

Күн бұрын

Пікірлер: 129
@bestfoodvines9605
@bestfoodvines9605 2 жыл бұрын
it is really practical and useful for showing the process of message queue
@ShriramVasudevan
@ShriramVasudevan 2 жыл бұрын
Thanks and glad u liked
@techlearner6335
@techlearner6335 7 жыл бұрын
One of the best! I have searched for many, but this is the best! Hats off!
@amina1558
@amina1558 4 жыл бұрын
++++
@greymind0072
@greymind0072 4 жыл бұрын
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
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
Thanks bro. This is very encouraging
@RobertStineIsTheBest
@RobertStineIsTheBest 6 жыл бұрын
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 !
@ShriramVasudevan
@ShriramVasudevan 6 жыл бұрын
Thanks Bro and yea accent is a problem when the country gets different bro. :)
@memorylanezz
@memorylanezz 4 жыл бұрын
Thanks for the video. Very useful and straight forward by showing the code step by step. Thank you.
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
Thanks and glad you liked it
@vajjasunilkumar3947
@vajjasunilkumar3947 2 жыл бұрын
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...
@sunandhinim6083
@sunandhinim6083 5 жыл бұрын
This is the best! Clear, Concise, Elegant!
@sukanya3634
@sukanya3634 4 жыл бұрын
wow...very clear explanation..
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
Thanks n glad you liked it
@a.t.venkateswarareddy
@a.t.venkateswarareddy 7 жыл бұрын
very good content on message queues . thank you
@AbdulQadir-el4ql
@AbdulQadir-el4ql 5 жыл бұрын
well teaching sir....
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
Thank you very much
@AbdulQadir-el4ql
@AbdulQadir-el4ql 5 жыл бұрын
@@ShriramVasudevan sir please make lecture on socket programming and mutex
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
@@AbdulQadir-el4ql both done..pl check bro.
@AbdulQadir-el4ql
@AbdulQadir-el4ql 5 жыл бұрын
@@ShriramVasudevan OK , I will check it ..thanks sir
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
@@AbdulQadir-el4ql thanks bro.
@profdurgahere9007
@profdurgahere9007 7 жыл бұрын
very good content on message queues
@divyas7516
@divyas7516 4 жыл бұрын
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
@divyas7516
@divyas7516 4 жыл бұрын
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)
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
Ftok can be done with any file but.. give appropriate path. Else it won work. Or.. give key value and try
@MSNarassima
@MSNarassima 7 жыл бұрын
Logically explained
@imtiyazaaresh9175
@imtiyazaaresh9175 7 жыл бұрын
thank you it's very useful to me
@ShriramVasudevan
@ShriramVasudevan 7 жыл бұрын
Thanks! :)
@arvindg553
@arvindg553 4 жыл бұрын
100% clear
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
Thanks
@technologyexcitesme8829
@technologyexcitesme8829 7 жыл бұрын
very useful sir.
@geethurohith
@geethurohith 5 жыл бұрын
Helped alott thnq 😊
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
Glad u liked.
@avishekdutta1901
@avishekdutta1901 4 жыл бұрын
Sir plzz make more videos on this topic or suggest some sources with examples
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
Kindly check the playlist linux system programming. You will find a lot.
@narasimhareddymv748
@narasimhareddymv748 6 жыл бұрын
Simply well said
@nareshpothula3966
@nareshpothula3966 5 жыл бұрын
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 ??
@darpanpatel2440
@darpanpatel2440 4 жыл бұрын
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 ,
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
Key must be through the same file.. I mentioned it.. may be i could have recorded it later and edited.
@darpanpatel2440
@darpanpatel2440 4 жыл бұрын
@@ShriramVasudevan ok No problem ,that's why i was confused :) , by the way all videos are superb ✌
@ShriramVasudevan
@ShriramVasudevan 4 жыл бұрын
@@darpanpatel2440 thanks bro.
@msaravanaselvam128
@msaravanaselvam128 Ай бұрын
Is this code work on codeblocks?
@bezayitmeles197
@bezayitmeles197 6 жыл бұрын
beautiful
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
@Bezayit Meles, Thank you and happy to know that you liked this!
@mekings0422
@mekings0422 7 жыл бұрын
wonderful.. thanks very much. sir can you please post links to the codes you used here
@ed_conansayshi3464
@ed_conansayshi3464 6 жыл бұрын
helped a lot, thanks bro
@ShriramVasudevan
@ShriramVasudevan 6 жыл бұрын
Thanks bro. Good you liked.
@pranjalbankar8871
@pranjalbankar8871 3 жыл бұрын
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
@ShriramVasudevan
@ShriramVasudevan 3 жыл бұрын
Buffer initiation error it could be
@pranjalbankar8871
@pranjalbankar8871 3 жыл бұрын
@@ShriramVasudevan ohk sir thank you😇
@ShriramVasudevan
@ShriramVasudevan 3 жыл бұрын
@@pranjalbankar8871 welcome..hope the content was useful
@bobbyisk
@bobbyisk 6 жыл бұрын
Very good explanation sir :) btw can i get the whole code of sending and receiving for the better understanding? Thank you very much
@ShriramVasudevan
@ShriramVasudevan 6 жыл бұрын
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
@vardhansanka4779
@vardhansanka4779 5 жыл бұрын
What is the difference between the two files 3_msgsnd and msgsnd sir? Just asking my doubt.
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
Both are same..i did the naming different. Nothing beyond :)
@vardhansanka4779
@vardhansanka4779 5 жыл бұрын
@@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 ?
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
@@vardhansanka4779 key should be with the same file only. So, don't get confused..both sender and receiver must share the same key..
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
@@vardhansanka4779it's my pleasure helping you. :)
@vardhansanka4779
@vardhansanka4779 5 жыл бұрын
@@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?
@prashanthkumar4222
@prashanthkumar4222 5 жыл бұрын
nice one
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
Thank you. Good you liked it.
@seshadrinm418
@seshadrinm418 5 жыл бұрын
Nice one!!
@bkissa12
@bkissa12 4 жыл бұрын
Please send the code in description too
@venkatsubbu2802
@venkatsubbu2802 7 жыл бұрын
Tnqqqqq sir make a video on file locks
@chsaiman0j961
@chsaiman0j961 5 жыл бұрын
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.
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
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.
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
And ...no question is silly. :)
@garimagupta2289
@garimagupta2289 5 жыл бұрын
could you please tell any real life example where message queues are used? Thanks :)
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
Hello Garima.. it starts from the simple chat application you Develop. It can be used to send the messages in appropriate order.
@bhargavtupakula9896
@bhargavtupakula9896 3 жыл бұрын
please paste the code in description.
@ShriramVasudevan
@ShriramVasudevan 3 жыл бұрын
It's long code. You can take it from git. @shriramkv
@iamtechieforever678
@iamtechieforever678 7 жыл бұрын
Useful, elegant!
@vaishnavamaruthi5081
@vaishnavamaruthi5081 7 жыл бұрын
thanku for very usefull
@mohitjoshi7722
@mohitjoshi7722 5 жыл бұрын
Tutorial is really awesome.Can you please share file links…
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
Glad you liked. Shall share the link soon
@stiliyangoranov3015
@stiliyangoranov3015 6 жыл бұрын
thanks a lot!
@ShriramVasudevan
@ShriramVasudevan 6 жыл бұрын
Thanks and good you liked.
@neetabisht7271
@neetabisht7271 6 жыл бұрын
Hi, could you please tell from where 3_msgrcv.c file came ?
@ShriramVasudevan
@ShriramVasudevan 6 жыл бұрын
That's just the file name..
@manjunathg8240
@manjunathg8240 5 жыл бұрын
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.
@ShriramVasudevan
@ShriramVasudevan 5 жыл бұрын
That's a cool suggestion. Install do that for sure. Give me some time.
@manjunathg8240
@manjunathg8240 5 жыл бұрын
@@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.
@alphaman3765
@alphaman3765 3 жыл бұрын
Sir,can you pls put the code in GitHub and post in the description
@ShriramVasudevan
@ShriramVasudevan 3 жыл бұрын
@shriramkv .. check in GIT
@eduardoalmeida8158
@eduardoalmeida8158 7 жыл бұрын
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 :(*/
@alexandrahancu1231
@alexandrahancu1231 7 жыл бұрын
you should use 2 message queues a=>b a
@killerthoughts6150
@killerthoughts6150 7 жыл бұрын
Very neat sir !
@wasimakram5371
@wasimakram5371 5 жыл бұрын
Where I can get the file used in explanation ?
@rgriff29
@rgriff29 5 жыл бұрын
See Chapter 45&46 from TLPI - Download the source code from TLPI www.man7.org/tlpi/code/index.html
@hanhpham-pl8yd
@hanhpham-pl8yd 7 жыл бұрын
please given link full project. !
@sakwiley19
@sakwiley19 6 жыл бұрын
Elegance!
@revathsaikiran6248
@revathsaikiran6248 7 жыл бұрын
Sir I got an error in msgid isn't what is the problem
@ShriramVasudevan
@ShriramVasudevan 7 жыл бұрын
revath revath I need to know what is the error.. send me screen shot.
@yogeshasati6892
@yogeshasati6892 6 жыл бұрын
thankyou...
@mergimuka6775
@mergimuka6775 7 жыл бұрын
When I execute "./snd and ./rcv" it says: key: No such file or directory
@ShriramVasudevan
@ShriramVasudevan 7 жыл бұрын
Mërgim Uka did you compile the file with gcc -o msgsnd filename.c
@mergimuka6775
@mergimuka6775 7 жыл бұрын
Yes I did, but I am stucked on it. P.s I am beginner in Linux (Ubuntu)
@ShriramVasudevan
@ShriramVasudevan 7 жыл бұрын
I shall send u guidelines .. give me time
@mergimuka6775
@mergimuka6775 7 жыл бұрын
Sure Shriram. Thanks for this awesome tutorial.
@ShriramVasudevan
@ShriramVasudevan 7 жыл бұрын
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.
@vinuVA
@vinuVA 5 жыл бұрын
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
@rahulreddy9934
@rahulreddy9934 3 жыл бұрын
11:41 Thank you fork()s
@ShriramVasudevan
@ShriramVasudevan 3 жыл бұрын
:)
@marathisahityaparishad2446
@marathisahityaparishad2446 3 жыл бұрын
It needs magnifier.
@ShriramVasudevan
@ShriramVasudevan 3 жыл бұрын
Codes :)
@atiqshaikh7245
@atiqshaikh7245 6 жыл бұрын
nice tutorial sir sir,can u plz share source code thank you
@mittalkrishna987
@mittalkrishna987 3 жыл бұрын
please attach the files
@abdulrehmankaimkhani9892
@abdulrehmankaimkhani9892 6 жыл бұрын
can you plz share code..?
@arshianozary4488
@arshianozary4488 6 жыл бұрын
would you send me the codes?
@embeddedsystems1051
@embeddedsystems1051 5 жыл бұрын
upload code also
@haneenqurt8270
@haneenqurt8270 7 жыл бұрын
i want the codes plz :'(
@ShriramVasudevan
@ShriramVasudevan 7 жыл бұрын
Haneen Qurt email.id ?
@haneenqurt8270
@haneenqurt8270 6 жыл бұрын
haneenqurt@gmail.com
@rajatjaiswal2159
@rajatjaiswal2159 6 жыл бұрын
Me too ID is rajat.19699@gmail.com
@pavanshinde8154
@pavanshinde8154 6 жыл бұрын
er.pavanshinde@gmail.com
@rohitkishore12
@rohitkishore12 6 жыл бұрын
rohitkishore1243@outlook.com
@Someone_artist
@Someone_artist 6 жыл бұрын
indentation nam ki cheez hoti hai
@rgriff29
@rgriff29 5 жыл бұрын
Very good sir. Definitive examples in Chapter 45/46 of TLPI - download from www.man7.org/tlpi/code/index.html or view online.
@GAMEVUEG
@GAMEVUEG 4 жыл бұрын
Your accent is way too strong
Shared Memory
6:19
Shriram Vasudevan
Рет қаралды 37 М.
C++ Programming on Linux - POSIX Message Queue Example
13:27
Hui Yuan
Рет қаралды 3,9 М.
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
What is a MESSAGE QUEUE and Where is it used?
9:59
Gaurav Sen
Рет қаралды 1 МЛН
Daemons in Linux/Unix (CRON)
11:21
Shriram Vasudevan
Рет қаралды 27 М.
Message Queues in RTOS
19:22
Easy Electronics
Рет қаралды 9 М.
EMBEDDED SYSTEMS|  Message Queue, Mailboxes and Pipes in IPC
23:38
Saniya Azeem
Рет қаралды 12 М.
Interprocess Communication : Message Queues
13:50
Dr. J. Andrew
Рет қаралды 4,6 М.
Mutex Synchronization in Linux with Pthreads
25:07
Brian Fraser
Рет қаралды 162 М.
Interprocess Communication
12:49
Neso Academy
Рет қаралды 705 М.
Putin Starts a New War / Secret Documents Caught on Video
12:31
NEXTA Live
Рет қаралды 840 М.
POSIX message queues in Linux
12:30
SoftPrayog
Рет қаралды 14 М.