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.
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
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!
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 :)
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.
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.
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.
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.
@@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.
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.
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 .
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?
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.
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
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
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
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.
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!
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.
same here...
I've had the same experience. I'm amazed that professors are often so poor at actually teaching.
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
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!
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 :)
Hey ISA means Industry standard Architecture bus only right. If it is still r we using ISA in PC's
abhi shek
Hey Abhi shek
It means Instruction set architecture
@@rojaeswaran9561 thank you brother
I have to say this is way better than my lecture in college
This series on virtual memory is just so amazaingly put. It's incredible.
it took me a while to figure out you are using HEX-BCD represantation (silly me...)...now i finally get it thanks!
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.
maybe the teachers could just play these videos. the wheel doesn't need to be reinvented.
Excellent series on virtual memory!! Very well explained.
Sir, you are a saint, thank you for this. My professors are better suited to research than teaching, unfortunately.
Great job!!..I like your way of clarifying each and every topic..in simple . and understandible manner...
Thanks, really wanted to see go-through video for understanding. Amazing work
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.
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.
This video is lagging unlike other videos... But content quality is still top notch ...
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.
Thank you so much I have been trying to figure this out for days.
Oh my god dude you're a lifesaver, subscribed.
how do you know that the 204 is only 12 bits?
2:13
yes same question please advice
@@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.
@@ismailkadrija3799 thank you
thnak you so much man. thnK you so much !!! wish you t have a wonderful life
So at 2:46 in the end was the PA 0006 or was it 0006204 ?
absolutely well thought out, well organized and explained. Thank you sir!
Thank you so much! You explained things really clear.
I really appreciate your work! simple and clear
Super well explained. Thanks.
2:47 : Why the page offset is only the 204? and not like 3204 ? or 03204 ?? where do it come from?
I only think that 204 is 3*4 = 12
Really good video!
It was good , carry on with the rest! Thanks!!
This was so simple and good explanation.... than what the heck is segment translation?
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.
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 .
how did he get 0x0003204 for the first example of translating a virtual address? did he just pick that at random?
If this translation is done in Hardware (MMU) why does a process (struct task_struct) hold a pointer to memory maps (struct mm) ?
Where this page table resides ?
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?
You da real MVP
really excellent videos
Are the numbers 0x0003, 0x0004, 0x0006...0x00f6 arbitrary? would this be given information or is this the same information you will find always?
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.
Nice work. Thank you.
sir what does MAR send through databus physical address or logical
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
Thanks for these! quite helpful
great video.
Hello. Is there a manual in Russian?
Nice review
4:04 it should be 64kb not 64kB
64kB is 19 bits.
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
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
thanks 4 uploading!
amazing! thank you so much!
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.
solved~
why does the physical address only have 28bits and not 32bits?
see last video, it's an assumption. In order to demonstrate page fault (swap from disk).
watch Virtual Memory: 6 you will understand.
short answer because the RAM is only 255MB which needs only 28 bit to address
Quality video
God's work ~
🎉
how do I know that 204 is 12 bits
each number represents 4 bits
nice video
Literally saved my ass.
Thanks, very nice
Thanks
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.
yes....YES..... I AM A GOD NOW
thanks man
I love you...
Aaa thanks
Oh-zum.
Oscar Worthy
I am listening to 2x speed and it's mind-numbing how you just keep saying the same thing over, and over, and over...
I'm sorry you found that distracting.
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.
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!
stop repeating your self too much
Ahmad, I'm sorry you found that distracting.
@@davidblack-schaffer219 Found it helpful!