Invention Grant
- Patent Title: Barrierless and fenceless shared memory synchronization with write flag toggling
-
Application No.: US16818845Application Date: 2020-03-13
-
Publication No.: US11620169B2Publication Date: 2023-04-04
- Inventor: Vasily Volkov
- Applicant: NVIDIA Corporation
- Applicant Address: US CA Santa Clara
- Assignee: NVIDIA Corporation
- Current Assignee: NVIDIA Corporation
- Current Assignee Address: US CA Santa Clara
- Agency: Leydig, Voit & Mayer, Ltd.
- Main IPC: G06F9/52
- IPC: G06F9/52 ; G06F9/54

Abstract:
When communicating through shared memory, a producer thread generates a value that is written to a location in a shared memory. The value is read from the shared memory by a consumer thread. The challenge is to ensure that the consumer thread reads the location only after the value is written and is thereby synchronized. When a memory location is written by a producer thread, a flag that is simultaneously stored in the memory location along with the value is toggled. The consumer thread tracks information to determine whether the flag stored in the location indicates whether the producer has written the value to the location. The flag is read and written simultaneously with reading and writing the location in memory, thereby eliminating the need for a memory fence. After all of the consumer threads read the value, the location may be reused to write additional value(s) and simultaneously toggle the flag.
Public/Granted literature
- US20210286619A1 BARRIERLESS AND FENCELESS SHARED MEMORY SYNCHRONIZATION Public/Granted day:2021-09-16
Information query