English 中文(简体)
问题多面
原标题:multi thread in c question

是否保证在到达时穿透?

也就是说,如果read2和3的到来正在等待,而接近1的正段正处于关键部分。

如果接近2时,在接近3时,将允许接近2时段进入关键部分,那么在接近3时,就会出现什么情况?

或者会发生种族状况?

如果得不到保证,如何解决这一问题? (可能要问吗?)

最佳回答

这种行为必须详细描述您的阅读图书馆(你没有提及)。 不过,我会猜测,大多数翻新的图书馆并没有提供这种保障。 除非等候者有不同的优先事项,当然也是这样。

问题回答

一般来说,翻新图书馆并不提供这种保障,因为大多数专业顾问没有作出这种保证。 阅读的包裹(通常)比原住的本组织校对管理业务做得更好。

它取决于操作系统。 在Windows,没有任何保证令,任何既定的read子都将被打上wo子,并给予ex。





相关问题
Fastest method for running a binary search on a file in C?

For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

Encoding, decoding an integer to a char array

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array? I was looking for an answer but didn t get any satisfactory answer in the ...

热门标签