Virtual Memory and Paging

In: Computers and Technology

Submitted By kakon
Words 621
Pages 3
Undergraduate Program
Bachelor of Computer Science (Systems and Networking)

Advanced Operating Systems
CSNB324

Submitted by:

Mohammad Ali – SN094901

Submitted to:

Dr. Mohd Ezanee
Submission date:

04/08/2015

(a) Virtual memory can be based on Paging only, Segmentation only or a combination of the two. (i)

With the help of a diagram, show how a virtual address is translated into a physical address in a paging-based memory management scheme OR in a segmentation-based memory management scheme.

The mechanism used for reading a word from memory involves the translation of a virtual address consisting of page number and offset into a physical address, consisting of frame number and offset and this translation is done using a page table. Figure 1 shows the structure of paging mechanism. When a particular process is running, a register holds the starting address of the page table for that process. The page number of a virtual address is used to index that table and look up the corresponding frame number. This is combined with the offset portion of the virtual address to produce the desired physical address.

Figure 1: Adress Translation in a paging-based memory management

(ii) What is the memory management technique used in Linux?

Demand paged virtual memory is used as memory management technique in Linux. It is a dynamic memory allocation technique that consists of deferring page frame allocation until the last possible moment which can be the moment when a process attempts to access a page that is not present in RAM. The basic unit of memory allocation for this technique is page and the page size is 212 (4096 bytes or 4KB).

(iii) Every virtual memory reference causes two physical memory accesses - to fetch the appropriate page table entry and to fetch the desired data. Thus, the memory access time is doubled. What…...

Similar Documents

The Virtual Memory Manager (Vmm)

...The Virtual Memory Manager (VMM) The Difference between virtual memory and physical memory Physical memories are the RAM chips purchased and placed in a slot on the computer motherboard. The RAM is the first memory used when the computer requires memory usage, such as for loading an application or opening a document.  Virtual Virtual memory is stored on the hard drive. Virtual memory is used when the RAM is filled. Virtual memory is slower than physical memory, so it can decrease the performance of applications.  Allocation Physical memory allocates information in a "first in, last out" process. The information is placed on the stack. Virtual memory uses a process called paging. These pages are laid across the hard drive in fixed sizes.  Size 1. Physical memory is limited to the size of the RAM chips installed in the computer. Virtual memory is limited by the size of the hard drive, so virtual memory has the capability for more STORAGE. 2. Virtual memory is a memory management technique developed for multitasking kernels. 3. In virtual memory Operating systems have memory areas that are pinned (never swapped to secondary storage). For example, interrupt mechanisms rely on an array of pointers to their handlers, such as I/O completion and page fault. If the pages containing these pointers or the code that they invoke were pageable, interrupt-handling would become far more complex and time-consuming, particularly in the case of page fault......

Words: 1372 - Pages: 6

Virtual Memory

...head: THE BENEFITS AND USES OF VIRTUAL MEMORY The Use and Benefits of Virtual Memory Jacqueline Askew University of Phoenix Abstract There are many computer users that are not familiar with computers or the way they function. This paper is centered around and will provide a definition of virtual memory. Information will also be provided on the benefits and how virtual memory used. The Use and Benefits of Virtual Memory There are so many facets to computers and how they function. Someone that is a novice user is not aware of how they run. They just turn them on and ready, set go. The more advanced computer user has a better insight to the functionality and maintenance of the computer. Whether it is a laptop or desktop the most common part of an operating system is virtual memory. Based on how much memory a computer has determines how many programs can be run. Virtual memory uses free space found on the hard drive in order to allow other programs to run. This seamless transition is unnoticeable to the human eye. Because the virtual memory frees up space in the Random Access Memory, other applications can load. This is an automatic process, so even with the standard memory virtual memory makes it seems like it has more. One of the benefits of virtual memory is the financial side. There is not a lot of out of pocket expense because it becomes more expensive to purchase RAM chips than hard disk space. The virtual memory will allow a user to run......

Words: 472 - Pages: 2

The Benefits and Uses of Virtual Memory

...The Benefits and Uses of Virtual Memory Marcia Amnay POS/355 Steven Kernan April 22nd, 2013 The Benefits and Uses of Virtual Memory This paper will discuss the benefits and uses of virtual memory. Programs require memory to start and run on computers. When several jobs are being processed at the same time, the operating system must keep track of how the computer’s memory and make sure there is enough. Computers come with a limited amount of random access memory which is known as RAM. RAM is the main memory on a computer. If a user is running multiple applications at the same time, the RAM on it will not be enough to execute the processes. This is when virtual memory comes in and balances the process. Virtual memory is a memory management technique. Virtual memory is secondary memory that can act as if it were part of the main memory. When the RAM is used up, virtual memory places data by using the hard disk or another disk of some kind for space. The hard disk is much slower then RAM so the more virtual memory used, the slower your computer will run. The computer will look for areas on the RAM that are not in use and copy it to the hard disk to free up space on the RAM. Virtual memory keeps ‘active’ process in the RAM and keeps the ‘inactive’ processes on the address space on the disk. When an ‘inactive’ process is needed, it will bring that process back to the RAM from the disk. This process is running in the background without the user being......

Words: 788 - Pages: 4

Memory Management

...Memory management requirements can be broken up into five different sections: Relocation, Protection, Sharing, Local organization, and Physical organization. Many online resources confirm these exact requirements and seem to have the same information published so it is difficult to find something unique. It will be necessary to use information from the referenced textbook to explain memory management requirements. In a multiprogramming system, relocation is the act of moving a process into different areas of memory from which it began. To maximize efficiency, processes move into and out of main memory. Relocation therefore is essential for moving the process into available memory while keeping the memory reference information up to date. Protection of memory is best understood as preventing unwanted access to processes resident in memory and allowing authorized access only to the level allowed when permission is granted. It is important to understand that the physical processor and not the operating system is responsible for protecting memory since the operating system cannot always be scanning for memory reference violations (Stallings, 2012). Sharing capabilities are essential to reduce the amount of wasted or duplicated data in memory. Stallings stated, “The memory management system must therefore allow controlled access to shared areas of memory without compromising essential protection” (p. 309). In addition, shared memory is one of the fastest methods used for......

Words: 545 - Pages: 3

Memory Management

...Memory Management Federico Torres POS 355 April 9, 2013 CASTLE W. PHELPS, ABD Memory Management “I cannot guarantee that I carry all the facts in my mind. Intense mental concentration has a curious way of blotting out what has passed. Each of my cases displaces the last…”(Doyle, 1901). The way the brain manages memory is metaphorically speaking very similar to the way computers today manage memory. A memory management unit takes a huge part in the speed at which computers can operate. The memory management unit works systematically with the operating system and computer processing unit. There are two different parts to types of memory, primary, also referred to as main, and secondary. The former has two parts, one part for the kernel, which is reserved for the operating system, and the other part for the programs currently being executed. Memory management units must work efficiently in transferring information between primary and secondary. In order for this to succeed, there are a few requirements that memory management units must meet in order to fulfill the demands of users. Memory management units require relocation, protection, sharing, both local and physical organization, among processes in both primary and secondary memory. Two examples of operating systems that meet these requirements, but yet both manage memory differently are Windows and OS X, which is used by Macintosh as an operating system. Since main memory is shared among different types of......

Words: 2327 - Pages: 10

Virtual Memory

...There are many benefits of using virtual memory; the most important part is memory management, Memory management is the process of managing computer memory. The memory management subsystem of the operating system carries out this duty. Because the beginning of calculating, there has always existed the need for more memory than the existing physical memory in the system. Surrounded by many important jobs an operating system does in a computer memory allocation to the processes being implemented is the most important one. Operating systems should have the capability to assign memory when available and clear to make room for data and instructions when the memory is full. The capability to recognize the location of an entire program or a particular location in the physical memory is another responsibility the operating system should be able to accommodate. Operating systems are designed to take benefit of file system conveniences and virtual memory to address the needs of memory management. Data stored in long-term memory is saved as named objects called files, and data and instructions stored in virtual memory is addressed in a logical point of view. Because of the small ability of the virtual memory, only a limited part of a program is kept in virtual memory. The ability to address memory both reasonably and physically enables the operating system to separate processes and run several programs run concomitantly. By using virtual addresses and real addresses, the......

Words: 336 - Pages: 2

Memory Management

...Memory Management: Memory management operations are one of the fundamental core components of an operating system. The memory management function is to organize and manage memory hierarchy of the random access memory, bulky address spaces, memory mapping, manage alternate memory devices, physical allocation, de-allocation of processes, and the computer’s hard drive. Physical address is the address perceived by the memory unit. Virtual memory is the necessity of memory by exploiting the hard drive as additional access memory. What is Memory: An exceptional concept of virtual memory is to present a software application program with the appearance of additional or a considerable amount of memory accessible for its programming use. The virtual memory management system will require mapping functions, which execute address translations converting virtual addresses to physical addresses. The virtual or logical address is the address used to communicate a memory location and physical address is the actual memory location passed to the local memory bus. Paging: In paging, the local address space for both virtual and physical memory is divided into fixed size blocks called pages. The pages can be individually located at different areas in the hard drive and physical memory. The address translation is carried out by the memory management system of the central processing unit. Compare/Contrast: Windows: When running, Windows can access up to four gigabytes of physical......

Words: 843 - Pages: 4

Memory Management

...Windows and Linux- Memory Management Marlana Muzny POS/355 May 13, 2013 Joe Fischer Windows and Linux- Memory Management Memory management is the process that the operating system takes to manage the computers processes and memory. This means that the operating system has to figure out what sections of the memory are free and are being used at the current time allocating and reallocating as needed. Memory management is extremely important in how a computer operates. In this paper, we will compare the new Windows 8 to the Linux operating system and describe the differences in the memory management. Windows 8, it is the newest product in operating systems for Microsoft. With enhancements from the previous version, Windows 8 makes better use of the memory management than the previous version Windows 7. In Windows 7, Microsoft started making changes to the operating system when it came to memory management; however, fell short compared to what was already being done in Linux operating system. With the previous versions, most of the memory management occurred upon login. This slowed the processor down taking up all the resources at one time using the system memory. To address this issue and correct it in Windows 8, Microsoft implemented a start on demand model. What this means is that processes that are needed are delayed until the process is needed verses having all the processes start automatically when the computer is started. This makes more......

Words: 876 - Pages: 4

Memory Management

...Memory Management Amanda Dyer POS/355 August 28, 2014 August Smith Memory Management Windows and Linux are two popular operating systems used in today’s technology age. Windows is most commonly used as a desktop environment for beginners and has advanced into a well-developed operating system. Linux isn’t every users first choice as an operating system, but has become more and more popular over the past years. Linux is harder to manage than Windows, but comes with a great deal a configuration choices, as well as, flexibility. Both operating systems are similar in areas and offer countless benefits. However, with similarities come differences. One of the foremost differences between Windows and Linux is their memory management. What is memory management? According to Tutorialspoint (2014), memory management is the functionality of an operating system, which handles or manages primary memory. The memory structure affects the overall functionality and speed of the system. Therefore, it is one of the most vital parts of an operating system. Every memory location is tracked, whether free or allocated. The memory management system provides features such as address space, memory mapping, paging, shared virtual memory, fair physical memory allocation, and protection. Windows can access up to 4GB of physical memory on a 32bit x86 system. Paging on Windows allows for the use of a logical memory address vice the physical address. The logical address is......

Words: 605 - Pages: 3

Virtual Memory

...Peoples had great expectations on windows mobile after the release of its first preview of mobile OS. Microsoft seems to be lost in mobile market today because lack of customizability, limited multitasking, device compatibility and so on. Certainly the idea behind one size fits all is to remove the big difference between ARM based PC and x86 or x64 based PC. Right now I see most disagreements over web on Microsoft’s new design which shows persuade of creating single platform for all type of hardwires like PDAs, Laptops, Palmtops, Desktops etc. But I think it’s a good idea to bring up in order to lead mobile market. Apple is already in a run to merge Mac OS and IOS together, to some extend that bought an extra ordinary feature for the organization to role the market. On the other hand companies like Google (Android), Canonical (Ubuntu) are also showing their efforts in bringing their products into a single universal OS. Mobiles are not less than a PC these days. An ARM based OSs like Debian, Android, Chrome OS, Firefox OS, Kali Linux are just the best examples running on PCs and PDAs. Although there can be some issues with the hardware and application support I do agree but someone (so why not Microsoft?) has to take a first step to lead and eventually that will be fruitful outcomes thereafter. But if this idea hits then developers need not to worry about writing same applications in multiple languages, overall it will be cost effective and so on. ......

Words: 351 - Pages: 2

Memory Manaement

...OPERATING SYSTEMS MEMORY MANAGEMENT Jerry Breecher 8: Memory Management 1 OPERATING SYSTEM Memory Management What Is In This Chapter? Just as processes share the CPU, they also share physical memory. This chapter is about mechanisms for doing that sharing. 8: Memory Management 2 MEMORY MANAGEMENT Just as processes share the CPU, they also share physical memory. This section is about mechanisms for doing that sharing. EXAMPLE OF MEMORY USAGE: Calculation of an effective address Fetch from instruction Use index offset Example: ( Here index is a pointer to an address ) loop: load add store inc skip_equal branch loop ... continue .... register, index 42, register register, index index index, final_address 8: Memory Management 3 MEMORY MANAGEMENT Definitions • The concept of a logical address space that is bound to a separate physical address space is central to proper memory management. • Logical address – generated by the CPU; also referred to as virtual address • Physical address – address seen by the memory unit • Logical and physical addresses are the same in compile-time and loadtime address-binding schemes; logical (virtual) and physical addresses differ in execution-time address-binding scheme 8: Memory Management 4 MEMORY MANAGEMENT Relocatable Binding Definitions Means that the program image can reside anywhere in physical memory. Programs need real memory in which to reside. When is the location of that real memory determined? • This is called......

Words: 2753 - Pages: 12

Virtual Memory

...What are some differences from the new version that make creation and deployments of VMs easier (or better)? The essential contrasts are STANDARD accompanies more predictable execution on the CPU and system, while likewise offering burden adjusting and auto-scaling though BASIC does not offer these components. A virtual machine format is a library resource that involves a hardware profile, a virtual hard plate, and an optional guest working structure profile. Formats give a regulated assembling of hardware and programming settings that you can use to make different new virtual machines organized with those settings. The essential contrasts are STANDARD accompanies more predictable execution on the CPU and system, while additionally offering burden adjusting and auto-scaling though BASIC does not offer these elements. Explain in detail some enhancements of the VMware tools device drivers? The VMware Tools establishment contains numerous gadget drivers which help to improve execution. It relies on upon the Operation System which ones get introduced, yet this is a rundown of what can be enhanced as * SVGA Driver – Enables 32-bit shows, high show determination and speedier design execution. On windows based frameworks who are vista or later the VMware SVGA 3D (WDDM) driver is introduced to bolster Aero. * SCSI Driver – If you determine to utilize a Bus Logic Adapter, the visitor OS utilizes this driver. Some late visitor OSes will contain LSI Logic Parallel or......

Words: 396 - Pages: 2

Cis512 Week 9 Assignment 4 the Virtual Memory Manager (Vmm) Cis 512 Week 9 Assignment 4 the Virtual Memory Manager (Vmm)

...mistakes because of precision errors. When using floating point numbers, one must make sure that the correct number of digits is used in a calculation because rounding errors can produce values that lead to errors. Consider the floating point format, exponential format, and binary coded decimal (BCD). Write a four to five (4-5) page paper in which you: 1. Analyze the floating point format in order to: a. Determine how floating point numbers are stored in memory. b. Discuss the ease or difficulty of manipulating and using floating point numbers in arithmetic calculations. 1. Determine whether or not you believe that the floating point format is memory efficient. Provide a rationale to support your answer. 2. Analyze the format used to store numbers using the binary coded decimal format. Determine whether the BCD format is more or less memory efficient than the floating point format. 3. Compare and contrast the BCD format to the floating point format in terms of: a. precision b. performance in calculations c. memory usage 1. Select the format (floating point format, binary coded decimal (BCD), or exponential format) that you would recommend for processing efficiency and explain why. 2. Floating point numbers can introduce rounding errors in the banking industry, which may lead to financial benefit for the bank but not for the customer. Analyze the ethics of knowingly benefitting from rounding errors. Propose a plan on how the rounding error should be handled. ......

Words: 2720 - Pages: 11

Cis 512 Wk 9 Assignment 4 the Virtual Memory Manager

...CIS 512 WK 9 ASSIGNMENT 4 THE VIRTUAL MEMORY MANAGER To purchase this visit here: http://www.activitymode.com/product/cis-512-wk-9-assignment-4-the-virtual-memory-manager/ Contact us at: SUPPORT@ACTIVITYMODE.COM CIS 512 WK 9 ASSIGNMENT 4 THE VIRTUAL MEMORY MANAGER CIS 512 WK 9 Assignment 4 - The Virtual Memory Manager Most operating systems use a virtual memory manager (VMM) whose responsibility is to manage the relationship between the virtual organization of memory as seen by an application with the physical organization of memory from the operating system’s point of view. Virtual memory addresses must be mapped to physical address and vice versa. Write a four to five (4-5) page paper in which you: 1. Differentiate between virtual memory and physical memory. 2. Evaluate the benefits gained by running applications when the operating system uses a virtual memory manager. 3. Analyze how virtual memory addresses get translated into physical addresses. Analyze how a modern operating system translates 32-bit and 64-bit virtual addresses to physical addresses on the same machine. More Details hidden... Activity mode aims to provide quality study notes and tutorials to the students of CIS 512 WK 9 Assignment 4 The Virtual Memory Manager in order to ace their studies. CIS 512 WK 9 ASSIGNMENT 4 THE VIRTUAL MEMORY MANAGER To purchase this visit here: http://www.activitymode.com/product/cis-512-wk-9-assignment-4-the-virtual-memory-manager/ Contact us......

Words: 631 - Pages: 3

Memory Management

...COURSE TITLE: OPERATING SYSTEM 1 COURSE CODE: CMP 307 TOPIC: MEMORY MANAGEMENT DATE SUBMITTED: 15 – 02 – 2016 LECTURER IN CHARGE: DR ADESHINA MEMORY MANAGEMENT Memory management is the functionality of an operating system which handles or manages primary memory. Memory management keeps track of each and every memory location either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status. Memory management provides protection by using two registers, a base register and a limit register. The base register holds the smallest legal physical memory address and the limit register specifies the size of the range. For example, if the base register holds 300000 and the limit register is 1209000, then the program can legally access all addresses from 300000 through 411999. Instructions and data to memory addresses can be done in following ways Compile time -- When it is known at compile time where the process will reside, compile time binding is used to generate the absolute code. Load time -- When it is not known at compile time where the process will reside in memory, then the compiler generates re-locatable code. Execution time -- If the process can be moved during its execution from one memory segment to another, then binding must be delayed to be done at......

Words: 2862 - Pages: 12