Definition of

Swap

Money

The idea of ​​a swap can refer to a future exchange of money, services or goods.

Swap is a term in the English language that can be translated as “exchange” . The concept is usually used in our language to refer to barter, exchanges or commutations that take place in different areas.

In the context of finance , a swap is an agreement that involves an exchange , to be developed in the future , of services, goods or money. When money is exchanged, the swap is associated with an interest rate known as Interest Rate Swap ( IRS ).

The money swap, therefore, represents a double commitment : to pay and collect money in the future. The payment obligation for one party, thus, constitutes a right to collection for the other. It can be said that the swap is a capital flow that begins with the signing of the contract and ends with its expiration.

Swap in computing

For computing , the swap is called memory or swap space and it is a partition or file on a hard disk (hard drive) where the images of those processes that are not saved in physical memory are stored.

Swap is used to manage the memory of a computer. The operating system looks for processes that register little activity and places them in the swap, freeing up the main memory to load new processes. If the activity is modified, an exchange is made and the process moves from the hard disk to RAM . What the swap allows is to simulate that there is a memory capacity greater than what is truly available.

Computer components

In computing, the notion of swap is associated with memory management.

Its usefulness

In other words, it is possible to say that swap space provides a computer with more memory than is available in the RAM slots. That said, many users ask the following question: if my computer has a large RAM memory capacity, is a swap necessary? To answer this question, it is necessary to take into account several questions, although in short it is always advisable to create this space for exchange , even if it is not necessary at a crucial level.

As explained above, having swap is useful to allocate RAM to the most used processes, and free it from those that do not run as frequently, or that are temporarily inactive. One of these cases occurs when working with an SSH server ( Secure SHell , which is known in our language as a secure command interpreter ), a mechanism used to control a computer remotely; This is a process that must always be active to respond to a potential request, although it will only start working when someone establishes a connection .

swap example

A practical example is detailed below to facilitate understanding of the potential benefits of swap space in the operation of an operating system.

If a person is using an image editor and decides to open a very large image, which requires approximately 75% of their computer's RAM , and then begins to perform more than one search on their hard drive without closing it, the computer You will be faced with a compromised situation, since you will have to maintain the image while trying to respond to user commands as efficiently as possible, but with only 25% of the main memory.

Thanks to the use of the swap technique, the computer could transfer a large part or all of the process corresponding to the large image to disk, carry out the searches with all that amount of RAM memory and, finally, return the large process to the disk. main memory, if requested by the user .