阻塞系统调用"?;什么是&QUOT意思 [英] What is meant by "blocking system call"?

查看:565
本文介绍了阻塞系统调用"?;什么是&QUOT意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是堵系统调用的含义是什么?

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 textbook "it can allow another thread to run when a thread make a blocking system call"

推荐答案

一个拦截系统调用是一个必须等​​到动作就可以完成。 阅读()将是一个很好的例子 - 如果没有输入准备好了,它会坐在那里,等待某些被(前提是你有没有把它设置为非阻塞当然,在这种情况下,它不会是一个阻塞系统调用)。很显然,当一个线程在一个阻塞系统呼叫等待,另一个线程可以关闭做别的事情。

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.

这篇关于阻塞系统调用"?;什么是&QUOT意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆