Patent ID: 8417876

Claim:
A method of operating a memory system that includes a memory circuit having an array of non-volatile memory cells and a controller circuit, the controller overseeing the transfer of user data between a host and the memory array and managing the storage of user data on the memory array, the method comprising: receiving by an interface of the controller of a first host command for a write operation to the non-volatile memory; determining by logic circuitry of the controller of whether the execution of the first host command will result in the amount of free space available in a first section of the non-volatile memory decreasing below a first level, wherein the first section is an area of the non-volatile memory allotted for user data; subsequently executing the first host command; in response to determining that the execution of the first host command will result in the amount of free space available in the first section decreasing below the first level, while executing the first host command performing at least a portion of a maintenance operation to increase the amount of free space available in the first section, where the portion of the maintenance operation performed is based on the amount of time available during the first host command without exceeding a maximum latency; determining by logic circuitry of the controller of whether the execution of the first host command will result in the amount of free space available in a second area of the non-volatile memory allotted for control data used by the controller in the management of the non-volatile memory system decreasing below a second level; and in response to determining that the execution of the first host command will result in the amount of free space available in the second area decreasing below the second level, while executing the first host command performing at least a portion of a maintenance operation to increase the amount of free space available in the second area, where the portion of the maintenance operation performed to increase the amount of free space available in the second area is based on the amount of time available during the first host command without exceeding a maximum latency.