Virtual Memory: 7 Address Translation Example Walkthrough

Sdílet
Vložit
  • čas přidán 13. 07. 2014
  • How a virtual memory translation works. Virtual page number and page offset to physical page number and offset. Page table entries on disk. Page faults. 4kB pages vs larger pages.
    Interactive lecture at test.scalable-learning.com, enrollment key YRLRX-25436.

Komentáře • 93

  • @unigraz1493
    @unigraz1493 Před 5 lety +100

    I love you man. And I mean this. I had like 3 professors and 6 tutors try to explain who virtual memory works and I didn't get it. So naturally, I assumed I was slow. And after watching your virtual memory playlist I finally get it. And it's so simple. Thank you for doing this.

    • @ECOMMUSK
      @ECOMMUSK Před 4 lety +3

      same here...

    • @sawyerbass4661
      @sawyerbass4661 Před 3 lety +3

      I've had the same experience. I'm amazed that professors are often so poor at actually teaching.

    • @ale-hl8pg
      @ale-hl8pg Před rokem

      Similar experience 2 years later, I always thought I was way too dumb for this topic but this entire series literally explained it and alleviated most of the questions I had for the topic

  • @brandon.duffany
    @brandon.duffany Před rokem +3

    I am a software engineer trying to refresh myself on how this stuff works, after having not really grasped it very strongly back when I was in college. This lecture series makes it *super* easy to understand. Thank you!

  • @tkmushroomer
    @tkmushroomer Před 4 lety +3

    This series on virtual memory is just so amazaingly put. It's incredible.

  • @carterliu4110
    @carterliu4110 Před 3 lety +3

    I have to say this is way better than my lecture in college

  • @apostolosmavropoulos177
    @apostolosmavropoulos177 Před 5 lety +3

    it took me a while to figure out you are using HEX-BCD represantation (silly me...)...now i finally get it thanks!

  • @xploreHY
    @xploreHY Před 5 lety +1

    Great job!!..I like your way of clarifying each and every topic..in simple . and understandible manner...

  • @avdd80
    @avdd80 Před rokem

    Excellent series on virtual memory!! Very well explained.

  • @morgard211
    @morgard211 Před 4 lety +4

    Imagine, you're a professor and you studied teaching for years, yet you can't do that one single job, you terribly suck at it but you don't care - they won't do anything to you as long as you show up and "teach". Than this guy shows up and absolutely nails it, actually doing the job we're paying the professor to do. Having to sit through it in the school and then finally learning it on CZcams is wasting our energy, time and money which could've been better spent giving it to CZcams tutors who do almost all the work. The education system is funny.

    • @Hentirion
      @Hentirion Před měsícem

      maybe the teachers could just play these videos. the wheel doesn't need to be reinvented.

  • @rojaeswaran9561
    @rojaeswaran9561 Před 4 lety +2

    Never did I know ISA uses virtual memory until I watch your video and so were my friends. My professor would always say, "If you don't know how to explain to others what you learned, then you really don't understand things clearly", I admire your way of explaining the concepts very elegantly, thank you :)

    • @Abhishek-md2pb
      @Abhishek-md2pb Před 4 lety

      Hey ISA means Industry standard Architecture bus only right. If it is still r we using ISA in PC's

    • @rojaeswaran9561
      @rojaeswaran9561 Před 4 lety +2

      abhi shek
      Hey Abhi shek
      It means Instruction set architecture

    • @Abhishek-md2pb
      @Abhishek-md2pb Před 4 lety

      @@rojaeswaran9561 thank you brother

  • @infinicky
    @infinicky Před rokem +1

    Sir, you are a saint, thank you for this. My professors are better suited to research than teaching, unfortunately.

  • @Inspirtedmusic
    @Inspirtedmusic Před 8 lety

    absolutely well thought out, well organized and explained. Thank you sir!

  • @swaminathbera_a1
    @swaminathbera_a1 Před rokem

    Thanks, really wanted to see go-through video for understanding. Amazing work

  • @cnikas
    @cnikas Před 7 lety

    Thank you so much I have been trying to figure this out for days.

  • @user-yq7vf3jt3n
    @user-yq7vf3jt3n Před 8 lety

    I really appreciate your work! simple and clear

  • @ssj4rit
    @ssj4rit Před 7 lety

    Oh my god dude you're a lifesaver, subscribed.

  • @robertcolvin5162
    @robertcolvin5162 Před 6 lety +1

    Great video, subscribed. Only thing I would have done differently would be to explain how you got the number of offset bits when you first mentioned it rather than at the end. I wasted time pausing the video and researching when you explained it easily at the end! Regardless, very clear and easy tutorial.

  • @kxiong4021
    @kxiong4021 Před 3 lety

    Thank you so much! You explained things really clear.

  • @igniculus_
    @igniculus_ Před 7 lety +1

    This video is lagging unlike other videos... But content quality is still top notch ...

  • @inspirer4465
    @inspirer4465 Před 2 měsíci

    Super well explained. Thanks.

  • @ohxmyxwowx
    @ohxmyxwowx Před 4 lety

    How can there be a page offset value when a VA translates to disk? With the example 0x00000783, the 0x00000 part in the PT lets us know that the data is in memory, but then there's still there 783 page offset. How do we know where this offset is in disk?

  • @pawanpikapin
    @pawanpikapin Před 7 lety

    sir what does MAR send through databus physical address or logical

  • @bluex217
    @bluex217 Před 8 lety

    So at 2:46 in the end was the PA 0006 or was it 0006204 ?

  • @marcelachapa1003
    @marcelachapa1003 Před 3 lety

    how did he get 0x0003204 for the first example of translating a virtual address? did he just pick that at random?

  • @thenukewijesinghe8234
    @thenukewijesinghe8234 Před 3 lety

    thnak you so much man. thnK you so much !!! wish you t have a wonderful life

  • @sundarb6673
    @sundarb6673 Před 6 lety

    It was good , carry on with the rest! Thanks!!

  • @dannydeveau
    @dannydeveau Před 8 lety

    Thanks for these! quite helpful

  • @user-hy1lm2rd9q
    @user-hy1lm2rd9q Před 2 měsíci

    Really good video!

  • @jake5335
    @jake5335 Před 7 lety

    really excellent videos

  • @AltafNeva121
    @AltafNeva121 Před 8 lety

    This was so simple and good explanation.... than what the heck is segment translation?

  • @suneelabbigari
    @suneelabbigari Před 2 lety

    Where this page table resides ?

  • @abdulrahmanalduraiweesh5120

    thanks 4 uploading!

  • @osagbemisunday
    @osagbemisunday Před 4 lety +6

    Thank you, David, for these tutorials. I will assume some of the values are arbitrary values, for example, how did you decide the page offset or how does a 12bits equal 783?
    Correction on how to find decide offset 3:57: To find offset, I assume from the videos that you need to convert the page size to byte then find the bits. Also, the 3 least significant bits of the hex is 12 bits, this makes 12 bits equal 783 in the example.

    • @undefBehav
      @undefBehav Před 7 měsíci

      You don't need to convert the page size to bytes at all. If you assume each page holds 4kiB of data, that means it can address a total of 4096 bytes in memory. You can count from 0 to 4095 using 12 bits in binary, and 3 digits in hexadecimal. That's why we're interested in the least significant 3 digits to figure out the page offset.

  • @jamesbotwina8744
    @jamesbotwina8744 Před 4 lety

    amazing! thank you so much!

  • @idontknow472
    @idontknow472 Před 2 lety

    Nice work. Thank you.

  • @LazarRedDevil95
    @LazarRedDevil95 Před 8 lety

    You da real MVP

  • @nsanandkumarak
    @nsanandkumarak Před 2 lety

    Hi David ,
    you explained very well, firstly Thank you so much
    I have an doubt , who is deciding that in page table, some portion of page should be in RAM and remaining should be in DISK . and based on what ?
    Thanks,
    Follower

  • @user-ik5yv4op4o
    @user-ik5yv4op4o Před 2 lety

    Hello. Is there a manual in Russian?

  • @Lisa-kk6go
    @Lisa-kk6go Před 6 lety

    Someone help~ Do we only have 2^8 entries for the page table(2^8=2^20/2^12)? But in the graph, we have 0xfffff entries.

  • @cl3375
    @cl3375 Před 6 lety +1

    Are the numbers 0x0003, 0x0004, 0x0006...0x00f6 arbitrary? would this be given information or is this the same information you will find always?

    • @thesickbeat
      @thesickbeat Před 5 lety +1

      They are arbitrary, that's the whole point behind virtual memory. You create a layer of indirection, so that the physical memory does not correspond to the virtual memory. The page table maps a virtual page (chunk of memory) to a physical page. So virtual page 0x00000 can map to any physical page that the page table wants to point to.

  • @vortyx090
    @vortyx090 Před 8 lety

    Thanks, very nice

  • @shohidulhaque759
    @shohidulhaque759 Před 2 lety

    great video.

  • @thlu308
    @thlu308 Před 8 lety

    You have a talent for making complex concepts simple. I wish you were my professor back in college. Thanks for sharing your knowledge with us!
    However, I am a bit confused about this example. Is it common to have the virtual address size less than the physical address size? Why wouldn't I just reduce my virtual address space to be the same as the physical address in that case? I can never access more addresses than physically available.

    • @saptarshishome4409
      @saptarshishome4409 Před 2 lety +1

      you still need Virtual memory as there maybe processes loaded into the RAM , yet you need to load one more Process in the RAM , but your RAM is exhausted right, so you can't load any more processes in it. Here comes the need of Virtual Memory. True that if a single process is running you don't need virtual memory .

  • @MyVip3r
    @MyVip3r Před 3 lety

    2:47 : Why the page offset is only the 204? and not like 3204 ? or 03204 ?? where do it come from?

    • @MyVip3r
      @MyVip3r Před 3 lety

      I only think that 204 is 3*4 = 12

  • @viveksharma1042
    @viveksharma1042 Před 3 lety

    Nice review

  • @jihwan816
    @jihwan816 Před 6 lety

    Quality video

  • @mdlwlmdd2dwd30
    @mdlwlmdd2dwd30 Před 4 lety

    how does 64k become 2^16 bits? I just would like to know how it is calculated. byte=8 bits and kb=8000bits 64kb= 64*8000bits=512,000bits? just little confused in this coversion

    • @stevenlynch3456
      @stevenlynch3456 Před rokem

      64k = 64KiB = 64*2^10 Bytes = 2^6*2^10 Bytes = 2^16 Bytes. Taking log_base2(2^16), you get 16 bits needed to address every individual byte.
      Yes, one byte is always equal to 8 bits. Though 1 kB (not kb as you said, which is kilobits and not kiloBytes) equals 8000 bits, he actually means kiB (kibiBytes).
      Oftentimes, when somebody uses "kB" or "KB" (kiloBytes), they actually mean "kiB" or "KiB" (kibiBytes).
      Kilo, Mega, Giga, Tera, ... use powers of ten but -ibiBytes or -ebiBytes use powers of 2:
      KiloByte = 10^3 Bytes. MegaByte = Kilo of KiloBytes = 10^3 * 10^3 Bytes = 10^6 Bytes = 1Million Bytes
      KibiByte = 2^10 Bytes, MebiByte = Kibi of KibiBytes = 2^10 Bytes * 2^10 Bytes = 2^20 Bytes

  • @anvesh1891
    @anvesh1891 Před 7 lety

    thanks man

  • @danielbenisti3664
    @danielbenisti3664 Před 3 lety +2

    how do you know that the 204 is only 12 bits?
    2:13

    • @junepaulcuajotor3777
      @junepaulcuajotor3777 Před 3 lety

      yes same question please advice

    • @ismailkadrija3799
      @ismailkadrija3799 Před 3 lety +2

      @@junepaulcuajotor3777 Each digit of a hexadecimal number can be represented by 4 digit of a binary number. Just look up the conversion from hexadecimal to binary. In our case 204 is the hexadecimal number so for 2 we write -0010 for 0-0000 and for 4-0100 so 204(hexadecimal)=0010 0000 0100(binary) thus we need 12bits.

    • @junepaulcuajotor3777
      @junepaulcuajotor3777 Před 3 lety

      @@ismailkadrija3799 thank you

  • @afrazsalim1748
    @afrazsalim1748 Před 7 lety

    nice video

  • @jerryzhang7124
    @jerryzhang7124 Před 3 lety

    God's work ~

  • @nicolaszito4506
    @nicolaszito4506 Před 5 lety

    how do I know that 204 is 12 bits

    • @MurseGuy
      @MurseGuy Před 5 lety

      each number represents 4 bits

  • @jimmy000
    @jimmy000 Před 7 lety

    why does the physical address only have 28bits and not 32bits?

    • @huanliu358
      @huanliu358 Před 7 lety

      see last video, it's an assumption. In order to demonstrate page fault (swap from disk).

    • @damejelyas
      @damejelyas Před 6 lety

      watch Virtual Memory: 6 you will understand.

    • @damejelyas
      @damejelyas Před 6 lety

      short answer because the RAM is only 255MB which needs only 28 bit to address

  • @mehdiip
    @mehdiip Před 3 lety

    Thanks

  • @muttakinahmed2506
    @muttakinahmed2506 Před 5 lety +1

    Can anyone help me out, what will be the number of entries in a page table for a vm of MIPS with 8KB of Page size.

  • @TheSeiify
    @TheSeiify Před 8 lety

    I love you...

  • @mehdiip
    @mehdiip Před 3 lety

    Aaa thanks

  • @alstarla
    @alstarla Před 8 měsíci

    🎉

  • @ErenYaegerPhilosophy
    @ErenYaegerPhilosophy Před 10 měsíci

    4:04 it should be 64kb not 64kB
    64kB is 19 bits.

  • @dungenwalkerr619
    @dungenwalkerr619 Před 3 lety

    Literally saved my ass.

  • @OleguitoSwagbucks
    @OleguitoSwagbucks Před 3 lety

    Oh-zum.

  • @nat0041
    @nat0041 Před 4 lety

    yes....YES..... I AM A GOD NOW

  • @Emmerie2008
    @Emmerie2008 Před 5 lety

    Oscar Worthy

  • @TomtheS_AI
    @TomtheS_AI Před 6 lety

    I am listening to​ 2x speed and it's mind-numbing how you just keep saying the same thing over, and over, and over...

    • @davidblack-schaffer219
      @davidblack-schaffer219  Před 6 lety

      I'm sorry you found that distracting.

    • @TomtheS_AI
      @TomtheS_AI Před 6 lety +3

      David Black-Schaffer No, I should be apologizing. I had been studying for 4 days straight when I made that comment. I think a bunch of people get some great knowledge from your videos, thanks for taking the time to make them and share your knowledge. I got what I needed from your video and then for some reason felt the need to criticize you just because your teaching style isn’t what my ADHD brain likes but honestly probably needs. Repetition helps people remember and understand. Sorry I was so rude. Again, thanks for this video.

    • @davidblack-schaffer219
      @davidblack-schaffer219  Před 6 lety +3

      That was a very kind reply. Thank you for taking the time to write. Your comment is, however, dead-on. Unfortunately I find that in-class students struggle with these concepts even after having seen them repeatedly. (So clearly repeating it over and over isn't the solution.) Cheers!

  • @ahmadbelhaj1756
    @ahmadbelhaj1756 Před 6 lety

    stop repeating your self too much