Font Size: a A A

Research On Multithreading Weak Deterministic Technology Based On LIRS Cache Optimization

Posted on:2019-11-15Degree:MasterType:Thesis
Country:ChinaCandidate:K Y WangFull Text:PDF
GTID:2428330599977711Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The rise of parallel programs in recent years has also raised new issues for program writing,development and maintenance.In the course of execution of multi-threaded programs,data exists among threads that share data widely and synchronously.Due to the competition and mutual interference between them,the uncertainty of the multi-threaded program has become the focus of domestic and foreign academic research.Due to the emergence of uncertainty,difficulties have arisen in the development,maintenance,fault tolerance and security of multi-threaded programs.In order to solve these difficulties,deterministic technology emerged.This paper adopts weak deterministic technology in deterministic technology and studies from the aspect of thread synchronization competition.By dividing the thread operation phase,the thread running process is divided into parallel and serial.In parallel phase threads do not interfere with each other and execute in parallel.In serial phase,threads enter in accordance with the order in which the tokens are obtained,and the results are submitted to the memory,avoiding the inconsistencies caused by the different order of the synchronization points in the threads.At the same time,the memory between threads is isolated from each other to avoid data competition between threads.First of all,this paper adopts the weak deterministic thinking to study the synchronization competition between threads,set the concept of transaction execution for the thread,set the fence at the synchronization point and set up the token queue,and let the thread follow the token after reaching the synchronization point.Sequentially enter the serial submission phase to avoid the uncertainty due to synchronous competition.In order to solve the data competition caused by another factor of uncertainty,the memory resources originally shared between threads are isolated to prevent the threads from transferring data to each other,and all the submit operations must be performed under the premise of acquiring the token.Avoid the uncertainty caused by data competition.Secondly,because the cache has become the last-level shared resource to solve data competition,the LRU cache replacement algorithm originally adopted is widely used in single-threaded programs due to locality of data access,but it is not effective in multithreaded programs.Very ideal.This article borrows from the idea of LIRS(Low Interreference Recency Set)algorithm which performs better in multi-threaded programs.By comparing the number of other blocks read from the same cache block,it dynamically adjusts the data blocks residing in the cache to improve system performance.In order to verify the proposed method,this paper uses the trace-driven simulation method widely used in academic circles at home and abroad for verification.The traceCPU mode in the Gem5 hardware simulator is used to collect the trajectory of program execution,and then follow the trajectory simulation.The cache hit rate of the two algorithms,and observe the change trend of the hit rate by adjusting the cache size.Experimental results show that the proposed method can ensure the determinism of multithreaded programs,and the LIRS caching algorithm is used to optimize the system performance.
Keywords/Search Tags:multithread program, weak determinacy, LIRS, cache trace-driven
PDF Full Text Request
Related items