IP Library Granted Patent US 11,650,923
Granted Patent B2
US 11,650,923 · App. 17/388,566 · Granted May 16, 2023

Lock-free sharing of live-recorded circular buffer resources

Inventors: Amit Kumar (Karnataka, IN); Gopikumar Ranganathan (Tamil Nadu, IN)
Assignee: DISH Network Technologies India Privated Limited
G06F12/0842G06F3/0656G06F5/12G06F12/0815G06F2212/1024H04N21/4392H04N21/44004
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,650,923
App. No.
17/388,566
Granted
May 16, 2023
Kind
B2
Abstract

Novel techniques are described for lock-free sharing of a circular buffer. Embodiments can provide shared, lock-free, constant-bitrate access by multiple consumer systems to a live stream of audiovisual information being recorded to a circular buffer by a producer. For example, when a producer system writes a data stream to the circular buffer, the producer system records shared metadata. When a consumer system desires to begin reading from the shared buffer at a particular time, the shared metadata is used to compute a predicted write pointer location and corresponding dirty region around the write pointer at the desired read time. A read pointer of the consumer system can be set to avoid the dirty region, thereby permitting read access to a stable region of the circular buffer without relying on a buffer lock.

Claims (53)

1. A method for lock-free sharing of a circular buffer, the method comprising:

computing a predicted write pointer location, in association with a request to read data from a circular buffer at a request time, based on a start time and a bitrate of a data stream being written to the circular buffer;

computing a dirty region around the write pointer location that begins at a dirty region start bit of the circular buffer prior to the write pointer and ends at a dirty region end bit of the circular buffer subsequent to the write pointer; and

initiating reading of data of the data stream, responsive to the request, at a read pointer location in the circular buffer set to be outside the dirty region.

2. The method of claim 1 , wherein the computing the dirty region comprises:

setting the dirty region start bit of the circular buffer to be prior to the write pointer by a number of bits corresponding to a real-time read start lag time; and

setting the dirty region end bit of the circular buffer to be subsequent to the write pointer by the number of bits corresponding to the real-time read start lag time.

3. The method of claim 2 , wherein:

the request is received from a consumer system determined to have the real-time read start lag time; and

the number of bits is computed to correspond to the real-time read start lag time as a function of the bitrate of the data stream being written to the circular buffer.

4. The method of claim 1 , wherein the request to read data comprises an indication of one of a real-time reading request, or an archival recording request.

5. The method of claim 4 , wherein, responsive to the request to read data comprising the indication of the real-time reading request, the initiating reading comprises setting the read pointer location to a bit location of the circular buffer corresponding to the dirty region start bit.

6. The method of claim 4 , wherein, responsive to the request to read data comprising the indication of the archival recording request, the initiating reading comprises setting the read pointer location to a bit location of the circular buffer corresponding to the dirty region end bit.

7. The method of claim 1 , wherein:

the request time is a current time; and

the computing the predicted write pointer location comprises computing a present write pointer location based on the start time, the bitrate, a circular buffer size, and the current time.

8. The method of claim 1 , wherein:

the request time indicates a subsequent read time; and

the computing the predicted write pointer location is based on the start time, the bitrate, a circular buffer size, and the subsequent read time.

9. The method of claim 1 , wherein:

the data stream is being written to the circular buffer by a producer system along with the producer system writing shared metadata indicating one or more of the start time, the bitrate, or the buffer size; and

the computing the predicted write pointer location is by a consumer system in communication with the producer system and is based on the shared metadata.

10. The method of claim 1 , wherein the data stream is being written to the circular buffer by a producer system configured so that the bitrate is a hard-coded bitrate.

11. A lock-free circular buffer sharing system comprising:

a write pointer processor to compute a predicted write pointer location, in association with a request to read data from a circular buffer at a request time, based on a start time and a bitrate of a data stream being written to the circular buffer;

a dirty region processor to compute a dirty region around the write pointer location that begins at a dirty region start bit of the circular buffer prior to the write pointer and ends at a dirty region end bit of the circular buffer subsequent to the write pointer; and

a read module to initiate reading of data of the data stream, responsive to the request, at a read pointer location in the circular buffer set to be outside the dirty region.

12. The lock-free circular buffer sharing system of claim 11 , wherein the dirty region processor is to compute the dirty region by:

setting the dirty region start bit of the circular buffer to be prior to the write pointer by a number of bits corresponding to a real-time read start lag time; and

setting the dirty region end bit of the circular buffer to be subsequent to the write pointer by the number of bits corresponding to the real-time read start lag time.

13. The lock-free circular buffer sharing system of claim 12 , wherein:

the request is received from a consumer system determined to have the real-time read start lag time; and

the number of bits is computed to correspond to the real-time read start lag time as a function of the bitrate of the data stream being written to the circular buffer.

14. The lock-free circular buffer sharing system of claim 11 , wherein the request to read data comprises an indication of one of a real-time reading request, or an archival recording request.

15. The lock-free circular buffer sharing system of claim 14 , wherein,

responsive to the request to read data comprising the indication of the real-time reading request, the read module is to initiate reading by setting the read pointer location to a bit location of the circular buffer corresponding to the dirty region start bit.

16. The lock-free circular buffer sharing system of claim 14 , wherein, responsive to the request to read data comprising the indication of the archival recording request, the read module is to initiate reading comprises setting the read pointer location to a bit location of the circular buffer corresponding to the dirty region end bit.

17. The lock-free circular buffer sharing system of claim 11 , wherein:

the request time is a current time; and

the write pointer processor is to compute the predicted write pointer location by computing a present write pointer location based on the start time, the bitrate, a circular buffer size, and the current time.

18. The lock-free circular buffer sharing system of claim 11 , wherein:

the request time indicates a subsequent read time; and

the write pointer processor is to compute the predicted write pointer location based on the start time, the bitrate, a circular buffer size, and the subsequent read time.

19. The lock-free circular buffer sharing system of claim 11 , further comprising:

a memory system comprising the circular buffer;

a capture module to capture audiovisual data from an audiovisual source; and

a write module, coupled with the capture module and the memory system, to write the audio visual data as the data stream to the circular buffer.

20. A system for lock-free sharing of a circular buffer, the system comprising:

a set of processors;

a non-transient memory having instructions stored thereon, which, when executed, cause the set of processors to perform steps comprising:

computing a predicted write pointer location, in association with a request to read data from a circular buffer at a request time, based on a start time and a bitrate of a data stream being written to the circular buffer;

computing a dirty region around the write pointer location that begins at a dirty region start bit of the circular buffer prior to the write pointer and ends at a dirty region end bit of the circular buffer subsequent to the write pointer; and

initiating reading of data of the data stream, responsive to the request, at a read pointer location in the circular buffer set to be outside the dirty region.

Assignments (2)
CHANGE OF NAME Recorded Jul 27, 2022
From: SLING MEDIA PRIVATE LIMITED
To: DISH NETWORK TECHNOLOGIES INDIA PRIVATE LIMITED
Reel/Frame 060647/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 29, 2021
From: KUMAR, AMIT; RANGANATHAN, GOPIKUMAR
To: SLING MEDIA PVT. LTD.
Reel/Frame 057022/0394 →
Cited By (1)
US 12,720,232