Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] About the problem of 2022 Fall #960

Closed
08kmc09 opened this issue Jun 9, 2024 · 2 comments
Closed

[Question] About the problem of 2022 Fall #960

08kmc09 opened this issue Jun 9, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@08kmc09
Copy link

08kmc09 commented Jun 9, 2024

r2 = r3 = 0 and r1 =1 is possible for:
(X = 1; Z =rel 1) || (r1 =acq Z; r2 = Y) || (Y = 1; r3 = X).

I will call each thread as T1, T2 and T3.

For this question, I assume that the answer is False.

But I'm not quite sure, because the message's view for T1 and T2 could be X=[1@t1], Y=[0@0], Z=[1@t1] (Due to Acquire/Release Synchronization)

But I'm not sure that if this message's view also affects T3, T3 can read X = 0 or not. (i.e., T3's view can be X=[0@0], Y=[1@t2]) This view across the release/acquire fence.

What's the intended answer for this question?

@08kmc09 08kmc09 added the question Further information is requested label Jun 9, 2024
@kingdoctor123
Copy link
Member

First of all, the answer is true.

I'm not sure what you mean by "message's view." Does it mean per-thread view? If so, then as you said, per-thread view for T1 and T2 after finishing execution can be X=[1@t1], Y=[0@0], Z=[1@t1]. But since T3 does not use any acquire fences or acquire load operations, T3 cannot include X=[1@t1] in its per-thread view. As a result, it is allowed for T3 to read X=0.

@08kmc09
Copy link
Author

08kmc09 commented Jun 9, 2024

Oh I see, thank you. I was curious about the release/acquire view can affect other threads without using synchronization.

@08kmc09 08kmc09 closed this as completed Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants