Storage device including volatile memory and operating method thereof
A storage device comprising a volatile memory comprising a plurality of physical areas, a compression operation circuit configured to compress write data at a first rate to generate first compressed data, and a control operation circuit configured to divide the plurality of physical areas included in the volatile memory into first physical areas and second physical areas, store the first compressed data in the first physical areas, and store first logical information indicating an area storing the first compressed data, in a first selected area of the second physical areas.
1 . A storage device comprising:
a volatile memory comprising a plurality of physical areas;
a compression operation circuit configured to
compress first write data at a first rate to generate first compressed data, and
compress second write data at a second rate to generate second compressed data; and
a control operation circuit configured to
divide the plurality of physical areas included in the volatile memory into first physical areas and second physical areas,
store the first compressed data in the first physical areas,
store first logical information indicating an area storing the first compressed data, in a first selected area of the second physical areas,
store the second compressed data in the first physical areas, and
store second logical information indicating an area storing the second compressed data, in a second selected area of the second physical areas,
search for the first logical information in the first selected area,
search for the second logical information in the second selected area.
2 . The storage device of claim 1 , wherein the control operation circuit is configured to:
set some of a current number of free areas as management areas to store free area information on the free areas that are available for storing data, among the first physical areas; and
manage the management areas in a form of a linked list.
3 . The storage device of claim 2 , wherein the control operation circuit is configured to:
select a first storage area from the free areas with reference to the free area information;
store the first compressed data in the selected first storage area;
generate the first logical information indicating the first storage area;
store the first logical information in the first selected area; and
invalidate, from the management area, information corresponding to the first storage area, among the free area information.
4 . The storage device of claim 3 , wherein the control operation circuit is configured to:
invalidate each of the first logical information and the first compressed data in response to a command requesting invalidation of the first logical information;
switch the first storage area into the free area; and
put the free area into the free area information.
5 . The storage device of claim 3 , wherein the control operation circuit is configured to:
select a second storage area from the free areas with reference to the free area information;
store the second compressed data in the selected second storage area;
generate the second logical information indicating the second storage area;
store the second logical information in the second selected area; and
invalidate, from the management area, information corresponding to the second storage area, among the free area information.
6 . The storage device of claim 5 , wherein the control operation circuit is configured to:
invalidate each of the second logical information and the second compressed data in response to a command requesting invalidation of the second logical information;
switch the second storage area into the free area; and
put the free area into the free area information.
7 . The storage device of claim 5 , wherein the control operation circuit is configured to:
check the current number of the free areas among the first physical areas; and
vary the number of areas to be set as the management areas, among the current number of the free areas, according to the checked current number of free areas.
8 . The storage device of claim 7 , wherein, when all information stored in a first management area set as a header in a form of a linked list, among the management areas, is invalidated, the control operation circuit is configured to:
set, as a new header, a second management area set as a next in the first management area;
switch the first management area into the free area; and
put the free area into the free area information.
9 . The storage device of claim 8 ,
wherein the control operation circuit comprises an internal memory allocated with a space for storing a free area queue and having a relatively higher speed than the volatile memory, and
wherein the control operation circuit is configured to move partial information of the free area information to the free area queue to manage the moved information.
10 . The storage device of claim 9 , wherein the control operation circuit is configured to:
move the partial information to the free area queue;
switch an area storing the partial information, among the first physical areas set as the management areas, into the free area;
move information on the switched free area to the free area queue; and
manage the moved information together with the partial information.
11 . The storage device of claim 1 , wherein the control operation circuit is configured to:
vary a ratio of the first physical areas and the second physical areas among the plurality of physical areas.
12 . An operating method of a storage device including a volatile memory, the operating method comprising:
compressing first write data at a first rate to generate first compressed data;
dividing a plurality of physical areas included in the volatile memory into first physical areas and second physical areas;
storing the first compressed data in the first physical areas;
storing first logical information indicating an area storing the first compressed data in a first selected area of the second physical areas;
compressing second write data at a second rate to generate second compressed data;
storing the second compressed data in the first physical areas;
storing second logical information indicating an area storing the second compressed data in a second selected area of the second physical areas;
searching for the first logical information in the first selected area; and
searching for the second logical information in the second selected area.
13 . The operating method of claim 12 , further comprising:
setting some of a current number of free areas as management areas to store free area information on the free areas that are available for storing data, among the first physical areas; and
managing the management areas in a form of a linked list.
14 . The operating method of claim 13 , wherein the storing of the first compressed data comprises:
selecting a first storage area from the free areas with reference to the free area information;
storing the first compressed data in the selected first storage area;
generating the first logical information indicating the first storage area;
storing the first logical information in the first selected area; and
invalidating, from the management area, information corresponding to the first storage area, among the free area information.
15 . The operating method of claim 14 , wherein the storing of the first compressed data further comprises:
invalidating each of the first logical information and the first compressed data in response to a command requesting invalidation of the first logical information;
switching the first storage area into the free area; and
putting the free area into the free area information after invalidation.
16 . The operating method of claim 14 , wherein the storing of the second compressed data comprises:
selecting a second storage area from the free areas with reference to the free area information; and
storing the second compressed data in the selected second storage area;
generating the second logical information indicating the second storage area and storing the second logical information in the second selected area; and
invalidating, from the management area, information corresponding to the second storage area, among the free area information.
17 . The operating method of claim 16 , wherein the storing of the second compressed data further comprises:
invalidating each of the second logical information and the second compressed data in response to a command requesting invalidation of the second logical information;
switching the second storage area into the free area; and
putting the free area into the free area information after invalidation.
18 . The operating method of claim 16 , wherein the managing of the management areas comprises:
checking the current number of the free areas among the first physical areas; and
varying the number of areas to be set as the management areas, among the current number of the free areas, according to the checked current number of free areas.
19 . The operating method of claim 18 , wherein, when all information stored in a first management area set as a header in a form of a linked list, among the management areas is invalidated, managing the management areas comprises:
setting, as a new header, a second management area set as a next in the first management area;
switching the first management area into the free area; and
putting the free area into the free area information.
20 . The operating method of claim 19 , wherein the storage device further includes an internal memory having a relatively higher operating speed than the volatile memory, physically divided, and allocated with a space for storing a free area queue, and
wherein the operating method further comprises moving partial information of the free area information to the free area queue to manage the moved information.
21 . The operating method of claim 20 , further comprising:
moving the partial information to the free area queue;
switching an area storing the partial information, among the first physical areas set as the management areas, into the free area;
moving information on the switched free area to the free area queue; and
managing the moved information together with the partial information.
22 . The operating method of claim 12 ,
wherein the control operation circuit varies a ratio of the first physical areas and the second physical areas among the plurality of physical areas.