IP Library Granted Patent US 9,665,482
Granted Patent B2
US 9,665,482 · App. 14/748,191 · Granted May 30, 2017

System and method for selecting victim memory block for garbage collection

Inventor: Nidhi Mittal Hada (Kolkata, IN)
Assignee: WIPRO LIMITED
G06F12/0253G06F12/0246G06F12/121G06F2212/1036G06F2212/1044G06F2212/69G06F2212/702G06F2212/7205G06F2212/7211
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 9,665,482
App. No.
14/748,191
Granted
May 30, 2017
Kind
B2
Abstract

Embodiments of present disclosure disclose method and system for selecting victim memory block for garbage collection. A memory block having minimum valid unit count is identified. Wear count bit of memory block to be null wear count or non-null wear count is determined. Memory block is selected as victim memory block for garbage collection upon determining memory block having null wear count. A plurality of memory blocks are divided into first set of memory blocks and second set of memory blocks upon determining memory block having non-null wear count. Minimum valid unit count and wear count bit are identified for each memory block in each set. Division is iterated until a first target memory block having minimum valid unit count and null wear count from one of first set of memory blocks and second set of memory blocks is identified. Final target memory block is selected as victim memory block for garbage collection.

Claims (47)

1. A method for selecting a victim memory block in a storage device for garbage collection comprising:

identifying, by a block selection system, a memory block having a minimum valid unit count among a plurality of memory blocks in the storage device;

determining, by the block selection system, a wear count bit of the identified memory block to be one of a null wear count and a non-null wear count;

selecting, by the block selection system, the identified memory block as the victim memory block for garbage collection upon determining the identified memory block having the null wear count; and

performing, by the block selection system, upon determining the identified memory block having the non-null wear count:

dividing the plurality of memory blocks into a first set of memory blocks and a second set of memory blocks, wherein a minimum valid unit count and a wear count bit is identified for each memory block in the first set of memory blocks and the second set of memory blocks;

iterating the division until a first target memory block having the minimum valid unit count and the null wear count from one of the first set of memory blocks and the second set of memory blocks is identified; and

selecting the target memory block as the victim memory block for garbage collection.

2. The method as claimed in claim 1 further comprising:

identifying, by the block selection system, a second target memory block having the minimum valid unit count and the null wear count from remaining set of memory blocks of the first set of memory blocks and the second set of memory blocks during the iteration; and

merging, by the block selection system, the first target memory block and the second target memory block for garbage collection.

3. The method as claimed in claim 1 , wherein the plurality of memory blocks is divided into the first set of memory blocks and the second set of memory blocks by masking the identified memory block having non-null wear count.

4. The method as claimed in claim 1 , wherein the wear count bit relates to a wear count of the identified memory block that corresponds to number of times the memory block is used for garbage collection.

5. The method as claimed in claim 1 , wherein the wear count bit of the identified memory block is null when the identified memory block is never used for garbage collection.

6. The method as claimed in claim 1 , wherein the wear count bit of the identified memory block is non-null when the identified memory block is used at least once for garbage collection.

7. A block selection system for selecting a victim memory block in a storage device for garbage collection comprising:

a processor;

a memory communicatively coupled to the processor, wherein the memory stores processor-executable instructions, which, on execution, cause the processor to:

identify a memory block having a minimum valid unit count among a plurality of memory blocks in the storage device;

determine a wear count bit of the identified memory block to be one of a null wear count and a non-null wear count;

select the identified memory block as the victim memory block for garbage collection upon determining the identified memory block having the null wear count; and

perform upon determining the identified memory block having the non-null wear count:

divide the plurality of memory blocks into a first set of memory blocks and a second set of memory blocks, wherein a minimum valid unit count and a wear count bit is identified for each memory block in the first set of memory blocks and the second set of memory blocks;

iterate the division until a first target memory block having the minimum valid unit count and the null wear count from one of the first set of memory blocks and the second set of memory blocks is identified; and

select the final target memory block as the victim memory block for garbage collection.

8. The block selection system as claimed in claim 7 , wherein the processor is further configured to:

identify a second target memory block having the minimum valid unit count and the null wear count from remaining set of memory blocks of the first set of memory blocks and the second set of memory blocks during the iteration; and

merge the first target memory block and the second target memory block for garbage collection.

9. The block selection system as claimed in claim 7 , wherein the processor masks the identified memory block having non-null wear count to divide the plurality of memory blocks into the first set of memory blocks and the second set of memory blocks.

10. The block selection system as claimed in claim 7 , wherein the wear count bit relates to a wear count of the identified memory block that corresponds to number of times the memory block is used for garbage collection.

11. The block selection system as claimed in claim 7 , wherein the wear count bit of the identified memory block is null when the identified memory block is never used for garbage collection.

12. The block selection system as claimed in claim 7 , wherein the wear count bit of the identified memory block is non-null when the identified memory block is used at least once for garbage collection.

13. A non-transitory computer readable medium including instructions stored thereon that when processed by a processor cause a block selection system to perform acts of:

identifying a memory block having a minimum valid unit count among a plurality of memory blocks in a storage device;

determining a wear count bit of the identified memory block to be one of a null wear count and a non-null wear count;

selecting the identified memory block as the victim memory block for garbage collection upon determining the identified memory block having the null wear count; and

performing upon determining the identified memory block having the non-null wear count:

dividing the plurality of memory blocks into a first set of memory blocks and a second set of memory blocks, wherein a minimum valid unit count and a wear count bit is identified for each memory block in the first set of memory blocks and the second set of memory blocks;

iterating the division until a first target memory block having the minimum valid unit count and the null wear count from one of the first set of memory blocks and the second set of memory blocks is identified; and

selecting the final target memory block as the victim memory block for garbage collection.

14. The medium as claimed in claim 13 , wherein the instructions further cause the processor to perform operations comprising

identifying a second target memory block having the minimum valid unit count and the null wear count from remaining set of memory blocks of the first set of memory blocks and the second set of memory blocks during the iteration; and

merging the first target memory block and the second target memory block for garbage collection.

15. The medium as claimed in claim 13 , wherein the plurality of memory blocks is divided into the first set of memory blocks and the second set of memory blocks by masking the identified memory block having non-null wear count.

16. The medium as claimed in claim 13 , wherein the wear count bit relates to a wear count of the identified memory block that corresponds to number of times the memory block is used for garbage collection.

17. The medium as claimed in claim 13 , wherein the wear count bit of the identified memory block is null when the identified memory block is never used for garbage collection.

18. The medium as claimed in claim 13 , wherein the wear count bit of the identified memory block is non-null when the identified memory block is used at least once for garbage collection.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 13, 2017
From: MITTAL HADA, NIDHI
To: WIPRO LIMITED
Reel/Frame 041997/0413 →
Priority Claims (1)
IN 1601/CHE/2015 · Mar 28, 2015 · national
Continuity (1)
Related Publication 20160283369A1 · Sep 29, 2016