Memory device that changes execution order of commands

A memory device includes a memory unit, a communication interface through which commands are received from a plurality of hosts, and a controller configured to store the commands in a queue and determine an order of execution of the commands according to when the commands were added to the queue and whether or not the commands issued from a host that is designated as a priority host. The controller determines the commands issued from the priority host to be executed prior to other commands that were not issued from the priority host, and determines the other commands to be executed in the order they were added to the queue.

FIELD

Embodiments described herein relate generally to a memory device, in particular, a memory device that changes execution order of commands.

BACKGROUND

A memory device typically includes a controller and a nonvolatile memory. The controller receives a write command, a logical address, and write data from a host device through a data port thereof, translates the logical address into a physical address and writes the write data to a location in the nonvolatile memory corresponding to the physical address. Also, the controller receives a read command and a logical address from a host device through a data port thereof, translates the logical address into a physical address, reads the read data stored in the location in the nonvolatile memory corresponding to the physical address and transmits the read data to the host device.

DETAILED DESCRIPTION

In general, according to an embodiment, a memory device includes a memory unit, a communication interface through which commands are received from a plurality of hosts, and a controller configured to store the commands in a queue and determine an order of execution of the commands according to when the commands were added to the queue and whether or not the commands issued from a host that is designated as a priority host. The controller determines the commands issued from the priority host to be executed prior to other commands that were not issued from the priority host, and determines the other commands to be executed in the order they were added to the queue.

Embodiments will be described hereinafter with reference to the accompanying drawings. In the following description, substantially the same functions or structural elements are described with the same numbers, and overlapping explanations will be made only when necessary.

In the following embodiments, a memory system (device) includes a management unit that manages command identification information and determines, from the command identification information, command identification information corresponding to the command to be executed next.

The management of the execution order of commands similar to that of the present embodiment may be also applied to a device which is not a memory system, for example, a communication device.

The management unit functions as a command queuing unit and basically determines command identification information on a first-in first-out (FIFO) basis. However, in the following embodiments, command identification information corresponding to device identification information illustrating an information processor (a host) which is currently communicating with the memory system is preferentially determined. Further, a command corresponding to the determined command identification information is executed.

In the present embodiment, a command to be managed is, for example, a command related to a transfer request.

FIG. 1is a block diagram of a memory system according to an embodiment.

A memory system1is connected to a plurality of information processors I0to IK. Each of the information processors I0to IKoperates as a host device of the memory system1. The memory system1may be incorporated into one of the information processors I0to IK. Alternatively, the memory system1may be connected to the information processors I0to IK, using a wireless or wired communication network. A plurality of memory systems1may be connected to the information processors I0to IK.

The memory system1is a memory device such as an SSD. However, a configuration similar to that of the memory system1may be applied to various memory devices such as a memory card, an HDD, a hybrid memory device including an HDD and an SSD, and an optical disk.

The memory system1includes a nonvolatile memory2and a controller3.

In the present embodiment, the nonvolatile memory2includes a NAND flash memory. However, the nonvolatile memory2may include a different type of memory which is not a NAND flash memory; for example, the nonvolatile memory2may include a NOR flash memory, a magnetoresistive random access memory (MRAM), a phase change random access memory (PRAM), a resistive random access memory (ReRAM), or a ferroelectric random access memory (FeRAM). The nonvolatile memory2may also be a magnetic disk.

The controller3includes an interface unit4, an interface controller5, memories6A and6B, a control unit7, and a memory controller8. The controller3may be divided into, for example, a front end which serves as an interface for communicating with and receiving data, information, a signal, a command, an address, etc. from, the information processors I0to IK, and a back end which does not serve as the interface. In this case, for example, the front end includes the interface unit4and the interface controller5, and the back end includes memories6A and6B, the control unit7and the memory controller8.

The interface unit4transmits and receives data, information, signals, commands, addresses, etc., to and from a data port included in one of the information processors I0to IKvia an expander41. The expander41switches a data port that communicates with the memory system1. The expander41may be provided in the memory system1.

The interface controller5manages execution order of various commands such as a read command, a write command, and an erase command. The interface controller5is a hardware controller that includes a selection unit51, a determination unit52, and a management unit53. Specific operations of the interface controller5are described below. The selection unit51, the determination unit52, and the management unit53may be partially or entirely provided outside the interface controller5.

Memory6A stores control program9executed by the control unit7and address translation data10. The control program9and the address translation data10may be partially or entirely stored in another memory such as a memory in the control unit7, and may be partially or entirely stored in the nonvolatile memory2. The control program9may be, for example, an operating system, application program, or firmware. The address translation data10associates the logical address corresponding to write data received from one of the information processors I0to IKwith the physical address of memory6B or the nonvolatile memory2. The address translation data10is, for example, a look up table (LUT). For example, the address translation data10may have a data structure of a table form and associate a logical address with a physical address by a list structure.

Memory6A may be, for example, a nonvolatile memory. Alternatively, memory6A may be partially or entirely a volatile memory such as a dynamic random access memory (DRAM) or a static random access memory (SRAM). When memory6A includes a volatile memory, the program or data stored in the volatile memory may be written to a nonvolatile memory such as the nonvolatile memory2at the time of power-off of the memory system1.

Memory6B is used as, for example, a working memory. Memory6B includes a write buffer memory WB and a read buffer memory RB.

The write buffer memory WB temporarily stores write data received from the information processors I0to IK.

The read buffer memory RB temporarily stores read data read from the nonvolatile memory2via the memory controller8.

Memory6B may be a volatile memory, a nonvolatile memory, or combination of a nonvolatile memory and a volatile memory.

The memory controller8receives data, information, a signal, a command, an address, etc., from various modules such as the control unit7and memory6B, and performs writing, reading, and erasing with respect to the nonvolatile memory2.

The control unit7executes the control program9and controls the memory system3as a whole. For the control unit7, for example, a central processing unit (CPU) or a micro-processor unit (MPU) is used.

The control unit7receives a command, a logical address, a data size, and write data from the information processors I0to IKvia the interface unit4. The control unit7stores write data to the write buffer memory WB when a write command is received. When size of write data stored in the write buffer memory WB is suitable for writing to the nonvolatile memory2, the control unit7instructs the memory controller9to write the data in the write buffer memory WB to the nonvolatile memory2.

When write data is stored in the write buffer memory WB, the control unit7updates the address translation data10, associating the logical address corresponding to the write data with a physical address of the write buffer memory WB in which the write data is stored. When data in the write buffer memory WB is written to the nonvolatile memory2, the control unit7further updates the address translation data10, associating the logical address corresponding to the data with a physical address in the nonvolatile memory2to which the data is written. At least a part of the above functions of the control unit7may be achieved by hardware.

FIG. 2illustrates an operation of the interface controller5according to the present embodiment.

The interface controller5includes, as described above, selection unit51, the determination unit52, and the management unit53.

The management unit53manages execution management data11, order management data12, and specifying information17. The execution management data11, the order management data12and the specifying information17may be stored in the management unit53. At least a part of the execution management data11, the order management data12, and the specifying information17may be stored in a storage unit outside the management unit53.

The execution management data11has, for example, a data structure of a table form. Each entry of the execution management data11includes command identification information of commands to be executed (commands waiting for execution). In the present embodiment, command identification information is an execution management number.

The order management data12has a data structure suitable for executing commands in accordance with the FIFO system (i.e., chronological order). In the present embodiment, each entry of the order management data12includes the execution management number and device identification information indicating an information processor that issued the corresponding command. In the present embodiment, device identification information is a host number. The host numbers and the execution management numbers stored in the order management data12are managed in accordance with the FIFO system (i.e., in chronological order). In the order management data12, the order of the host numbers and the execution management numbers can be changed depending on the need.

The specifying information17specifies an information processor (one of the information processors I0to IK) that is currently communicating with the memory system1.

The selection unit51selects an executable command from the commands corresponding to the execution management numbers included in the execution management data11. The selection unit51selects the executable command employing, for example, a round-robin arbiter. In this case, for example, the selection unit51allocates a time slice for each of the execution management numbers included in the execution management data11in order. When the command corresponding to the execution management number for which a time slice is allocated is executable (in other words, when the command corresponding to the execution management number for which a time slice is allocated is desired to be executed), the selection unit51selects the execution management number of the executable command for which the time slice is allocated.

The selection unit51stores the selected execution management number and the host number corresponding to the execution management number in the order management data12.

The management unit53manages the execution management number selected by the selection unit51and the host number corresponding to the execution management number for each command issued by one of the information processors. The management unit53manages execution management numbers and host numbers such that the execution order of commands can be specified, using, for example, the order management data12.

When the specifying information17, which specifies an information processor that is currently communicating with the memory system1, is not set in the management unit53, the determination unit52determines an execution management number in accordance with the FIFO system to be the execution management number of the command to be executed next. When the specifying information17is set in the management unit53, the determination unit52determines an execution management number corresponding to the host number specified by the specifying information17to be the execution management number of the command to be executed next.

For example, the determination unit52may determine the execution management number of the command to be executed next at the time of command execution. Alternatively, the determination unit52may determine the execution management number of the command to be executed next when one of the information processors I0to IKbegins communication with the memory system1.

More specifically, for example, the management unit53sets the host number corresponding to the executed command as the specifying information17.

When the command corresponding to an execution management number stored in the order management data12is executed, the determination unit52determines whether or not an execution management number associated with the same host number as the host number set as the specifying information17is stored in the order management data12.

When an execution management number associated with the same host number as the host number set as the specifying information17is not stored in the order management data12, the determination unit52determines an execution management number in accordance with the FIFO system to be the execution management number of the command to be executed next.

When an execution management number corresponding to the same host number as the host number set as the specifying information17is stored in the order management data12, the determination unit52determines the execution management number corresponding to the host number to be the execution management number of the command to be executed next.

In other words, when the execution management number is not associated with the host number of the information processor with which connection is currently established, the determination unit52determines the execution management number indicating the command to be executed next in accordance with the FIFO system.

In contrast, when the execution management number is associated with the host number of the information processor with which connection is currently established, the determination unit52determines the execution management number corresponding to the host number to be the execution management number of the command to be executed next.

In the present embodiment, the state in which connection is established between a plurality of devices is an example of the state in which a plurality of devices is currently communicating with each other.

FIG. 2illustrates a case in which the number of entries of the execution management data11is eight. However, the number of entries of the execution management data11is not limited to this number and may be two or more.

Similarly,FIG. 2illustrates a case in which the number of entries of the order management data12is eight. However, the number of entries of the order management data12is not limited to this number and may be three or more.

InFIG. 2, the order management data12includes entries E[0] to E[7]. In the present embodiment, the execution order of commands is determined by the determination unit52.

The selection unit51selects an execution management number of an executable command from the execution management numbers stored in the execution management data11. The selection unit51selects an execution management number in accordance with, for example, the round-robin system. The selection unit51stores the selected execution management number and the corresponding host number in the entry of the order management data12indicated by a write pointer WP. When the execution management number and the host number are stored in the entry indicated by the write pointer WP, the selection unit51increments the value of the write pointer.

The determination unit52determines, from the execution management numbers stored in the order management data12, the execution management number corresponding to the host number of the information processor with which connection is currently established, in other words, the execution management number associated with the host number specified by the specifying information17, to be the execution management number of the command to be executed next. When the execution management number corresponding to the host number of the information processor with which connection is currently established is not stored in the order management data12, the determination unit52determines the execution management number of the command to be executed next in accordance with the FIFO system.

FIG. 3illustrates state transitions in accordance with a first determination procedure of an execution management number executed by the determination unit52according to the present embodiment. InFIG. 3, the execution management number of the command to be executed next is determined in accordance with the FIFO system. In the initial state of the order management data12inFIG. 3, the write pointer WP points to entry E[3]. Execution management number C3and host number H0are stored in entry E[0]. Execution management number C5and host number H1are stored in entry E[1]. Execution management number C0and host number H2are stored in entry E[2].

Here, the determination procedure of an execution management number based on the FIFO system executed by the determination unit52is a basic determination procedure.

Host numbers H0to H2stored in entries E[0] to E[2], respectively, are different from the host number of the information processor with which connection is currently established. The specifying information17indicates a host number different from host numbers H0to H2. In this case, the determination unit52determines the execution management number of the command to be executed next in the order stored in the order management data12. For example, when the write pointer WP points to one of entries E[1] to E[7], which is not entry E[0], the determination unit52determines execution management number C3in entry E[0] as the execution management number of the command to be executed next.

After the execution of the command indicated by the determined execution management number C3is completed, the determination unit52transfers the execution management number and the host number of the entry E[i+1] to the execution management number and the host number of the entry E[i] (i≤WP−1). As a result, the entry E[0] stores execution management number C5and host number H1of the old entry E[1]. The entry E[1] then stores execution management number C0and host number H2of the entry E[2].

After the execution of the command indicated by the determined execution management number C3is completed, the write pointer WP is decremented. When the write pointer WP is zero, the order management data12is in an empty state.

The determination unit52determines execution management number C5in entry E[0] as the execution management number of the command to be executed next. Subsequently, a similar process is repeated.

FIG. 4illustrates state transitions in accordance with a second determination procedure of an execution management number executed by the determination unit52according to the present embodiment. InFIG. 4, the order of execution management numbers is different from the one inFIG. 3.

In the initial state of the order management data12inFIG. 4, the same host number H0is stored in entries E[0], E[2], and E[4]. InFIG. 4, after the execution of a command is completed, a command corresponding to the same information processor as that of the executed command is executed next.

FIG. 4illustrates an example in which the specifying information17indicates host number H0of the information processor with which connection is currently established. The determination unit52searches for an entry (a priority entry) including the host number H0when the execution of the command indicated by execution management number C3in entry E[0] is completed. When priority entries are present in entries E[1] to E[7], the determination unit52determines the minimum entry number of the detected priority entries as N. When no priority entry is present in entries E[1] to E[7], the determination unit52determines that N is zero. In the initial state of the order management data12inFIG. 4, N is two. Subsequently, the determination unit52transfers execution management number C0and host number H0in the entry E[N], here, entry E[2], to the entry E[0] and transfers the execution management number and the host number of entry E[i+1] to entry E[i] (N≤i≤WP−1). The write pointer WP is decremented based on the completion of command execution.

The determination unit52determines execution management number C0in entry E[0] as the execution management number of the command to be executed next. Subsequently, a similar process is repeated.

According to this process, it is possible to continuously execute commands corresponding to the same information processor with which connection is currently established on the basis of the determination procedure illustrated inFIG. 4.

When N is equal to zero, in other words, when the order management data12does not have an execution management number corresponding to the information processor with which connection is currently established, the determination procedure based on the FIFO system inFIG. 3is executed.

To prevent long-time connection between the memory system and specific one of the information processor of the information processors I0to IK, the interface controller5may monitor the connection time using a timer and switch the information processor connected with the memory system1when the connection time exceeds a predetermined time.

The interface controller5may set an upper limit of executable commands for one connection period, and switch the information processor to be connected with the memory system1when the number of commands executed after the establishment of connection exceeds the threshold.

In this manner, it is possible to prevent the number of commands executed for a specific one of the information processors I0to IKfrom being outstandingly greater than the number of commands executed for the other information processors. Thus, the performance can be balanced in the whole system including the information processors I0to IKand the memory system1.

FIG. 5illustrates state transitions in accordance with a third determination procedure of an execution management number executed by the determination unit52according to the present embodiment. InFIG. 5, the order of execution management numbers is different from the one inFIGS. 3 and 4.

FIG. 5illustrates the operation performed in the following case. Connection is established between a specific one of the information processors I0to IKand the memory system1. However, the specifying information processor with which connection is established is different from the information processor indicated by the host number in entry E[0] of the order management data12.

For example, when connection is established based on a request from the information processors I0to IK, the specifying information of the information processor with which connection is currently established is different from the host number in entry E[0] of the order management data12.

In the initial state of the order management data12inFIG. 5, connection is currently established with the information processor of host number H2. Thus, the specifying information17indicates the host number H2. In entry E[0] of the order management data12, host number H0is stored.

When the specifying information is different from the host number in entry E[0] of the order management data12, the determination unit52searches for a priority entry, in other words, an entry including host number H2. The determination unit52determines the minimum entry number of the detected priority entries as N. In the initial state ofFIG. 5, N is three. Subsequently, the determination unit52transfers execution number C1and host number H2of the entry E[N], here, entry E[3], to the entry E[0], and transfers the execution management number and the host number of entry E[i−1] to the entry E[i] (1≤i≤N). At this time, no command has been executed yet. Thus, the write pointer WP is not decremented.

The determination unit52determines execution management number C1in entry E[0] as the execution management number of the command to be executed next. Subsequently, for example, the determination procedure ofFIG. 3orFIG. 4is executed.

When N is equal to zero, in other words, when the host number of the information processor with which connection is currently established is not stored in the order management data12, the switch between entries illustrated inFIG. 5is not performed.

FIG. 6illustrates a state transition in accordance with a procedure for removing an execution management number in the determination unit52according to the present embodiment.

The operation inFIG. 6is typically executed based on command abort.

The entry number in which the execution management number to be removed is stored is defined as α.FIG. 6illustrates a case in which execution management number C1in entry E[3] of the order management data12is removed. Thus, α is three.

The determination unit52transfers the execution management number and the host number in the entry E[i+1] to the entry E[i] (α≤i≤WP−1). The write pointer WP is decremented.

FIG. 7illustrates state transitions based on a relationship between the order management data12and the read data stored in the read buffer memory RB according to the present embodiment.

The memory system1includes the high-capacity, low-speed nonvolatile memory2(for example, a NAND flash memory or a hard disk) and the low-capacity, high-speed read buffer memory RB for adjusting the speed difference from the high-speed interface provided between the information processors I0to IKand the memory system1.

When read data has been already stored in the read buffer memory RB, the read data in the read buffer memory RB is preferably transmitted to an information processor as quickly as possible so that the use efficiency of the read buffer memory RB and the response speed of the whole memory system1can be improved.

InFIG. 7, the order management data12includes, in each entry, an execution management number, a host number, and frame identification information of information to be transmitted according to the corresponding command. For example, for frame identification information, response information R and data identification information D are used. Response information R indicates that the information to be transmitted is a response. Data identification information specifies that the information to be transmitted is data in the read buffer memory RB.

In the initial state of the read buffer memory RB inFIG. 7, data D1, D2, and D3corresponding to host number H1, data D4and D5corresponding to host number H2, and data D6corresponding to host number H0are stored in the read buffer memory RB.

In the initial state of the order management data12inFIG. 7, for example, entry E[0] stores execution management number C3, host number H0, and response information R. For example, entry E[3] stores execution management number C2, host number H1, and data identification information D-1, which corresponds to data D1. For example, entry E[5] stores execution management number C6, host number H1, and data identification information D-3, which corresponds to data D3.

In the initial state of the order management data12, connection is currently established with the information processor having host number H0. Thus, the specifying information17indicates host number H0. The determination unit52recognizes that the order management data12does not include the execution management number of a command for transmitting data to the information processor having host number H0that is the same as the specifying information17. The determination unit52also recognizes that data D6corresponding to the information processor having host number H0has been already stored in the read buffer memory RB.

The determination unit52determines that one of entries E[3], E[4], and E[5] including the host number of an information processor with which connection is not currently established and the data identification information indicating one of data items included in the read buffer memory RB is a removal target.FIG. 7illustrates an example in which entry E[5] is determined as the removal target. The determination unit52removes execution management number C6, host number H1, and data identification information D-3stored in entry E[5]. The removal of information (execution management number C6, host number H1, and data identification information D-3) stored in entry E[5] by the determination unit52is not executed based on command abort. However, this removal is executed in accordance with a removal procedure similar to that ofFIG. 6. When available entry E is present in the order management data12, there is no need to remove an existing entry.

Subsequently, the determination unit52stores, in available entry E[7], new execution management number C6, host number H0, and data identification information D-6indicating data D6to be transmitted to the information processor of host number H0.

Subsequently, the determination unit52searches for entry E[7] including host number H0and data identification information D-6, and determines execution management number C6stored in the detected entry E[7] as the execution management number of the command to be executed next.

Subsequently, for example, the determination unit52interchanges the information (execution management number C3, host number H0, and response information R) stored in entry E[0] and the information (execution management number C6, host number H0, and data identification information D-6) stored in the detected entry E[7]. The determination unit52executes execution management numbers C6, C5, C0, and C3corresponding to host number H0in series in a manner similar to that ofFIG. 4.

Alternatively, for example, the determination unit52may execute execution management numbers C3, C5, C0, and C6corresponding to host number H0of the information processor with which connection is currently established in series in a manner similar to that ofFIG. 4without interchanging the information stored in entry E[0] and the information stored in entry E[7] after storing, in available entry E[7], new execution management number C6, host number H0, and data identification information D-6. In this case, read data D6for host number H0is transmitted after responses to host number H0are transmitted.

In this manner, a command for transmitting read data stored in the read buffer memory RB is transmitted earlier to the information processor specified by the specifying information17, with which connection is currently established. Thus, it is possible to improve the use efficiency of the read buffer memory RB and the performance of the whole memory system1.

FIG. 8is a flowchart illustrating a process performed between execution of a command and update of entries of the order management data12.FIG. 8is equivalent to one state transition inFIG. 4.

In step S801, the memory system1executes the command indicated by the execution management number stored in entry E[0] of the order management data12.

In step S802, the determination unit52of the interface controller5determines whether or not an execution management number corresponding to the host number same as the host number (i.e., the host number specified by the specifying information17) corresponding to the executed command is stored in the order management data12.

When an execution management number corresponding to the same host number is not stored in the order management data12, the determination unit52shifts the information in the entries of the data management data12in accordance with the FIFO system in step S803. Then, the process ends.

When one or more execution management numbers corresponding to the same host number are stored in the order management data12, the determination unit52selects the oldest execution management number stored in the order management data12from the one or more execution management numbers corresponding to the same host number in step S804.

In step S805, the determination unit52stores, in entry E[0] of the order management data12, the selected execution management number and the host number corresponding thereto.

In step S806, the determination unit52shifts the information in entries including an execution management number in the order management data12stored after the selected execution management number. The process ends.

FIG. 9is a flowchart illustrating a process performed between establishment of connection to an information processor and execution of the command indicated by the execution management number stored in entry E[0] of the order management data12.FIG. 9corresponds to the state transitions illustrated inFIG. 5.

In step S901, the memory system1establishes connection based on, for example, a request from one of the information processors I0to IK.

In step S902, the determination unit52determines whether or not the host number stored in entry E[0] of the order management data12is the same as the host number (i.e., the host number specified by the specifying information17) of the information processor with which connection is currently established.

When the host number in entry E[0] is the same as the host number of the information processor with which connection is currently established, the process proceeds to step S905.

When the host number in entry E[0] is not same as the host number of the information processor with which connection is currently established, the determination unit52determines whether or not an execution management number corresponding to the same host number is stored in the order management data12in step S903.

When an execution management number corresponding to the same host number is not stored in the order management data12, the process ofFIG. 9ends.

On the other hand, when an execution management number corresponding to the same host number is stored in the order management data12, the determination unit52changes the order of the entries of the order management data12such that the execution management number corresponding to the same host number is stored in entry E[0] in step S904.

When the determination unit52determines that the host number in entry E[0] is the same as the host number of the information processor with which connection is currently established in step S902, or after step S904, the memory system1executes the command corresponding to the execution management number stored in entry E[0] in step S905.

FIG. 10is a flowchart illustrating a process performed when read data requested from a currently-connected information processor is stored in the read buffer RB but a corresponding entry is not stored in the order management data12.FIG. 10corresponds to the state transitions illustrated inFIG. 7. That is, an entry for an information processor with which connection is not currently established is removed, and an entry for the currently-connected information processor is newly added in the order management data12.

In step S1001, the determination unit52determines whether or not an execution management number corresponding to a command for transmitting read data to the information processor with which connection is currently established is stored in the order management data12. The information processor with which connection is currently established is determined based on, for example, the specifying information17.

When an execution management number corresponding to the command for transmitting the read data to the information processor with which connection is currently established is stored in the order management data12, the process ends. In this case, no entry is removed.

When an execution management number corresponding to the command for transmitting the read data to the information processor with which connection is currently established is not stored in the order management data12, the determination unit52determines whether or not the read data is stored in the read buffer memory RB in step S1002.

When the corresponding read data to the information processor with which connection is currently established is not stored in the read buffer memory RB, the process ends. In this case, no entry is removed.

When the corresponding read data is stored in the read buffer memory RB, the determination unit52removes one of entries having a host number corresponding to an information processor with which connection is not established, and stores, in the available entry of the order management data12, the execution management number indicating the command for transmitting the read data to the information processor with which connection is currently established in step S1003.

FIG. 11is a circuit diagram illustrating a structure of a circuit for shifting entries of the order management data12according to the present embodiment.

The circuit corresponds to entry E[i] and includes flip-flop circuit F[i], selectors (multiplexers)13A and13B, and selector14.

The selectors13A,13B, and14output information to be stored in entry E[i] subsequent to replacement to flip-flop F[i] in accordance with various conditions. Flip-flop F[i] retains and outputs the value output by the selector14. Flip-flop F[i] maintains the value by default.

InFIG. 11, N is the minimum entry number of priority entries as described above. For example, a priority entry is determined based on the specifying information17. α is the entry number in which the execution management number to be removed is stored.

Specifically, the D-input of flip-flop circuit F[i] is replaced by the Q-output of another entry in accordance with the following conditions.

At the time of completion of command execution, for entry E[i] in which i=0 or N≤i≤WP−1, entry E[i] is replaced by entry E[N] in a case where both i=0 and N≠0 are satisfied, and entry E[i] is replaced by entry E[i+1] in the other cases. (This operation corresponds to that illustrated inFIG. 4.) For example, at the time of completion of command execution, for entry E[i] in which 0≤i≤WP−1, entry E[i] is replaced by entry E[i+1] in a case of N=0. (This operation corresponds to that illustrated inFIG. 3.)

At the time of the establishment of connection, for entry E[i] in which 1≤i≤N, entry E[i] is replaced by entry E[N] in a case of i=0, and entry E[i] is replaced by entry E[i−1] in a case of i≠0. In a case of N=0, there is no entry E[i] satisfying 1≤i≤N. Thus, no entry is replaced. (This operation corresponds to that illustrated inFIG. 5.)

At the time of removal, for entry E[i] in which α≤i≤WP−1, entry E[i] is replaced by entry E[i+1]. (This operation corresponds to that illustrated inFIG. 6.)

Hereinafter, a memory system according to a comparison example and the memory system1according to the present embodiment are compared.

FIG. 12generally illustrates an operation carried out in the memory system according to the comparison example.

A memory system15of the comparison example causes commands to be queued and executes them. The memory system15of the comparison example includes the execution management data11and a selection unit16.

The execution management data11includes a plurality of entries in each of which an execution management number corresponding to a command is stored. The number of transmission ports for transmitting a frame during command execution is only one. Therefore, the memory system15of the comparison example selects an entry to be executed in series from the plurality of entries in the execution management data11, using the selection unit16. The memory system15of the comparison example executes the command indicated by the execution management number in the selected entry and transmits a frame such as read data or a response during the command execution.

FIG. 13illustrates a first operation example of an operation carried out by the memory system15including the selection unit16, which operates based on the round-robin system.

FIG. 14is a timing chart illustrating a connection state and a command execution state in the memory system15of the comparison example, in the first operation example.

Selection unit16selects, from entries of the execution management data12, execution management number C0and host number H0, execution management number C1and host number H1, execution management number C2and host number H2, execution management number C3and host number H0, execution management number C4and host number H1, and execution management number C5and host number H2in series.

When the host number corresponding to the command to be executed next is different from the host number of the information processor with which connection is currently established, the memory system15needs to establish connection with the information processor indicated by the host number corresponding to the command to be executed next.

FIG. 15is a block diagram illustrating the memory system15of the comparison example communicably connected to one of the information processors I0to IKvia the expander41.

In the Serial Attached SCSI (SAS), to transmit a frame to one of the information processors I0to IK, the memory system of the comparison example needs to establish connection with the information processor to which the memory system15transmits the frame. However, in environment where a request from one of the information processors I0to IKis executed in series via the expander41, connection is established based on requests from the information processors I0to IK. Thus, connection may not be established with the information processor to which the memory system15transmits the frame.

FIG. 16illustrates a second operation example of an operation carried out by the memory system15of the comparison example.

FIG. 17is a timing chart illustrating a connection state and a command execution state in the memory system15of the comparison example, in the second operation example.

When connection is currently established with the information processor indicated by a host number different from the host number of the target information processor, which is desired to be connected by the memory system15, the memory system15is not be able to execute the command using the connection currently established.

FIG. 18illustrates a third operation example of the memory system15of the comparison example.

FIG. 19is a timing chart illustrating a connection state and a command execution state in the memory system15of the comparison example, in the third operation example.

Here, for example, read data D1and host number H1, and read data D2and host number H0are stored in the read buffer memory RB in a transmission wait state.

The memory system15of the comparison example selects an entry including execution management number C0, host number H0, and a response R from the execution management data11, using selection unit16. Subsequently, the memory system15selects an entry including execution management number C1, host number H1, and data identification information D-1. Subsequently, the memory system15selects the entry including execution management number C2, host number H0, and data identification information D-2.

The memory system15establishes connection with information processor I0corresponding to host number H0and executes a command for transmitting a response based on execution management number C0.

Read data D2corresponding to host number H0corresponding to information processor I0, with which connection is currently established, is stored in the read buffer memory RB. However, the memory system15can transmit read data D2to information processor I0indicated by host number H0based on execution management number C2only after the memory system15establishes connection with information processor I1indicated by host number H1and executes a command for transmitting data D1based on execution management number C1.

Thus, the memory system15of the comparison example may not efficiently improve the use efficiency of the read buffer memory RB and the performance of the whole memory system1.

In comparison with the memory system15of the comparison example, the memory system1of the present embodiment selects an execution management number corresponding to the information processor in which connection is currently established from the order management data12upon completion of each command execution, and determines an execution management number of the command to be executed next. The memory system1executes the command corresponding to the determined execution management number.

According to this operation, it is possible to reduce the number of processes to establish connection and improve the performance in the whole memory system1.

In the present embodiment, an execution management number corresponding to the information processor with which connection is currently established is selected from the order management data12, and a command corresponding to the selected execution management number is executed next.

According to this operation, when connection is established in response to a request from an information processor, a command corresponding to the information processor can be executed without re-establishing connection. Thus, the performance can be improved in the whole memory system1.

In the present embodiment, when read data for the information processor with which connection is currently established is stored in the read buffer memory RB, an entry including an execution management number corresponding to another information processor is removed from the order management data12. Then, an execution management number indicating a command for transmitting read data to the information processor with which connection is currently established, the corresponding host number, and corresponding data identification information are stored in an available entry of the order management data12.

According to this operation, the use efficiency of the read buffer memory RB can be improved. Moreover, read data can be preferentially transmitted to the information processor with which connection is currently established. Thus, the performance can be improved in the whole memory system1.