wait System Call Program in C
HTML-код
- Опубликовано: 24 май 2020
- In this lecture on wait system call program in C, you will learn how to ensure the order of execution among processes. The wait system call in Linux is used to make the parent process wait for the child process to finish. The wait system call waits for state changes in a child of the calling process and obtains information about the child whose state has changed. The possible state changes are: the child terminates; the child gets stopped by a signal, or the child resumes by a signal.
Subscribe - / dextutor
This lecture is part of the Operating System Lab playlist: • Operating System Lab
For Program code and more details visit: dextutor.com/program-for-wait...
Reference Videos:
1. System calls: • read write System Call...
2. Process Creation: • How to create child pr...
3. Orphan process: • Orphan Process Program...
4. Replace process image: • How to Replace Process...
Tools Required:
1. Linux environment
2. Basic knowledge of C Language
3. gcc compiler installed
Reference Links:
Operating System Theory PPTs Link: dextutor.com/courses/operatin...
Operating System Programs: dextutor.com/courses/operatin...
Other Playlists:
OS: • Operating System
Linux Essential: • Linux Tutorial For Beg...
RHCSA: • RHCSA Exam Full Course
Was this tutorial about the wait system call program helpful? If so, please share. Let me know your thoughts in the comments.
#linux #oslab #os #dextutor #process
Thank you sir i was little confused in wait system call but made it crystal clear. Loved your explaination sir !!
Glad to hear that
1000 times better than my IIT graduate prof.
That's a great compliment..thanks
ur videos r so awesome sir. Just a minor suggestion, plzzz take care of audio.
In the next videos you will see the difference..keep watching the playlist
your video is so informative..thanks
@DexTutor thanks for very informative Video!
Thanks.. Keep sharing
Sir please provide the code for calculation of internal and external fragmentation.
Love u sir u madr my life easy make more videos plz
Thanks.. Stay tuned for more and share the videos among your friends
Thanks sir
thanx ....
Yes even i have the same doubt as anindita saha commented..if we use q instead of p then also it gives same sequence.. but it should have printed 2nd child message first
I think there is confusion on the use of waitpid(). It doesn't decide the order of execution of processes. It simply means the parent will wait for a particular child process, which it does.. Isn't it!
Don't compare the outputs as the order may not be same.. Just refer the very first video in which we simply created a child process.. I have explained it there..
Sir... In this video.. All progs are giving right output.. Only last prog me waitpid is not.. Usme waitpid pth child ko likhne ke baad bhi parent is waiting for both children.. Aapke output ki tarah jumbled nahi aaraha hai... Pls help
No issues..the focus is just on making it wait for 1st child.. Since you are not using wait for 2nd therefore the output sequence can not be guaranteed
@@dextutor no sir.. Actually when I use p and q separately in waitpid, it is giving me same result.. Same sequence... As I am a professor in college, it is be difficult to make students understand the difference.... Pls help
kindly drop me a mail (dextutor@gmail.com) ...i will contact you..that will be a better method to discuss the issue
@@dextutor thank you sir...