lunes, 31 de octubre de 2011

Theorical Part II - Virtual Memory

Virtual Memory
David Berumen Salazar

"To give the illusion of unlimited ram for all of your programs" was one of the benefits virtual memory(VM) gave many years ago. Historically storaging devices have stayed behind in the miniaturization race; while the processors rapidly got smaller and faster, puting together millions and millions of transistors in a couple of centimeters, hard disks and ram still look like an ancient thing (SSD are a great step in this).

This gap between computing and data transfer power and the invention of multitasking were the motivations of VM. To overcome the hardware limitations, abstractions were developed and the idea behind them was to give to the user and kernel processes more address space sacrificing efficiency as less as possible, to make more things and get to use those much expensive processors, for example, using permanent storage devices to extend temporary ones by developing a VMM, but enough with history lets get to understand one of the dozens of ways to implement VMM, in this case, in Linux 2.6.

Overview of VMM in Linux 2.6 Kernel

Virtual Memory Management is one of the most complex things of any OS as it had been always developing to become more efficient and Linux its not the exception, if you want to understand the "Black Magic" behind this I recomend you "Understanding the Linux Virtual Memory Manager" by Mel Gorban, anyway I tried to minimize it as much as possible.

Much of the information I obtained came from "Understanding Virtual Memory In Red Hat Enterprise Linux " because I think it gives a pretty good overview. So if you want to learn for yourself check the pdf or ask me, I believe its an excellent exercise to look how it works a real VMM and understand that there are many ways to to VMM.

References:



And also I did some performance tests of the VM and paging


- PERFORMANCE TESTS

This are the slides of the Linux VM overview


5 comentarios:

  1. Hola compañeros, les recomiendo que cuando agreguen mas información detallada, pongan pseudocódigo de page table y de TLB ya que no vi en la presentación que tuvieran cosas de esto. Tampoco hablan de los algoritmos de paging FIFO y RLU.Les dejo un pdf donde hablan de los algoritmos de page replacement http://www.cs.vu.nl/~ast/books/mos2/sample-4.pdf espero les sirva :)

    ResponderEliminar
  2. Hola compañera gracias por el pdf lo revise y viene muy completo, lamentablemente en este momento creo que es tarde para agregar lo que nos recomiendas pero de todas maneras checaremos la informacion que consiguieron los demas y nos enfocaremos ahora si en la parte practica.

    ResponderEliminar
  3. Bien. Esta entrada aporta dos puntos en el rubro "Estudios sobre el desempeño de memoria virtual" y un punto sobre "Explicación en pseudocódigo sobre el funcionamiento de VM"; los diagramas ayudan, pero coincido con Carmen en que sería bueno contar con un pseudocódigo de las líneas generales sobre cómo ocurren cosas como paginación. Voy a contar los comentarios y evaluar la cantidad de aportación de cada una y luego mando un post en Piazza detallando quiénes sacaron puntos por ellos y cuántos en total.

    ResponderEliminar
  4. I liked You information. You went deeper than the others teams in some of the topics :)

    ResponderEliminar