Artificial intelligent assistant

What does SWAP mean in top? It says p: SWAP -- Swapped size (kb) The non-resident portion of a task's address space. q: RES -- Resident size (kb) The non-swapped physical memory a task has used. RES = CODE + DATA. Okay, what does "non-resident portion" mean? Does SWAP mean that hard disk is used as additional memory?

Yes, swap is when the hard disk is used to hold memory once RAM is full; on Linux it's normally held in a separate swap partition, but can use files. Mac and Windows use files on the regular filesystem. Paging excess memory out to disk like that keeps the OS from having to kill processes to free up real RAM, which is why it is generally recommended to have a swap partition for your Linux installation. However, it's a great deal slower (several orders of magnitude) than real RAM, which is why it's only used as a last resort (and why so much time is put into figuring out which page [4kB chunk of memory] to send to swap).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8607b43f5e67434b8c740ddec30dc41f