wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Virtual memory

profile
Abhijit Rajpurohit
Jul 11, 2023
0 Likes
0 Discussions
100 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

Real time scheduling

Blog banner

Starvation

Blog banner

Paralysis/Paralysis Stroke

Blog banner

The Future of Web Development in 2026: Trends Every Business Must Know

Blog banner

Data Mining

Blog banner

Festive Ethnic Wear Guide: Patola-Inspired Looks for Every Celebration

Blog banner

Zero-Day Attack

Blog banner

MODERN OPERATING SYSTEMS

Blog banner

Data Warehousing

Blog banner

Multithreading in Operating System

Blog banner

Security Issues

Blog banner

Smartsheet

Blog banner

Admissions Open: Why This Is the Right Time to Choose the Best School for Your Child

Blog banner

Heart Fulness Meditation

Blog banner

Defining youtubr

Blog banner

Operating system

Blog banner

SECURITY TOOLS

Blog banner

Phishing Isn't Getting Smarter — You're Just Seeing More of It

Blog banner

What are Virtual Machines

Blog banner

Why Peace River Is Florida’s Most Underrated Outdoor Adventure Destination?

Blog banner

Cache Memory in Operating Systems

Blog banner

SQL Injection Techniques

Blog banner

Bitcoin sent using radio waves! No internet!

Blog banner

Embracing the power of Modern Machine UNIX

Blog banner

Why Iron-Rich Foods Matter and How to Include Them in Indian Meals

Blog banner

SPAM

Blog banner

Strengthening Active Directory Security

Blog banner

Memory management

Blog banner

Southern Turkey Earthquake: Causes and Consequences of a Tragic Natural Disaster

Blog banner

Digital Marketing Ethics Transparency Trust And Brand Reputation digital

Blog banner

What is Network Security?

Blog banner

Interrupts - Types, Working & Importance

Blog banner

MENDELEY

Blog banner

Deadlock

Blog banner

GIS Applications: How Different Industries are Leveraging Geospatial Data

Blog banner

Texting is actually better than talking in person

Blog banner

MEMORY MANAGEMENT REQUIREMENT

Blog banner

History of Money

Blog banner

Mobile Survey

Blog banner

Deadlock

Blog banner

OPERATING SYSTEM OBJECTIVES AND FAULT TOLERENCE.

Blog banner

FREE VERSION OF G-MAIL

Blog banner