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

Комментарии • 21

  • @ashishvermadav
    @ashishvermadav 3 года назад +3

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

    • @dextutor
      @dextutor  3 года назад +1

      Glad to hear that

  • @vinayak186f3
    @vinayak186f3 2 года назад +7

    1000 times better than my IIT graduate prof.

    • @dextutor
      @dextutor  2 года назад

      That's a great compliment..thanks

  • @saurabhpandey8174
    @saurabhpandey8174 2 года назад

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

    • @dextutor
      @dextutor  2 года назад

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

  • @aditineole7013
    @aditineole7013 3 года назад +1

    your video is so informative..thanks

  • @venkatesh4760
    @venkatesh4760 3 года назад +1

    @DexTutor thanks for very informative Video!

    • @dextutor
      @dextutor  3 года назад

      Thanks.. Keep sharing

  • @vipulkumarsharma2918
    @vipulkumarsharma2918 Год назад

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

  • @alikhan-jb3kl
    @alikhan-jb3kl 3 года назад +1

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

    • @dextutor
      @dextutor  3 года назад +1

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

  • @UdayKumar-zm4ft
    @UdayKumar-zm4ft 3 года назад +1

    Thanks sir

  • @gopilallodhi4102
    @gopilallodhi4102 3 года назад +1

    thanx ....

  • @prithvijain9978
    @prithvijain9978 3 года назад

    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  3 года назад +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..

  • @aninditasaha0307
    @aninditasaha0307 3 года назад +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  3 года назад

      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 3 года назад

      @@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  3 года назад

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

    • @aninditasaha0307
      @aninditasaha0307 3 года назад

      @@dextutor thank you sir...