发明名称 TWO HANDED INSERTION AND DELETION ALGORITHM FOR CIRCULAR BUFFER
摘要 Exemplary embodiments of the present invention disclose a method, program product, and system for selecting an item to evict and an insertion location for a new item in a circular buffer. A computer moves, in a circular buffer, in the same direction both of i) an insertion pointer to a first buffer entry, and ii) an eviction pointer to a second buffer entry that includes an item. A constant number of buffer entries is maintained between the eviction pointer and the insertion pointer. The computer responds to an eviction of the item from the second buffer entry by inserting a new item into a third buffer entry. The third buffer entry is located such that the third buffer entry is pointed to by the eviction pointer before being pointed to by the insertion pointer, as the eviction pointer and the insertion pointer continue to move around the circular buffer.
申请公布号 US2016004645(A1) 申请公布日期 2016.01.07
申请号 US201514857974 申请日期 2015.09.18
申请人 International Business Machines Corporation 发明人 Dey Swapan
分类号 G06F12/08 主分类号 G06F12/08
代理机构 代理人
主权项 1. A method for selecting an eviction location of an item to evict and an insertion location for a new item in a circular buffer, the method comprising the steps of:in a circular buffer: moving, by one or more processors, in the same direction both of i) an insertion pointer to a first buffer entry, and ii) an eviction pointer to a second buffer entry that includes a first item, such that a constant number of buffer entries is maintained between the eviction pointer and the insertion pointer; and responsive to an eviction of the first item from the second buffer entry, inserting, by the one or more processors, a new item into a third buffer entry that is located such that the third buffer entry is pointed to by the eviction pointer before being pointed to by the insertion pointer as the eviction pointer and the insertion pointer continue to move around the circular buffer.
地址 Armonk NY US