Cache management method and system based on conversation type
Through the cache management method and system of dialogue type, cache blocks are managed according to the priority of dialogue type, which solves the problem of limited data computing performance in manufacturing, improves data access and computing efficiency, and improves production capacity .
Patent Information
- Application Number
- CN202110057228.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-11-12
- Filing Date
- 2021-01-15
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-01-15
AI Technical Summary
In the manufacturing industry, data computing efficiency is limited by the limitation of cache memory, which has affected production capacity and product yields. It is difficult for the prior art to effectively manage cache memory to improve data computing efficiency.
Using a cache management method and system based on dialogue type, the cache block is assigned and updated according to the priority of dialogue type by recording the priority of each cache block by using a record table to ensure high-priority data operation. It is required to obtain computing resources first and extend their existence time.
It improves data access and computing efficiency, ensures that high priority data operation requirements are processed first, reduces idle or empty production lines caused by data access, and improves the production capacity of the manufacturing process.
Smart Images

Figure CN114493069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cache management method and system, and more particularly to a session type-based cache management method and system. Background Art
[0002] In the manufacturing industry, the manufacturing process includes multiple stages. In order to improve production capacity and product yield, each stage of the manufacturing process is usually adjusted through measurement, calculation and control feedback. With the improvement of manufacturing digitization and the evolution of technology, the amount of measurement data is huge and the control rules are becoming more and more complex. In other words, a large amount of data calculation must be performed during the manufacturing process. Furthermore, the performance of data calculation can directly affect production capacity and product yield.
[0003] In current technology, data handshaking and computing are usually performed between a cache memory and a data computing acceleration unit to improve data computing performance. However, cache memory is limited and expensive, so more efficient management of the cache memory is required to improve data computing performance. Summary of the invention
[0004] The present invention relates to a cache management method and system based on dialog types, which manages cache memory according to the priority and usage record table corresponding to the dialog type to improve the efficiency of data calculation.
[0005] According to one embodiment of the present invention, a cache management method based on session type is proposed. The cache memory includes a plurality of cache blocks. A usage record table of the cache manager records a priority of each cache block. The cache management method includes the following steps. A request for loading a first data block sent by a first session is received. The first session has a first session type, and the first session type corresponds to a first priority. A cache block with a priority lower than the first priority is assigned to the first session according to the usage record table. The first data block is loaded into the assigned cache block. The priority corresponding to the assigned cache block in the usage record table is updated to the first priority.
[0006] According to another embodiment of the present invention, a cache management system based on a session type is proposed, which can establish a first session with a first session type with an application. And the first session type corresponds to a first priority. The cache management system includes a data source, a cache memory and a cache manager. The data source stores a plurality of data blocks. The cache memory has a plurality of cache blocks. The cache manager can assign cache blocks and has a usage record table, and the usage record table records a priority of each cache block. And the cache manager is configured to perform the following steps. When receiving a request to load a first data block sent by the first session, the cache manager assigns a cache block with a priority lower than the first priority to the first session according to the usage record table. Load the first data block from the data source to the assigned cache block. Update the priority corresponding to the assigned cache block in the usage record table to the first priority. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 A schematic diagram illustrating a manufacturing process of a manufacturing industry according to an embodiment of the present invention is shown;
[0008] Figure 2 A schematic diagram of a session-based cache management system according to an embodiment of the present invention is shown;
[0009] Figure 3 A flowchart of a session-based cache management method according to an embodiment of the present invention is shown; and
[0010] Figure 4 A flowchart of sub-steps of step S180 according to an embodiment of the present invention is shown.
[0011] Figure 5 FIG. 4 is a schematic diagram of a session-based cache management system according to another embodiment of the present invention.
[0012] Figure 6 A flow chart of a session type-based cache management method according to another embodiment of the present invention is shown.
[0013]
Explanation of symbols
[0014] 100: Cache Management System
[0015] 110: Application
[0016] 120:Cache Manager
[0017] 130: Cache memory
[0018] 140: Data Source
[0019] 150: Data operation unit
[0020] URT: Usage Record Table
[0021] RRT: Dialogue Request Record Form
[0022] S1: First Dialogue
[0023] S2: Second Dialogue
[0024] L1, L2, L3, L4, L5: cache blocks
[0025] D1, D2, D3, D4, D5, D6, D7: data blocks
[0026] F: Factory
[0027] LN1, LN2: production line
[0028] C1, C2, C3: Workstations
[0029] BF, BF1: Buffer
[0030] EP1: Equipment
[0031] INS1: Measurement and measurement machine
[0032] S110, S120, S130, S140, S150, S160, S170, S180, S190, S181, S182, S183, S184, S185, S186, S187, S210, S220, S230, S240: Steps DETAILED DESCRIPTION
[0033] Please refer to Figure 1 , which illustrates a schematic diagram of a manufacturing process of a manufacturing industry according to an embodiment of the present invention. Factory F includes multiple production lines LN1, LN2... Each production line includes multiple workstations, for example, production line LN1 includes workstations C1, C2, C3... Each production line has a buffer zone of the production line for storing products produced by the production line, for example, production line LN1 has a buffer zone BF. Each workstation can be composed of an equipment, a measuring machine and a buffer zone of the workstation, for example, workstation C1 is composed of equipment EP1, measuring machine INS1, and buffer zone BF1 of the workstation. The buffer zone of the workstation is used to store the output of the workstation.
[0034] In the manufacturing process, data operations in different ranges on the production line have different timeliness requirements. According to different timeliness requirements, they can be divided into four types: in-line, on-line, at-line and off-line. Among them, data operations related to the inside of the equipment are in-line, data operations related to the workstation are on-line, data operations related to the production line are at-line, and data operations related to the factory are off-line. The real-time requirements are in-line, on-line, at-line and off-line from strong to weak. Taking the actual manufacturing field as an example, in-line can be the detection information of a single processing machine when performing processing, such as the R2R (Run-to-Run Control) detection of the semiconductor processing CMP (Chemical Mechanical Planarization) process. The current processing machine determines whether to adjust the processing parameters of the processing machine based on the R2R detection data, and its real-time requirements are strong; on-line can be the detection information of the output of a single processing machine. For example, after the yellow light process, the overlay measurement machine is used to detect the overlay quality after the yellow light process, and it is used to determine whether to proceed to the next stage of processing or whether to suspend the wafer transfer box (FOUP, Front Open Unit) Pod) for further inspection, and its real-time demand is weaker than in-line; at-line can be inspection information related to phased finished products, such as in the metal mobile phone case processing production line, using three-dimensional measurement to conduct key size spot checks on materials that have completed the initial carving process, to determine whether the batch of materials can enter the fine carving process, and its real-time demand is weaker than on-line; off-line can be inspection information related to the final processed product, such as defect detection of processed wafers, to determine whether the finished product is qualified, and its real-time demand is weaker than at-line.
[0035] Please refer to Figure 2, which illustrates a schematic diagram of a session-based cache management system 100 according to an embodiment of the present invention. The cache management system 100 can establish at least one session with an application 110. The cache management system 100 includes a cache manager 120, a cache memory 130, a data source 140, and a data operation unit 150. The cache memory 130 has a plurality of cache blocks L1, L2, L3, L4, L5, etc. The data source 140 stores a plurality of data blocks D1, D2, D3, D4, D5, D6, D7, etc. The data blocks D1, D2, D3, D4, D5, D6, D7, etc. can be loaded into the cache blocks L1, L2, L3, L4, L5, etc. of the cache memory 130. The cache manager 120 has a usage record table URT. In this embodiment, the cache memory 130 may be, for example, a static random access memory (SRAM), and the data source 140 may be, for example, a hard disk, a file, or a database; in addition, the application 110 may be, for example, executed by a factory management platform; the data operation unit 150 may be, for example, a chip, a circuit, a graphics processing unit (GPU), a field programmable gate array (FPGA), or a GPU database; the cache manager 120 may be, for example, a driver or application for managing memory.
[0036] The application 110 may establish a session with a session type to request to load a data block. In this embodiment, the application 110 establishes a first session S1 and a second session S2. The session type is related to the real-time requirement of data operation. In this embodiment, the session type may be one of in-line, on-line, at-line and off-line. Each session type corresponds to a different priority, and the priorities corresponding to the session types are in-line, on-line, at-line and off-line in descending order. The cache manager 120 may assign one of the cache blocks to the session according to the session type and the usage record table URT of the session. For example, the cache manager 120 may assign one of the cache blocks to the first session S1 according to the session type and the usage record table URT of the first session S1. The data operation unit 150 accesses the assigned cache block to obtain the required data block for operation, and returns the operation result to the session, for example, returns the operation result to the first session S1.
[0037] Please refer to Table 1, which is a usage record table URT according to an embodiment of the present invention. The usage record table URT has multiple fields to record relevant information of each cache block L1, L2, L3, L4, L5... The Block field of the usage record table URT is used to record and indicate the data block stored in the cache block. For example, in the usage record table URT, the Block field of the cache block L1 is recorded as N / A, indicating that the cache block L1 does not store a data block, and for example, in the usage record table URT, the Block field of the cache block L2 records "D1" to indicate that the cache block L1 stores the data block D1. The Locked field of the usage record table URT is used to record that the cache block is assigned to several sessions and the data computing unit 150 is using this cache block for computing. For example, the usage record table URT in Table 1 shows that the cache block L3 is assigned to 2 sessions and the data computing unit 150 is using the cache block L3 for computing. The priority field of the usage record table URT is used to record the conversation type with the highest priority among the conversations that have used the data stored in the cache block. For example, the conversation type with the highest priority among the conversations that have used the data stored in the cache block L4 is off-line. The number of conversations (Session) field of the usage record table URT is used to record the number of conversations that are using the cache space. For example, the number of conversations that are using the cache block L5 is 1. The expiration field of the usage record table URT is used to record the time when the cache block was last locked. For example, the time when the cache block L4 was last locked was T2. In this article, the order of time is represented by T1, T2, T3... and so on.
[0038]
[0039] Table 1
[0040] Figure 3 A flow chart of a session-based cache management method according to an embodiment of the present invention is shown. Figure 2 and 3 And Table 1. The steps of the cache management method of this embodiment are as follows: Execute step S110, the application 110 establishes a first session S1, and the first session S1 issues a request to access a data block. The first session S1 has a first session type (on-line), and the first session type (on-line) corresponds to a first priority.
[0041] In step S120 , the cache manager 120 receives a request for loading a data block sent by the first session S1 .
[0042] Step S130 is executed, and the cache manager 120 determines whether the data block requested by the first session S1 has been stored in the cache memory 130 according to the usage record table URT. When the data block requested by the first session S1 has been stored in the cache memory, step S140 is executed; when the data block requested by the first session S1 does not exist in the cache memory 130, step S180 is executed.
[0043] For example, when the first session S1 requests data block D4, the cache manager 120 determines that the data block D4 is stored in the cache block L3 of the cache memory 130 according to the block field of the usage record table URT shown in Table 1, that is, the block field of the cache block L3 in the usage record table URT is recorded as "D4", so it is determined that the data block requested by the first session S1 exists in the cache memory 130, and step S140 is further executed. In step S140, the cache manager 120 assigns the cache block L3 storing the data block D4 requested by the first session S1 to the first session S1.
[0044] Then, step S150 is executed, the data operation unit 150 obtains the data block D4 from the assigned cache block L3 and performs operation, and the cache manager 120 updates the lock field, expiration field, session number field and priority field of the usage record table URT. For example, the usage record table URT updated by the cache manager 120 is shown in Table 2. In Table 2, the cache manager 120 updates the lock field corresponding to the assigned cache block L3 in the usage record table URT from 2 to 3, the priority field from at-line to the first session type (on-line) corresponding to the first session S1 with a higher priority, the session number field from 3 to 4, and the expiration field from T3 to the last lock time T4. In other words, when the cache manager 120 assigns the cache block L3 to the first session S1, the first session S1 notifies the data operation unit 150 to retrieve data from the cache block L3, and the cache manager 120 locks the cache block L3 and increments the lock field corresponding to the assigned cache block L3 in the usage record table URT by 1, updates the expiration field to the last lock time, increments the session number field by 1, and updates the priority field to the first session type (on-line) when the priority of the first session type (on-line) of the first session S1 is higher than the priority of the session type (at-line) recorded in Table 1. In another embodiment, if the first session type of the first session S1 is at-line or off-line, and the corresponding first priority is not higher than the priority (at-line) of the cache block L3 recorded in Table 1, the priority field of the usage record table URT will not be updated in this step S150.
[0045]
[0046]
[0047] Table 2
[0048] Step S160 is executed, the data operation unit 150 returns the operation result to the first session S1, and the cache manager 120 updates the lock field of the usage record table URT. For example, the cache manager 120 updates the lock field of the cache block L3 in the usage record table URT shown in Table 2, and the updated usage record table URT is shown in Table 3. In Table 3, the lock field of the cache block L3 is updated from 3 to 2. In other words, when the data operation unit 150 returns the operation result to the first session S1 and ends the operation of using the cache block L3, the cache manager 120 subtracts 1 from the lock field corresponding to the cache block L3 in the usage record table URT.
[0049]
[0050] Table 3
[0051] Step S170 is executed, the application 110 ends the first session S1, and the cache manager 120 updates the session number field of the usage record table URT. For example, after the application 110 ends the first session S1, the cache manager 120 updates the session number field of the cache block L3 in the usage record table URT shown in Table 3, and the updated usage record table URT is shown in Table 4. In the usage record table URT in Table 4, the session number field of the cache block L3 is updated from 4 to 3. In other words, after the first session S1 ends, the cache manager 120 reduces the session number field corresponding to the cache block L3 in the usage record table URT by 1. In one embodiment, after the first session S1 ends, the cache manager 120 reduces the session number of each cache block corresponding to the first session S1 in the usage record table URT by 1. In this embodiment, the cache manager 120 records the cache blocks requested by the first session S1 through the session request record table RRT shown in Table 5. In the session request record table RRT of Table 5, the data blocks requested by the first session S1 include data block D1 and data block D4. Therefore, when the first session S1 ends, the cache manager 120 reduces the number of sessions corresponding to the cache block L2 and cache block L3 of the first session S1 in the usage record table URT of Table 3 by 1 according to the session request record table RRT of Table 5. The updated usage record table URT is shown in Table 6. The session request record table RRT of this embodiment records the data blocks requested by the session, but the session request record table RRT can also record cache blocks, that is, cache blocks assigned to store the data blocks requested by the session.
[0052]
[0053] Table 4
[0054]
[0055] Table 5
[0056]
[0057]
[0058] Table 6
[0059] In addition, in step S110, when the first session S1 requests to access the data block D3, the cache manager 120 determines that the data block D3 does not exist in the cache memory 130 according to the usage record table URT shown in Table 1, and then executes step S180. Since the requested data block D3 is not stored in the cache memory 130, the cache manager 120 needs to assign a cache block and load the data block D3 from the data source 140 into the assigned cache block to provide it to the first session S1 for use; when all cache blocks have been used, the cache manager 120 needs to release the assigned cache block before loading data.
[0060] In step S180, the cache manager 120 assigns a cache block to the first session S1 according to the usage record table URT. Figure 4 , which depicts a flowchart of sub-steps of step S180 according to an embodiment of the present invention. Step S180 of this embodiment includes steps S181 to S187, wherein the cache manager 120 assigns a cache block from a plurality of cache blocks L1, L2, L3, L4, and L5 to the first session S1 according to the usage record table URT.
[0061] Step S181 is executed, and the cache manager 120 determines whether there is an empty cache block according to the block field of the usage record table URT. If there is an empty cache block in the usage record table URT, step S186 is executed; if there is no empty cache block in the usage record table URT, step S182 is executed. For example, referring to the usage record table URT shown in Table 1, when the cache manager 120 determines that there is an empty cache block according to the block field of the usage record table URT, that is, cache block L1, step S186 is executed, and the cache manager 120 assigns cache block L1 to the first session S1. In one embodiment, when the cache manager 120 determines that there is an empty cache block, and there are more than one empty cache block, in step S186, the cache manager 120 assigns one of the multiple empty cache blocks to the first session S1.
[0062] In step S181, if the cache manager 120 determines that there is no empty cache block according to the block field of the usage record table URT, such as the usage record table URT shown in Table 7, then step S182 is executed. In step S182, the cache manager 120 determines whether there is an unlocked cache block according to the lock field of the usage record table URT. If there is an unlocked cache block, step S183 is executed; if there is no unlocked cache block, step S187 is executed, and the cache manager 120 sends a request failure (FAIL) message to the first session S1. For example, referring to the usage record table URT in Table 7, the cache manager 120 determines that there are unlocked cache blocks L1, L2, and L5 according to the block field of the usage record table URT, and then step S183 is executed.
[0063]
[0064] Table 7
[0065] In step S183, the cache manager 120 determines whether all unlocked cache blocks are in use by a session according to the session number field of the usage record table URT. If all unlocked cache blocks are in use by a session, step S185 is executed; if not all unlocked cache blocks are in use by a session, step S184 is executed. For example, the cache manager 120 determines that the session number fields corresponding to all unlocked cache blocks L1, L2, and L5 are greater than 0 according to the session number field of the usage record table URT shown in Table 7, that is, the unlocked cache blocks L1, L2, and L5 are all in use by a session, and step S185 is executed.
[0066] In step S185, the cache manager 120 selects a cache block with a priority lower than the first priority corresponding to the first session type according to the priority field of the usage record table URT. For example, in the usage record table URT shown in Table 7, the priority in-line of the cache block L1 is not lower than the first priority corresponding to the first session type (on-line) of the first session S1, and the priority in-line of the cache block L2 is not lower than the first priority corresponding to the first session type (on-line) of the first session S1, and the priority at-line of the cache block L5 is lower than the first priority corresponding to the first session type (on-line) of the first session S1, so the cache manager 120 selects the cache block L5. Then, step S186 is executed, and the cache manager 120 assigns the cache block L5 selected in step S185 to the first session S1. In one embodiment, when executing step S185, if there is more than one cache block with a priority lower than the priority corresponding to the first session type, the cache manager 120 selects any cache block from the plurality of cache blocks with a priority lower than the priority corresponding to the first session type, and assigns it to the first session S1 in step S186.
[0067] Referring to the usage record table URT shown in Table 8, in step S183, if the cache manager 120 determines that all the unlocked cache blocks L1, L2, and L5 are not all in use by the session according to the session number field of the usage record table URT, step S184 is executed. In step S184, the cache manager 120 selects the cache block whose last locked time is the longest from the cache blocks not in use by the session according to the expiration field of the usage record table URT. For example, the cache manager 120 selects the cache block L1 whose last locked time is the longest from the cache blocks L1 and L2 not in use by the session according to the expiration field of the usage record table URT. Then, in step S186, the cache manager 120 assigns the cache block L1 to the first session S1.
[0068]
[0069] Table 8
[0070] Then, step S190 is executed, the cache manager 120 releases the cache block assigned in step S180, and loads the required data block from the data source 140 to the assigned cache block. After step S190, steps S150 to S170 are then executed in sequence. Steps S150 to S170 are as described above and are not described in detail here.
[0071] The above description is based on the case where the application 110 establishes a first session S1 and the first session S1 requests a data block. It should be noted that the first session S1 can send multiple requests to access different data blocks, that is, the session can execute the cache management method multiple times. In another embodiment, after the application 110 establishes the first session S1, the application 110 can further establish a second session S2, and the second session S2 requests a data block. The second session S2 has a second session type, and the second session type corresponds to a second priority. The data block requested by the second session S2 can be the same as or different from the data block requested by the first session S1, and the second priority corresponding to the second session type of the second session S2 can be the same as or different from the first priority corresponding to the first session type of the first session S1. In addition, the application 110 can establish the second session S2 before or after the first session S1 ends. In addition, the second session S2 can also be established by another application. The present invention is not limited to this. In this embodiment, similar to the first session type, the second session type can be one of in-line, on-line, at-line and off-line.
[0072] Please refer to Figure 5 and 6 and Table IX. Figure 5 FIG. 4 is a schematic diagram of a session-based cache management system 100 according to another embodiment of the present invention. Figure 6 A flow chart of a session-based cache management method according to another embodiment of the present invention is shown. A session-based cache management system 100 establishes a first session S1 with an application 110 having a first session type, and the first session type corresponds to a first priority. The cache management system 100 includes a cache manager 120, a cache memory 130, and a data source 140. The data source 140 stores a plurality of data blocks D1, D2, D3, D4, D5, D6, D7, ... The cache memory 130 has a plurality of cache blocks L1, L2, L3, L4, L5, ... The cache manager 120 can assign cache blocks L1, L2, L3, L4, L5, ... and has a usage record table URT, which is shown in Table 9. The usage record table URT records a priority of each cache block L1, L2, L3, L4, L5, ..., and the cache manager 120 is configured to perform the following steps.
[0073]
[0074] Table 9
[0075] In step S210 , the cache manager 120 receives a request for loading a data block D3 sent by a first session S1 . The first session S1 has a first session type (at-line), and the first session type (at-line) corresponds to a first priority.
[0076] In step S220, the cache manager 120 assigns a cache block L4 with a priority lower than the first priority to the first session S1 according to the usage record table URT. Please refer to Table 9. Since the priority (off-line) of the cache block L4 is lower than the first priority corresponding to the first session type (at-line), the cache manager 120 assigns the cache block L4 to the first session S1.
[0077] In step S230 , the cache manager 120 loads the data block D3 into the assigned cache block L4 .
[0078] In step S240, the cache manager 120 updates the priority of the assigned cache block L4 in the usage record table URT to the first priority. The cache manager 120 updates the priority field of the assigned cache block L4 in the usage record table URT to at-line, and the updated usage record table URT is shown in Table 10. In addition, the cache manager 120 also updates the lock field of the assigned cache block L4 in the usage record table URT to 1, the session number field to 1, the expiration field to the last lock time T4, and the block field to the data block D3, as shown in Table 10.
[0079]
[0080] Table 10
[0081] The disclosed cache management method and cache management system based on the session type can manage the cache memory according to the priority and usage record table corresponding to the session type, so that the data operation requirements with high priority can obtain the operation resources first and the cache memory can be stored for a longer time, so as to improve the efficiency of data access and operation. In particular, when applied in the manufacturing process, the cache memory can be managed according to the strength of the real-time requirements of the data and its operation, so that the data operations required for measurement, calculation and control feedback are combined with the requirements of the production line operation, and the idleness or waste of the production line caused by data access is reduced, so as to improve the production capacity.
[0082] In summary, although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention. Those skilled in the art to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope defined in the attached claims.
Claims
1. A session-based cache management method, applicable to a cache manager for accessing a cache memory, characterized in that: The cache memory includes a plurality of cache blocks, and the usage record table of the cache manager records the priority of each of the cache blocks. The cache management method includes: receiving a request for loading a first data block sent by a first session, the first session having a first session type, and the first session type corresponding to a first priority; Assigning the cache block with a priority lower than the first priority to the first session according to the usage record table; Loading the first data block into the assigned cache block; and updating the priority corresponding to the assigned cache block in the usage record table to the first priority, The first conversation type is in-line, on-line, at-line or off-line.
2. The cache management method as described in claim 1, wherein the priority corresponding to in-line is higher than the priority corresponding to on-line, the priority corresponding to on-line is higher than the priority corresponding to at-line, and the priority corresponding to at-line is higher than the priority corresponding to off-line.
3. The cache management method as claimed in claim 1, wherein the usage record table further records the number of sessions for each of the cache blocks, the cache management method further comprising: The number of sessions corresponding to the assigned cache block in the usage record table is updated to 1.
4. The cache management method according to claim 3, further comprising: End the first conversation; as well as After the first session is ended, the session quantity of each cache block corresponding to the first session in the usage record table is reduced by 1.
5. The cache management method according to claim 1, further comprising: receiving a request for loading the first data block sent by a second session, the second session having a second session type, and the second session type corresponding to a second priority; Assigning the cache block storing the first data block to the second session according to the usage record table; and When the second priority is higher than the first priority, the priority corresponding to the assigned cache block in the usage record table is updated to the second priority.
6. The cache management method as claimed in claim 5, wherein the usage record table further records the number of sessions for each of the cache blocks, the cache management method further comprising: After the cache block storing the first data block is assigned to the second session, the session number corresponding to the assigned cache block in the usage record table is increased by 1.
7. The cache management method according to claim 6, further comprising: End the second conversation; as well as After the second session is ended, the session quantity of each cache block corresponding to the second session in the usage record table is reduced by 1.
8. The cache management method as claimed in claim 1, wherein the usage record table further records the number of sessions for each of the cache blocks, the cache management method further comprising: receiving a request for loading a second data block sent by a second session, the second session having a second session type corresponding to a second priority; Assigning one of at least one cache block with a session number of 0 among the cache blocks to the second session according to the usage record table; Loading the second data block into the cache block assigned to the second session; as well as The session number in the usage record table corresponding to the cache block assigned to the second session is increased by 1.
9. The cache management method of claim 5 or 8, wherein the second conversation type is in-line, on-line, at-line or off-line, and the priority corresponding to in-line is higher than the priority corresponding to on-line, the priority corresponding to on-line is higher than the priority corresponding to at-line, and the priority corresponding to at-line is higher than the priority corresponding to off-line.
10. A session-type based cache management system, capable of establishing a first session with an application program having a first session type, wherein the first session type corresponds to a first priority, wherein: The cache management system includes: Data source, which can store multiple data blocks; A cache memory having a plurality of cache blocks; and The cache manager can assign the cache blocks and has a usage record table, wherein the usage record table records the priority of each of the cache blocks, and the cache manager is configured to perform: When receiving a request for loading a first data block sent by the first session, the cache manager assigns a cache block with a priority lower than the first priority to the first session according to the usage record table. loading the first data block from the data source into the assigned cache block, and updating the priority corresponding to the assigned cache block in the usage record table to the first priority, The first conversation type is in-line, on-line, at-line or off-line.
11. The cache management system as claimed in claim 10, wherein the priority corresponding to in-line is higher than the priority corresponding to on-line, the priority corresponding to on-line is higher than the priority corresponding to at-line, and the priority corresponding to at-line is higher than the priority corresponding to off-line.
12. The cache management system as claimed in claim 10, wherein the usage record table further records the number of sessions for each of the cache blocks, and the cache manager is further configured to execute: The session quantity corresponding to the assigned cache block in the usage record table is updated to 1.
13. The cache management system of claim 12, wherein the cache manager is further configured to execute: After the application program ends the first session, the session quantity of each cache block corresponding to the first session in the usage record table is reduced by 1.
14. The cache management system of claim 10, wherein the application creates a second session having a second session type, and the second session type corresponds to a second priority, and the cache manager is further configured to execute: When receiving a request from the second session to load the first data block, assigning the cache block storing the first data block to the second session according to the usage record table; and When the second priority is higher than the first priority, the priority corresponding to the assigned cache block in the usage record table is updated to the second priority.
15. The cache management system as claimed in claim 14, wherein the usage record table further records the number of sessions for each of the cache blocks, and the cache manager is further configured to execute: After the cache block storing the first data block is assigned to the second session, the session number corresponding to the assigned cache block in the usage record table is increased by 1.
16. The cache management system of claim 15, wherein the cache manager is further configured to execute: After the application ends the second session, the session number of each cache block corresponding to the second session in the usage record table is reduced by 1.
17. The cache management system of claim 10, wherein the application creates a second session with a second session type, and the second session type corresponds to a second priority, and the usage record table further records the number of sessions for each of the cache blocks, and the cache manager is further configured to execute: When receiving a request for loading a second data block sent by the second session, assigning one of at least one cache block of the cache blocks whose session quantity is 0 to the second session according to the usage record table; loading the second data block from the data source into the cache block assigned to the second session; and The session number in the usage record table corresponding to the cache block assigned to the second session is increased by 1.
18. A cache management system as described in claim 14 or 17, wherein the second session type is in-line, on-line, at-line or off-line, and the priority corresponding to in-line is higher than the priority corresponding to on-line, the priority corresponding to on-line is higher than the priority corresponding to at-line, and the priority corresponding to at-line is higher than the priority corresponding to off-line.
Citation Information
Patent Citations
Memory system, memory access method and graphic processing system
CN101470671A
Flash memory management method and computer system
CN101539887A