Patent ID: 9626301
Date: 2017-04-18
CPC Classifications: G06F

Claim:
1. A method for implementing a priority queue in a storage device, comprising: dividing the storage device into multiple blocks; identifying, as active blocks, a subset of the multiple blocks, each active block associated with an active-block priority, wherein the active-block priority is determined based on a number of a set of items to be stored, and wherein the active-block priority is determined based on a set of item priorities corresponding to the set of items to be stored; creating multiple in-memory blocks, each created in-memory block corresponding to one of the active blocks and having the active-block priority of the corresponding active block; receiving an item of the set of items to be stored in the storage device and a corresponding item priority for the received item; adding, to an index, an entry corresponding to the received item, the entry including the item priority for the received item and an identification of a block at which the received item is to be stored; storing the received item in an in-memory block having an active-block priority closest to the received item; and in an event the in-memory block is full, writing contents of the full in-memory block to the storage device.