Virtual Memory: 7 Address Translation Example Walkthrough

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

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

  • @unigraz1493
    @unigraz1493 5 ปีที่แล้ว +106

    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 4 ปีที่แล้ว +3

      same here...

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

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

    • @ale-hl8pg
      @ale-hl8pg ปีที่แล้ว

      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 ปีที่แล้ว +6

    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!

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

    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 5 ปีที่แล้ว

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

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

      abhi shek
      Hey Abhi shek
      It means Instruction set architecture

    • @Abhishek-md2pb
      @Abhishek-md2pb 5 ปีที่แล้ว

      @@rojaeswaran9561 thank you brother

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

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

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

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

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

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

  • @morgard211
    @morgard211 4 ปีที่แล้ว +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 TH-cam is wasting our energy, time and money which could've been better spent giving it to TH-cam tutors who do almost all the work. The education system is funny.

    • @Hentirion
      @Hentirion 7 หลายเดือนก่อน

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

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

    Excellent series on virtual memory!! Very well explained.

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

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

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

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

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

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

  • @osagbemisunday
    @osagbemisunday 4 ปีที่แล้ว +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 ปีที่แล้ว

      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.

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

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

  • @robertcolvin5162
    @robertcolvin5162 6 ปีที่แล้ว +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.

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

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

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

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

  • @danielbenisti3664
    @danielbenisti3664 4 ปีที่แล้ว +2

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

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

      yes same question please advice

    • @ismailkadrija3799
      @ismailkadrija3799 4 ปีที่แล้ว +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 4 ปีที่แล้ว

      @@ismailkadrija3799 thank you

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

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

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

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

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

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

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

    Thank you so much! You explained things really clear.

  • @赵伟昌
    @赵伟昌 9 ปีที่แล้ว

    I really appreciate your work! simple and clear

  • @inspirer4465
    @inspirer4465 7 หลายเดือนก่อน

    Super well explained. Thanks.

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

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

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

      I only think that 204 is 3*4 = 12

  • @user-hy1lm2rd9q
    @user-hy1lm2rd9q 7 หลายเดือนก่อน

    Really good video!

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

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

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

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

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

    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.

    • @ImSaneperson
      @ImSaneperson 3 ปีที่แล้ว +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 .

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

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

  • @adityagawali-ld3lt
    @adityagawali-ld3lt 3 หลายเดือนก่อน

    If this translation is done in Hardware (MMU) why does a process (struct task_struct) hold a pointer to memory maps (struct mm) ?

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

    Where this page table resides ?

  • @ohxmyxwowx
    @ohxmyxwowx 5 ปีที่แล้ว

    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?

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

    You da real MVP

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

    really excellent videos

  • @cl3375
    @cl3375 7 ปีที่แล้ว +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 6 ปีที่แล้ว +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.

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

    Nice work. Thank you.

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

    sir what does MAR send through databus physical address or logical

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

    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

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

    Thanks for these! quite helpful

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

    great video.

  • @ВладимирКазанцев-ц9т
    @ВладимирКазанцев-ц9т 3 ปีที่แล้ว

    Hello. Is there a manual in Russian?

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

    Nice review

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

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

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

    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 ปีที่แล้ว

      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

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

    thanks 4 uploading!

  • @jamesbotwina8744
    @jamesbotwina8744 5 ปีที่แล้ว

    amazing! thank you so much!

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

    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.

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

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

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

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

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

      watch Virtual Memory: 6 you will understand.

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

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

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

    Quality video

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

    God's work ~

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

    🎉

  • @nicolaszito4506
    @nicolaszito4506 5 ปีที่แล้ว

    how do I know that 204 is 12 bits

    • @MurseGuy
      @MurseGuy 5 ปีที่แล้ว

      each number represents 4 bits

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

    nice video

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

    Literally saved my ass.

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

    Thanks, very nice

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

    Thanks

  • @muttakinahmed2506
    @muttakinahmed2506 6 ปีที่แล้ว +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.

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

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

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

    thanks man

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

    I love you...

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

    Aaa thanks

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

    Oh-zum.

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

    Oscar Worthy

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

    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  7 ปีที่แล้ว

      I'm sorry you found that distracting.

    • @TomtheS_AI
      @TomtheS_AI 7 ปีที่แล้ว +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  7 ปีที่แล้ว +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 7 ปีที่แล้ว

    stop repeating your self too much