Timeline for Reducing contention/locking in a job system involving read/write dependencies?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 30, 2022 at 14:29 | vote | accept | HateDread | ||
Sep 30, 2022 at 7:31 | comment | added | amon |
Regarding the edits: (1) It's common to check a variable before locking, leading to patterns like if (check()) { lock(); if (check()) doTheThing(); unlock(); } . (2) This sounds sensible, but you don't have to modify ProcessContendingJobs if you're using a reentrant lock. (3) At some point it's also worth considering an architecture where there's a single thread that performs scheduling and dependency management, and other threads just notify this scheduler if jobs have completed. The critical sections that still need locks would then only involve queue operations, not dependency management.
|
|
Sep 29, 2022 at 12:44 | history | edited | HateDread | CC BY-SA 4.0 |
added 23 characters in body
|
Sep 29, 2022 at 12:43 | history | edited | HateDread | CC BY-SA 4.0 |
Further thoughts just after posting; forgot to add them in
|
Sep 29, 2022 at 11:24 | answer | added | amon | timeline score: 1 | |
S Sep 29, 2022 at 10:16 | review | First questions | |||
Sep 30, 2022 at 14:35 | |||||
S Sep 29, 2022 at 10:16 | history | asked | HateDread | CC BY-SA 4.0 |