Improving Performance of a Trading System through Lock-Free Programming

Detta är en Kandidat-uppsats från KTH/Skolan för elektroteknik och datavetenskap (EECS); KTH/Skolan för elektroteknik och datavetenskap (EECS)

Sammanfattning: Concurrent programming is a form of computing, where several computations are executed in overlapping time periods. This can improve a system’s capability of handling growing amounts of work and execute faster on multicore processors. Lock is a usual tool used to ensure shared data is handled correctly. However, using locks could also have some performance disadvantages caused by its overhead and waiting time during high contention.The company FIS believes a lock-free implementation using atomic operations could improve ability to handle growing amount of work and speed of a component in their trading system. Hence, the aim of this study is to provide insight of how impactful lock-free programming could be. This was achieved by developing a new version of the component and comparing its performance with the original lock-based implementation. The new implementation was developed by eliminating locks in the component and replacing them with lockfree data structures. However, a lock was still needed in one of the data structures, making the new implementation only partially lock-free. Results from tests performed directly on the component showed that the partially lockfree version performed better in some areas and worse in other. Furthermore, the partially lock-free implementation performed better in isolated tests which were used to measure parts of the component where direct tests could not be performed. This gives a sign of that a general performance improvement was achieved by using lock-free programming in the provided component.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)