Skip to main content

Memory Management in Trading Platforms

Page 1

International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395-0056

Volume: 09 Issue: 05 | May 2022

p-ISSN: 2395-0072

www.irjet.net

Memory Management in Trading Platforms Pratik Joshi ---------------------------------------------------------------------***---------------------------------------------------------------------

Abstract – With the increasing volatility in the market we

like good personal hygiene. We are physically healthier when we practice proper hygiene. Similarly, applications perform better when memory use is properly allocated. This paper demonstrates the risks of poor memory hygiene, including buffer overflow, memory leaks, memory allocation, and nulling out pointers. By the end of this paper, you will have a better understanding of why these processes could create security risks and how to avoid them.

have seen a sharp rise in number of trades occurring in the market. These platforms are designed to handle huge volume of trades thanks to the underlying technology. The memory management forms a base of these highly efficient algorithms. The technique in which OS loads programs into memory so that it can execute several such processes in parallel is a key functionality of the CPU. This paper will talk about common techniques used by trading platforms for managing memory of their applications. With high volume there is always a risk of crashing the application in the middle of a trading day. An immediate concern in most cases of a memory leak is unwanted behavior by the application that causes unexpected crashes, which could lead to damaged relationships with end users or clients who use the application. Worse yet, if an attacker were to figure out a way to trigger a memory leak, it could allow them to perform a denial-of-service attack. As such, memory leaks represent a combination of performance and security concerns. It is therefore recommended to keep memory management in mind while designing trading systems where computation is of essence. Memory leaks can be difficult to avoid, but there are plenty of tools out there that can help. It’s recommended that you utilize them regardless of which programming language you prefer. A compromised memory could lead to denial-of-service or corrupt the data of your application. Some common techniques will be covered in this paper using which the application designer can make a better system.

Memory is a collection of data like instructions for processor or large array of data. During execution of programs CPU uses memory to hold data, fetches instructions from memory. To optimize this flow and make the process efficient in multi programming environment we need to ensure efficient utilization of memory. In case of high frequency trading platform where there is huge volume every millisecond of reading data from memory matters.

1. Overview of Compilers Compilers for C and C++ parse source code and emit instructions for the CPU they are targeting. These instructions are commonly called assembly instructions. Since these instructions are for the CPU itself, with no intermediate layer, they are described as low‑level instructions. Other programming languages, like C# or Java, have an entire middle layer between the compiler‑generated instructions and what is sent to the CPU, which helps prevent mistakes. These two languages are thought of as higher‑level programming languages because they do more behind the scenes to add safety and security to an application. Conversely, the safety of an application built with C/C++ is left in the developer’s hands with very few safeguards in place to prevent potential bad code from executing on the CPU.

Key Words: Fragmentation, paging, buffer overflow, memory allocation, high frequency trading, in-memory computing.

1. INTRODUCTION Financial industry heavily uses high-frequency trading in which the securities are traded on the financial markets using high-speed rules-based strategies, and numerous simultaneous trades – with all the decisions driven by computerized, quantitative models. The computer program analyzes the market data and trend and computes a buy or sell trade or perform other financial services. They compute the data points to predict the market movement and act. These trades are 10 times faster than time taken by a trader doing this manually. These techniques prove to be handy during market instability, market volatility or financial crisis. Because of the time constraint the systems act much quickly thereby optimizing the use of technology on trading platforms.

Static and Dynamic Loading: A loader is used to load a process into the main memory. A static loader would generally load the entire routine into a fixed address. Dynamic loader loads a routine only after it has been called. Swapping: When a process executes it must have resided in memory. Swapping is a process responsible for swapping routines into main memory from secondary memory. Swapping allows high number of processes to be run by efficiently using algorithm and fitting into memory.

Memory management represents a vital part of secure application development. Proper memory management is

© 2022, IRJET

|

Impact Factor value: 7.529

|

ISO 9001:2008 Certified Journal

|

Page 2981


Turn static files into dynamic content formats.

Create a flipbook
Memory Management in Trading Platforms by IRJET Journal - Issuu