What is meant by “blocking system call”?

后端 未结 3 1004
说谎
说谎 2021-02-01 17:18

What is the meaning of \"blocking system call\"?

In my operating systems course, we are studying multithreaded programming. I\'m unsure what is meant when I read in my t

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-01 17:35

    A blocking system call is one that must wait until the action can be completed. read() would be a good example - if no input is ready, it'll sit there and wait until some is (provided you haven't set it to non-blocking, of course, in which case it wouldn't be a blocking system call). Obviously, while one thread is waiting on a blocking system call, another thread can be off doing something else.

提交回复
热议问题