Storage device, operating method thereof, and electronic device
A storage device, an operation method thereof, and an electronic device are disclosed. A storage device includes a main memory comprising a first segment that is not masked and a second segment that is masked, a cache memory configured to store some metadata stored in the main memory, and a memory controller configured to map a physical address of the second segment to a physical address of the first segment in a remap table for dirty metadata to be stored in the second segment in response to a cache miss occurring.
1 . A storage device comprising:
a main memory comprising a first segment in which a refresh operation is configured to be enabled, and a second segment that is masked so as to be configured to disable the refresh operation;
a cache memory configured to store some metadata stored in the main memory; and
a memory controller configured to control the main memory, so as to have dirty metadata stored in the second segment in response to a cache miss occurring, and to logically move the dirty metadata from the second segment to the first segment by mapping a physical address of the second segment in which the dirty metadata is to be stored to a physical address of the first segment.
2 . The storage device of claim 1 , wherein the memory controller is configured to control the main memory, so as to have portion of the metadata stored in the cache memory to logically move the metadata to be cache hit from the first segment to the second segment by mapping a physical address of the first segment, in which the metadata to be cache hit is stored to a physical address of the second segment.
3 . The storage device of claim 1 , wherein the memory controller is configured to control the main memory to perform a flush operation of emptying the first segment in response to a plurality of dirty metadata having a size corresponding to a storage space of the first segment being mapped to the first segment.
4 . The storage device of claim 1 , wherein
the memory controller is configured to control the main memory to release the masking of the second segment in response to the dirty metadata being stored in the second segment in an idle state of the main memory, and
to store the dirty metadata in the second segment from which the masking is released.
5 . The storage device of claim 4 , wherein
the memory controller is configured to control the main memory to logically move the dirty metadata from the second segment to the first segment in response to the main memory entering a sleep mode or a low power mode from the idle state, and
to mask the second segment.
6 . The storage device of claim 4 , wherein the memory controller is configured to control the main memory to logically restore the dirty metadata to the second segment in response to the main memory being woken up.
7 . The storage device of claim 1 , wherein the main memory further includes a third segment in which the refresh operation is configured to be enabled, and
the memory controller is configured to store a remap table in the third segment.
8 . The storage device of claim 1 , wherein the main memory further includes a first mode register configured to store a code value of an operand related to whether or not the refresh operation is allowed for each of the first segment and the second segment.
9 . The storage device of claim 8 , wherein the main memory further includes a second mode register configured to store a code value of an operand indicating whether Partial Array Refresh Control (PARC) is supported or not.