kaist-cp / cs431

1.42k stars 137 forks source link

Q&A session on Nov 17th #540

Closed jeehoonkang closed 3 years ago

jeehoonkang commented 3 years ago

We will have a Q&A session on Nov 17th. Please ask questions at this issue tracker beforehand!

junsooo commented 3 years ago

At this issue tracker means this issue? #540

  1. I have question for https://github.com/kaist-cp/cs431/blob/main/lockfree/src/list.rs#L277-L278 What is the head cursor's inner value when list is empty? is it prev : pointer to null pointer, curr: null pointer? And is it "defined behavior"?
  2. On find_harris and find_harris_michael(https://github.com/kaist-cp/cs431/blob/main/lockfree/src/list.rs#L101), is this statement correct? -> find_harris의 경우 한번의 function call에서 찾으려는 key에서 가장 가까운 한개의 chain of logically removed nodes만 삭제해준다. 하지만 find_harris_michael의 경우 한번의 function call에서 여러 single node를 지워줄 수 있다. If this is correct, is it implementation specific or all same spec with other implementation?
haan6 commented 3 years ago

In lock-free data structures, guard from crossbeam-epoch keeps the current thread pinned. Out of curiosity, I looked into the internal implementation of Guard, but unable to understand how the thread stay pinned after all.

  1. Can you explain about the implementation strategy for guard and why we use guard in lock-free data structures again?
  2. When using a TreiberStack, if we run the following code in one thread, are there two guards for one thread?
    let mut ts = TreiberStack::new();
    ts.push(3);
    assert_eq!(ts.is_empty(), false);
junsooo commented 3 years ago

I heard on find_haris function, (https://github.com/kaist-cp/cs431/blob/main/lockfree/src/list.rs#L101) Line 109(let next) should be acquire to get latest value after found loop. There is no release-acquire pair but only acquire pair. is it okay?

jeehoonkang commented 3 years ago