Virtual Memory: 10 Making Virtual Memory Fast

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024

ความคิดเห็น • 63

  • @parham1
    @parham1 5 ปีที่แล้ว +61

    Whoever disliked this video, fight me

  • @mahanteshmyaginakeri7247
    @mahanteshmyaginakeri7247 9 ปีที่แล้ว +70

    This whole tutorial series is excellent. Thanks a lot to David for making this :-)

    • @davidblack-schaffer219
      @davidblack-schaffer219  9 ปีที่แล้ว +7

      Mahantesh Myaginakeri, I'm glad it was helpful. There are a bunch of similar tutorials on other topics in the full course if you go to test.scalable-learning.com and register with the enrollment key YRLRX-25436

    • @sudhirsingh20
      @sudhirsingh20 8 ปีที่แล้ว

      +David Black-Schaffer Thanks for this nice tutorials , i have enrolled for this but getting Trial so is there any time limit for this ?

    • @davidblack-schaffer219
      @davidblack-schaffer219  8 ปีที่แล้ว +1

      +sudhir singh Not at the moment. The online version is just the material I use for the class I teach at Uppsala University each year.

    • @sudhirsingh20
      @sudhirsingh20 8 ปีที่แล้ว

      Thanks a Lot !! I must say a very useful lecture for a student like me do you have some other lecture like kernel driver framework

    • @philopatearsalib6313
      @philopatearsalib6313 3 ปีที่แล้ว +3

      @@davidblack-schaffer219 the website is not working

  • @stupossibleify
    @stupossibleify 3 ปีที่แล้ว +2

    After the 9th episode I was thinking: "now I understand VM, protected memory and segmentation, but what a slow down this surely causes with memory access". Great video in response!

  • @prasadmoghe1702
    @prasadmoghe1702 8 ปีที่แล้ว +15

    I love your tutorials. You are a inspiration to me on how to present the topic. I am a teacher and teach Undergraduates and Engineering students. You tutorials have cleared lot of MMU concepts. Thanks for your great work. I sincerely appreciate it.
    cheers
    Prasad

  • @quintiminator
    @quintiminator 7 ปีที่แล้ว +2

    These videos are amazing! Nice graphs, good explaination and also repetition of previous information in prior videos. 10/10!

  • @mohab.m.metwally
    @mohab.m.metwally 8 ปีที่แล้ว +1

    Thanx David for the whole series it's awesome, simple, and informative.

  • @ramachandrareddy5376
    @ramachandrareddy5376 9 ปีที่แล้ว +1

    excellent tutorial series, simple and easy to understand. good work David. appreciate this

    • @davidblack-schaffer219
      @davidblack-schaffer219  9 ปีที่แล้ว

      Ramachandra Reddy , I'm glad you enjoyed it! You can get the full interactive tutorial (and tutorials for other architecture topics) if you go to test.scalable-learning.com and register with the enrollment key YRLRX-25436 .

  • @georgezazanis
    @georgezazanis 8 ปีที่แล้ว

    Well, i did not get anything from my teacher and my teacher's lectures. Thanks to you i think i may pass this class eventually, i am grateful to you. Also many thanks for the enrollment key, i will check it out as i need more than just these to pass the class.
    Many many thanks.

  • @vortyx090
    @vortyx090 8 ปีที่แล้ว +1

    I don't know if its just me,, but your videos make this things looke really really intresting,,, and not booring at all :D

  • @13achinjain
    @13achinjain 2 ปีที่แล้ว

    Excellent tutorials.. Concepts explained very effectively.. Thanks David ..!!

  • @masoudoveis
    @masoudoveis 8 ปีที่แล้ว

    Thanks David, best organization, easy to understand, very informative

  • @nisargaravindra9687
    @nisargaravindra9687 9 ปีที่แล้ว

    whole tutorial was outstanding, even a person who know nothing on Virtualisation, Can understand it completely. Thanks David. Can you share the slides on Coherency and Concurrency.

  • @wingzero1912
    @wingzero1912 7 ปีที่แล้ว

    really enjoyed watching the VM series. Keep up the good work :)

  • @skylai1637
    @skylai1637 4 ปีที่แล้ว

    very clearly , open my mind, nice video

  • @xigong3009
    @xigong3009 2 ปีที่แล้ว

    Thank you for this excellent video!

  • @martinmillerofficial
    @martinmillerofficial 6 ปีที่แล้ว +1

    The lecture I'm attending has some slides that I cannot understand. Thank you for making these vids!

  • @lucasmontec
    @lucasmontec 9 ปีที่แล้ว +2

    Can you make ones about File Systems? You are so clear and direct

    • @davidblack-schaffer219
      @davidblack-schaffer219  8 ปีที่แล้ว +1

      +lucasmontec Sorry, I only teach architecture and parallel programming.

  • @ccy-s4y
    @ccy-s4y 3 ปีที่แล้ว

    Best video of VM!

  • @NimW
    @NimW 8 ปีที่แล้ว +11

    what's "4-way"?

    • @pkgamma
      @pkgamma 5 ปีที่แล้ว +2

      that's the name of my cousin, Fu-Way Chen.

    • @Lixn1337
      @Lixn1337 4 ปีที่แล้ว +9

      It's not really that important to undestand, but if anyone is wondering, it is the associativity of the TLB. 4-way associativty means that the physical address we are looking for can be found in only 4 unique locations in the TLB. This means that when we look for the physical address, we only need to look in 4 distinct locations in the TLB: If it is not in one of those 4 locations, we know it doesn't exist in the TLB.

    • @richardjoel6343
      @richardjoel6343 3 ปีที่แล้ว

      @@Lixn1337 set associative mapping?

  • @surajrao1136
    @surajrao1136 ปีที่แล้ว

    Hello @David, Does each process have its own TLB or is the TLB shared by all the processes ? Also, can you please tell what you mean by "Full" Page Table in this video ? Thanks for these great videos, and Regards :)

  • @sranil
    @sranil 7 ปีที่แล้ว +1

    Thanks David for the wonderful tutorial. I have a question. For the 'hardware page table walk', when you mention that the hardware takes the data from the page table and loads it into TLB, doesn't it require OS help to identify where in the memory the page table is stored? If it is the case, what is the advantage of having the hardware. If not, can you please explain how does it obtain the location of the page table in RAM?

    • @NeelSandellISAWESOME
      @NeelSandellISAWESOME 3 ปีที่แล้ว

      For the 'hardware page table walk', when you mention that the hardware takes the data from the page table and loads it into TLB, doesn't it require OS help to identify where in the memory the page table is stored?
      There is a partnernship between the operating system and the hardware when dealing with situations like these. Once the operating system identifies the physical address, instead of using an operating system procedure for reloading the TLB, you can build hardware logic to directly deal with it.

  • @MultiPahal
    @MultiPahal 6 ปีที่แล้ว

    Excellent tutorial. Thank you

  • @sakurabliss4888
    @sakurabliss4888 4 ปีที่แล้ว

    You are a life saver💜💜💜💜

  • @Fabreezy0391
    @Fabreezy0391 4 ปีที่แล้ว +1

    Really really good your videos. The only things is that you don't really speak about the MMU. Maybe you did, if you did, my bad. Still get a like because its the best explanations videos for the matter

  • @ravikumargudipalli2854
    @ravikumargudipalli2854 8 ปีที่แล้ว

    Excellent Lecture... Thank Q

  • @mrb3nz
    @mrb3nz 6 ปีที่แล้ว

    This has really interesting consequences - with TLBs, Random Access Memory is no longer truly "random", there are addresses much quicker to get. And this is why many theoreticals algorithms are never used - even if they have a better theoretical time complexity, they are easily outperformed by algorithms that optimise the use of TLBs and caches

  • @bhavneetsingh1198
    @bhavneetsingh1198 2 ปีที่แล้ว

    Hi David, Can you elaborate that: 64 x 4kB pages and 32 x 2 MB pages will be having different size TLB or is it selection of scheme based on program. My question is coming from point of view that both mentioned pages (256kB and 64 MB at 7:40) should use different TLb in my mind and you have mentioned them in same breath as if the same space can be configured to store either scheme.

  • @perfecto25
    @perfecto25 ปีที่แล้ว

    anytime I see memory in disk mentioned, Im assuming you mean a swap space correct?

  • @jitendra.khasdev
    @jitendra.khasdev 7 ปีที่แล้ว

    This is awesome, I had enrolled and try to download sildes for virtul memory section. But I think link is broken. can you please share slides with us. One more thing "You are true inspiration for computer education system".

  • @rishiupadhyay3956
    @rishiupadhyay3956 4 ปีที่แล้ว +1

    How did you come up with "1.33 memory accesses on an average for each instruction"? Could you elaborate?

    • @NeelSandellISAWESOME
      @NeelSandellISAWESOME 3 ปีที่แล้ว

      I think this is ISA dependent, but on one hand you have standard loads which require 1 access, and you also have load indirects which have 2 accesses, so on average it is probably somewhere between 1 and 2.

  • @quincyallenflint
    @quincyallenflint 7 ปีที่แล้ว

    How many videos are there??? (In a good way)

  • @子维-u1g
    @子维-u1g 6 ปีที่แล้ว +1

    After getting so many nice tutorials & lectures on TH-cam, I started to question why I should pay that much money to get in to my university to learn absolutely nothing from those shitty power points made by my professors.

  • @Thomas_Fakir
    @Thomas_Fakir 4 ปีที่แล้ว

    what's the meaning of 1,33 memory access per instruction ? Do you suppose that 1 instruction is done per cycle ?

  • @cutyMifffy
    @cutyMifffy 3 ปีที่แล้ว

    Can anyone explain what does "4-way" mean? Thanks in advance!

  • @prasanthreddy7638
    @prasanthreddy7638 7 ปีที่แล้ว

    I do not understand why did you use 4MB for full page table

  • @Sam-ib6xl
    @Sam-ib6xl 6 ปีที่แล้ว

    lol.. we learn really quickly that its going to take a really long time

  • @Lisa-kk6go
    @Lisa-kk6go 6 ปีที่แล้ว

    Can someone explain why 64 entries, 4-way is 4kB pages 4:07?

  • @utsavjana3120
    @utsavjana3120 6 ปีที่แล้ว

    very good

  • @kedharguhan
    @kedharguhan ปีที่แล้ว

    I don't think I understood how a TLB is different from a Page Table. Both are implemented in Hardware as cache right, or is Page Table implemented ni RAM? Why is TLB so much more faster, is it because of the size? Like how Page Table combines addresses into pages, TLB combines those pages into bigger pages?

    • @OpenGL4ever
      @OpenGL4ever ปีที่แล้ว +1

      The page table is implemented in normal DDR RAM, which is DRAM and in a separate IC outside of your CPU connected via a usually 64-bit wide connection. This DRAM is also usually running at a lower clock rate than your CPU.
      The TLB is SRAM made of transistors and directly on your CPU die. This means, it can run at the same clock rate as your CPU and the path to the data is very short.

    • @kedharguhan
      @kedharguhan ปีที่แล้ว

      @@OpenGL4ever ahh.. thanks a lot!

  • @MccZerk
    @MccZerk ปีที่แล้ว

    Why does a TLB need to be small if it's only a mapping? Most dictionary implementations in programming languages are O(1) because of the hashing algorithm to find the value for every key.

    • @OpenGL4ever
      @OpenGL4ever ปีที่แล้ว

      It just needs to fit on the CPU die.

  • @hangxie7508
    @hangxie7508 6 ปีที่แล้ว

    Thank you.

  • @rubelahmed3474
    @rubelahmed3474 6 ปีที่แล้ว

    You are one of my reasons to dare to study computer science....: )

  • @ayoubrayanemesbah8845
    @ayoubrayanemesbah8845 11 หลายเดือนก่อน

    i m not sure but i think it's impossible for a page to be in tlb and not in ram , lets suppose it's true , if a page @ exists in the tlb but not in the ram , if a tranlation happen it's will allow the program to access an adress space which is not his , which will lead to a memory corruption , therefor if a page is evicted from the RAM it need to be unvalidate from the tlb

  • @Krazevsc05
    @Krazevsc05 7 ปีที่แล้ว

    Hello, I have one question that I'd really appreciate if you could answer. Is virtual memory always being translated into physical memory for everything you do? Is there ever a time where you wouldn't start out with virtual memory from your program and convert it to a physical memory location? I was confused because in a recent video you said you hardly ever want to use paging because it's slow. But isn't paging used every time you convert virtual memory to physical memory? I also looked it up and on several sites it says every modern computer now adays uses virtual memory even if it doesn't have to access the hard drive. Sorry if i'm rambling but this is what I'm trying to ask: Does the instruction address register in the cpu always have a virtual address or is this something that rarely happens and only if your ram fills up. Thanks

    • @EalhamAlMusabbir
      @EalhamAlMusabbir 6 ปีที่แล้ว

      Whether your RAM is full or not, you always need to have a translation. Your Instruction Address Register gets a virtual address which must be converted to physical address pointing to RAM.
      Now there's 2 cases:
      1. RAM isn't full ---> to speed up this process, a portion of Page-Table is copied to your Processor's cache memory so that you don't have to access RAM twice (once to know which address of RAM your data reside, another to get that data). This process doesn't slow you much.
      2. RAM is full, needs to send some data to Hard-drive to make space for new data ---> This is the worst scenario. You need to go through an algorithm to determine what segment of data in RAM you want to send in Hard-drive to make space, and if those data are changed, needed to be rewritten in Hard-drive. After having free space, you bring contents from your Hard-drive in RAM and update your page-table.
      There isn't much to do to speed up this process other than predicting what data user might want, and based on it, we have some algorithms to determine which data to remove from RAM. Also, we are moving to Solid-State-Drive instead of Hard-Drive which is remarkably faster.
      Hope this answers your question.

  • @s33king81
    @s33king81 ปีที่แล้ว

    If the pagetable is itself in memory, how its own physical address is determined?