MANAGING METHOD FOR CACHE MEMORY OF SOLID STATE DRIVE
A managing method for a cache memory of a solid state drive includes the following steps. When the solid state drive decides to perform a garbage collection, a storing space of the cache memory is divided into plural storing portions. A first storing portion of the cache memory is set as a buffering unit for a garbage collection purpose. A second storing portion of the cache memory is set as a buffering unit for a writing purpose.
1 . A managing method for a cache memory of a solid state drive, the managing method comprising steps of:
dividing a storing space of the cache memory into plural storing portions when the solid state drive decides to perform a garbage collection;
setting a first storing portion of the cache memory as a buffering unit for a garbage collection purpose; and
setting a second storing portion of the cache memory as a buffering unit for a writing purpose.
2 . The managing method as claimed in claim 1 , wherein when a write command is received by the solid state drive, the solid state drive temporarily stores a write data into the second storing portion of the cache memory and executes the write command.
3 . The managing method as claimed in claim 1 , wherein a moved data from a flash memory of the solid state drive is temporarily stored in the first storing portion of the cache memory.
4 . The managing method as claimed in claim 1 , further comprising a step of setting a third storing portion of the cache memory as a buffering unit for a reading purpose, wherein when a read command is received by the solid state drive, the solid state drive temporarily stores a read data into the third storing portion of the cache memory and executes the read command.
5 . A managing method for a cache memory of a solid state drive, the managing method comprising steps of:
(a) designing the cache memory for a writing purpose and/or a reading purpose according to an access command before the solid state drive performs a garbage collection;
(b) setting a first storing portion of the cache memory as a buffering unit for a garbage collection purpose and setting a second storing portion of the cache memory as a buffering unit for the writing purpose when the solid state drive decides to perform the garbage collection; and
(c) repeatedly performing the step (a) after the garbage collection is completed by the solid state drive.
6 . The managing method as claimed in claim 5 , wherein the access command is a write command, wherein when the write command is received by the solid state drive, the solid state drive temporarily stores a write data into the second storing portion of the cache memory and executes the write command.
7 . The managing method as claimed in claim 5 , wherein a moved data from a flash memory of the solid state drive is temporarily stored in the first storing portion of the cache memory.
8 . The managing method as claimed in claim 5 , wherein the step (b) further comprises a step of setting a third storing portion of the cache memory as a buffering unit for a reading purpose when the access command is a read command, wherein when the read command is received by the solid state drive, the solid state drive temporarily stores a read data into the third storing portion of the cache memory and executes the read command.
9 . A solid state drive in communication with a host, the solid state drive comprising:
a controlling unit in communication with the host, wherein the controlling unit receiving an access command from the host;
a flash memory connected to the controlling unit; and
a cache memory connected to the controlling unit,
wherein when the controlling unit decides to perform a garbage collection, a first storing portion of the cache memory is set as a buffering unit for a garbage collection purpose, and a second storing portion of the cache memory is set as a buffering unit for a writing purpose.
10 . The solid state drive as claimed in claim 9 , wherein if the access command is a write command, the controlling unit temporarily stores a write data into the second storing portion of the cache memory and executes the write command.
11 . The solid state drive as claimed in claim 9 , wherein a moved data from the flash memory of the solid state drive is temporarily stored in the first storing portion of the cache memory.
12 . The solid state drive as claimed in claim 9 , wherein a third storing portion of the cache memory is further set as a buffering unit for a reading purpose when the access command is a read command, the solid state drive temporarily stores a read data into the third storing portion of the cache memory and executes the read command.
13 . The solid state drive as claimed in claim 12 , wherein before the garbage collection is performed by the controlling unit, the cache memory is designated for the writing purpose or the reading purpose according to the access command.