Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
9
9747765
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI / CD
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
  • Noreen Freitas
  • 9747765
  • Issues
  • #7

Closed
Open
Opened Aug 14, 2025 by Noreen Freitas@noreenfreitasMaintainer
  • Report abuse
  • New issue
Report abuse New issue

Digital Memory and you


One of the key parts to any computer is working memory/Random Entry Memory (RAM). Everyone needs a number of it! RAM is what the working system makes use of to access varied varieties of information. RAM is to not be confused with a hard disk/drive, which is a knowledge storage machine as opposed to a working memory system. A tough disks data will not be readily out there for processor to use, that means if you would like to make use of a program you should first load it into RAM. You might then ask your self, "what if I don’t have sufficient RAM? " With virtual Memory Wave Routine! Digital memory is a "virtual area," which maps digital addresses to physical addresses. This allows your exhausting disk to literally be utilized in the same method as RAM, nevertheless it can take very long time to entry the information for a single learn or write. To resolve this drawback, the working system masses information into memory for quick access for limitless studying and writing.


Usually loading the specified as well as surrounding information, primarily based on the assumption that similar knowledge will likely be placed near one another. For instance, it is likely a 12 MB track might be performed from begin to complete, so the operating system loads massive chunks of the information from disk into RAM quite than calling out to disk each couple of seconds (causing the music to halt). These "chunks" of data are known as pages or frames, and are contiguous piece of memory, often several kilobytes in measurement. The way that the working system handles loading a page is by using one thing referred to as a page table. A page desk is simply a file which shops the mapping between virtual and physical memory. Although web page measurement can differ between working programs, it's fixed for a given system. A virtual handle often consists of 32 or 64 bit, the place varied portions of the digital handle are used as an index to a web page desk, dictionary or offset.


In the picture above a 32 bit digital address is used to point to a physical address. 2 or 4 directories). The remaining 12 bits are often referred to because the offset to the 4Kb memory web page (or body). Web page tables typically are available 4Kb sizes (nevertheless it does rely upon the system), and to make use of a page table it should first be loaded into memory (RAM) before use. Once loaded into ram, page tables can be used to redirect digital memory to bodily memory. Nonetheless, to load a table into RAM the working system should first evict one in every of the other pages presently loaded, how does the system choose? Optimally, it should only remove the pages that want to be used furthest in the future… LRU - Least Not too long ago Used: evict the web page desk left unutilized for the longest time frame. LFU - Least Steadily Used: evict the desk that was used the least.


We wish to entry a program, how a lot area is required for the page desk? This is inefficient, and is a wonderful instance of why we use multi-level page tables. This leaves use to find out how we want to allocate to the first and second degree. Once we want to load a single physical tackle. This is a significant lower (several orders of magnitude) in required RAM from single-stage page desk. We must swap out these pages once in a while to use different mapped physical addresses, which does require a good amount of time. To fight this we attempt to use different page eviction strategies (listed within the page tables part of this submit). Discover the web page index did not change, since that's given. Since the primary level page desk was reduced to solely 4 bits, there was a (32 - four - 12) 16 bit offset for the second page table.


This could would change a second degree page table must be loaded into RAM since it has extra Page addresses it may possibly point to, therefore a better chance of a hit. A web page fault occurs when a new web page must be introduced into RAM because it must be accessed, however just isn't present. The answer is to observe a page eviction algorithm and convey the web page into memory. Thrashing occurs when if there's a poor page eviction algorithm, not have sufficient usable RAM, or too many applications running on a computer. Typically, the answer is so as to add extra RAM or scale back the number of applications operating at a given time. Video by Dr. Mike Murphy, clear explanation of different page desk implementations. Video by Prof. S. Raman, lecture/instance of calculating digital memory to physical. Lecture Slides from the College of Iowa. Example Downside, by way of stackoverflow.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: noreenfreitas/9747765#7