wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Virtual memory

profile
Abhijit Rajpurohit
Jul 11, 2023
0 Likes
0 Discussions
96 Reads

Virtual memory is a way of representing your memory that's abstracted from the physical memory on your machine. It makes use of both your RAM and your storage space, whether that's on a traditional hard drive or an SSD. In Linux, this is done at the kernel and hardware levels².

Linux supports virtual memory, that is, using a disk as an extension of RAM so that the effective size of usable memory grows correspondingly. The kernel will write the contents of a currently unused block of memory to the hard disk so that the memory can be used for another purpose¹.

Virtual memory takes advantage of the fact that not all of the memory that's being used in theory is being used all of the time. Programs in memory are broken down into pages and the parts that the kernel deems as unnecessary are "swapped out," or moved to the hard drive. When they're needed, they can be "swapped in," or brought back into RAM².

The space used for virtual memory on a drive is known as "backing store," or "swap space." In the Windows world, it's usually implemented as a file, known as a "swap file." It's also possible to do this in Linux, but it's much more common to use a dedicated disk partition².

The upshot of virtual memory is that it's possible to run large programs by using more memory than the physical RAM in your machine. Virtual memory also allows developers to create applications without having to know how a computer's memory is organized².

The main downside historically with virtual memory has been that hard drives have been slower than RAM. If a machine doesn't have enough RAM, the system can keep swapping pages in and out endlessly, a process known as "thrashing." This is less of an issue on modern PCs with more RAM and faster SSDs displacing mechanical hard drives, but it's still something to be aware of


Comments ()


Sign in

Read Next

The Impact of Cyber Forensics on Corporate Governance and Compliance

Blog banner

Steganography

Blog banner

Old age lifestyle

Blog banner

Operating system

Blog banner

Top 5 Post-Wedding Skin Care Tips

Blog banner

12 Principles of Animation

Blog banner

Cache Memory(142)

Blog banner

Paginng In OS

Blog banner

AutoML: The Future of Automated Data Science

Blog banner

File Management

Blog banner

Types of Threads

Blog banner

The New Classic: Indo Western Patola Outfits for Today’s Woman

Blog banner

File management

Blog banner

Music

Blog banner

Big O Notation

Blog banner

The Psychology of Diversity, Equity & Inclusion: How Inclusive Workplaces Boost Productivity

Blog banner

RAID

Blog banner

Decrypting Cryptocurrency: Tracing Transactions in Cyber Investigations

Blog banner

Craziness of dream 11 and how it impacts on our life

Blog banner

Precision-Recall in Data Science

Blog banner

Virtual Memory

Blog banner

Pro-Tips On How To Keep your Foot Healthy

Blog banner

What is Vishing?

Blog banner

Vikrant’s first blog

Blog banner

Drawing tips for a beginner

Blog banner

Cross site scripting Attack

Blog banner

Modern operating system

Blog banner

Python as a tool for data analysis

Blog banner

Caching windows

Blog banner

The Sunny Side of Instagram

Blog banner

Memory management

Blog banner

What is Virtual Memory

Blog banner

Digital black market or dark net poses a national security threat?

Blog banner

FASHION

Blog banner

Social engineering in cyber security

Blog banner

Optimization of operating system design

Blog banner

Bharat Maps

Blog banner

Paddle Through Paradise: The Best Kayak Launch Points Near Arcadia

Blog banner

Building a Better You: Fitness Tips and Inspiration.

Blog banner

Memory Management

Blog banner

Deadlock in Operating System

Blog banner

"Life as a Part-time Student"

Blog banner