wait System Call Program in C

Sdílet
Vložit
  • čas přidán 9. 09. 2024
  • 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/p...
    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/c...
    Operating System Programs: dextutor.com/c...
    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

Komentáře • 22

  • @ashishvermadav
    @ashishvermadav Před 3 lety +3

    Thank you sir i was little confused in wait system call but made it crystal clear. Loved your explaination sir !!

  • @vinayak186f3
    @vinayak186f3 Před 2 lety +8

    1000 times better than my IIT graduate prof.

    • @dextutor
      @dextutor  Před 2 lety

      That's a great compliment..thanks

  • @api4196
    @api4196 Před 10 dny

    thank you sir

  • @aditineole7013
    @aditineole7013 Před 3 lety +1

    your video is so informative..thanks

  • @venkatesh4760
    @venkatesh4760 Před 4 lety +1

    @DexTutor thanks for very informative Video!

  • @alikhan-jb3kl
    @alikhan-jb3kl Před 3 lety +1

    Love u sir u madr my life easy make more videos plz

    • @dextutor
      @dextutor  Před 3 lety +1

      Thanks.. Stay tuned for more and share the videos among your friends

  • @saurabhpandey8174
    @saurabhpandey8174 Před 3 lety

    ur videos r so awesome sir. Just a minor suggestion, plzzz take care of audio.

    • @dextutor
      @dextutor  Před 3 lety

      In the next videos you will see the difference..keep watching the playlist

  • @UdayKumar-zm4ft
    @UdayKumar-zm4ft Před 3 lety +1

    Thanks sir

  • @vipulkumarsharma2918
    @vipulkumarsharma2918 Před 2 lety

    Sir please provide the code for calculation of internal and external fragmentation.

  • @gopilallodhi4102
    @gopilallodhi4102 Před 3 lety +1

    thanx ....

  • @aninditasaha0307
    @aninditasaha0307 Před 3 lety +1

    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

    • @dextutor
      @dextutor  Před 3 lety

      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

    • @aninditasaha0307
      @aninditasaha0307 Před 3 lety

      @@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

    • @dextutor
      @dextutor  Před 3 lety

      kindly drop me a mail (dextutor@gmail.com) ...i will contact you..that will be a better method to discuss the issue

    • @aninditasaha0307
      @aninditasaha0307 Před 3 lety

      @@dextutor thank you sir...

  • @prithvijain9978
    @prithvijain9978 Před 3 lety

    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

    • @dextutor
      @dextutor  Před 3 lety +1

      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..