English 中文(简体)
将进程放入等待队列
原标题:which process puts in waiting queue

假设我们用血肿来提供相互排斥,而一个过程正在关键部分实施。 然后又一个过程开始使用关键区域,它会被排到等候队列中吗?

我怀疑哪个过程会把这个过程排在等候队列里?

提前感谢大家,

问题回答

在一个典型的操作系统中,它由内核而不是过程来操作。内核可以跟踪关键区域的存在和占用这些区域的过程。在典型的操作系统中,调度器也是内核的一部分,因此排程器可以将过程置于等待状态(或者更精确地说,是阻塞状态 ) 。

当线索/进程/ task 请求相互排斥对象时, 它会将 < em> 系统调用 < / em > 到处理相互排斥对象的内核。 如果此对象目前不可用, 那么内核会将此线/ 进程/ task 放在等待/ 堵塞的队列中, 并选择另一个 。





相关问题
What resources are shared between threads?

Recently, I have been asked a question in an interview what s the difference between a process and a thread. Really, I did not know the answer. I thought for a minute and gave a very weird answer. ...

Random access of multiple files and file caching

This relates to some software I ve been given to "fix". The easiest and quickest solution would make it open and read 10 random files out of hundreds and extract some very short strings for processing ...

What form is DLL & what makes it processor dependent

I know DLL contains one or more exported functions that are compiled, linked, and stored separately.. My question is about not about how to create it.. but it is all about in what form it is stored.. ...

Thread behavior on multicore machines

Does the threads of a single process run in parallel on a multi-core machine on windows XP? Is the behavior same on different windows versions (windows server editions) I have heard that only threads ...

How to check which Operating System?

How can I check OS version in a batch file or through a vbs in an Windows 2k/2k3 environment ? You know ... Something like ... : "If winver Win2k then ... or if winver Win2k3 then ....

热门标签