This video answers the exact question that I had when I first studied OS and Computer organization and architecture. While studying OS we are told that theres something called kernel space and user space and one is more privileged than the other, but never told how this privilege is enforced. At the end of the day if both programs run on the same CPU, using the same hardware, what exactly stops a user program from invoking privileged instructions is a question that plagued me. When I asked my professor, he answered with one word, "hardware" takes care of it. A very ambiguous useless answer. Interrupts are hella underrated man, nobody talks about them. Anyway thank you for your video, It will surely help those students who had the same question I had.
I literally started writing my own kernel like 1 month ago as part of my mastery at 42. Would have been way harder to understand what I actually have to do without your videos starting at how stack heap works until now with this video! Massive respect being able to explain SO complex topics so that they are easy to understand - shows crazy mastery of the subject. Keep up the amazing work!
Everytime a core dumped video comes out, the world gets 20% smarter. Huge salute to you man, I love your easy to understand and lucid teaching style. Using the information from the previous videos of the ongoing video series on the workings of computers, I have finished building an ultra simple 8 bit computer. You have been like a god when it comes to my quest of learning how computers work deep down. (I'm not in college yet, but I bet this is far more lucid than that)
Cpu architecture is kinda easy but it needs to be properly described and teached but by reading documentations i see that majority of devs can't teach things.
@@SirusStarTV this is so accurate, once you get the concept, it isn't extremely hard (even though some parts might get complicated). I had such a hard time trying to find good sources to start learning from. And it's especially hard when you aren't in college yet so you don't get this information picked out for you.
Professional software engineer here. I want to commend you for making this video; the topics are presented accurately, clearly, and with both honesty and integrity. You gloss over the concepts we don't need to understand (such as how interrupts are triggered from a hardware level or how program segments are loaded) and instead focus on only exactly what is needed to convey the topic. Your definitions of "kernel mode" and "user mode" are perhaps the simplest and most accurate definitions I've heard to date. Thank you for using an x86-derivative assembly language in your examples. In my experience, it's the easiest to follow for new students who have not had exposure to assembly language programming. Thank you for discussing what can go wrong when the Mode Bit is mishandled.
I absolutely love how you mentioned about kernel mode drivers being potentially untrustworthy (and that you're sceptical about proprietary operating systems too). I think it's very important to help people realise that.
And kernel anticheats. What a bunch of bullshit that i am forced to install that cancer when i want to play games i like. Like Pirate Software said, they are not even that much better
@@kliperxpirate software is a skid who only knows about stopping a macro user and multiboxer. he knows nothing about real game hacking. kernel anti-cheats are much better then user mode anti-cheats. user-mode anticheats allow anyone to bypass them, because the only reason why anti-cheats went kernel was because cheaters were doing it first. going kernel is the easiest way to bypass a user mode anticheat. kernel anticheats are good and are sketchy but it’s ignorant to say they aren’t much better than a user mode anticheat
Such security bits are stored directly inside a CPU, so they are not affected by the cosmic rays. Storing them in RAM would've been very slow and insecure in the first place.
@@Google_Censored_Commenter they are not completely immune of course. But probability is so low it makes such event practically impossible. As for quantum tunneling, there is a non-zero probability of all your body's particles simultaneously teleporting into another galaxy. But the probability is so low that we say it is practically impossible. Bits in the memory are affected because of DDR SDRAM inherent flaws. In fact, it is so vulnerable that you don't even need the cosmic rays to flip the bits. See DDR "Rowhammer" attack.
@@mk72v2oq Memory is not specially exposed to cosmic rays, that's just something you've made up in your head, that's all I wanted to get across. Maybe RAM is designed in such a way that it has other flaws, but that's irrelevant to whether cosmic rays can play a role in flipping bits or not, and it's been observed in reality, it's one of the reasons we invented ECC memory. It didn't become a relatively well known phenomena in computer science just because it sounds extravagant.
Labeling this video as a "bit mode" video is an understatement. I spent hours and got the best books about OS fundamentals and none of them put it all together like this. Even some books dive in more specific details like what is an Interrupt Vector Table etc. None of them puts it all together like this. You've got a sub.
Fun fact: in x86, the mmu page tables are in memory, so if the os for whatever reason maps a part of memory where a page table is located, into a proceses virtual memory space, then the proces can modify the memoy layout using usermode instructions.
A year ago, I was doing a car's racing game project with my colleges in assembly x86, and we encountered a problem where we wanted to make taking the input of keyboard kind of asynchronous, where you can press more than one button at the same time and all of them get handled at the same time, the problem was that the interrupt that was used to handle getting the pressed key on the keyboard didn't actually handle this the way we wanted, so after investigating a lot we had to override the default handler routine and used another one that did what we wanted, and this was actually one of the coolest things I have ever done since I started learning programming
what a generational run bro, been here since (almost) the start and praying to stay for long. i bet this is what it felt like for earlier generations to watch and study from 3b1b and Ben Eater at the time they were releasing their videos. i've recently started going the book route, going through the computer systems book, and i have to say you are such a good (and even on par) supplement. i can't wait for the virtual memory video. cheers bro
Please do a series on RISC-V based softcore CPU, and it's interaction with kernel code, how ISA and architecture are related and compiler's compilation process
Yikes... Isn't .NET running on a virtual machine like Java? If you like this kinda stuff, check out RISC-V or ARM microcontroller assembly. It's really deep down the rabbit hole, for sure, but you gain a real appreciation for how the CPU does its thing.
Your videos simplify boring textbooks so well, that I'm starting to feel inpired to create videos. Honestly, your Ability to create engaging scripts is beyond the curve. Keep improving 🎉
I haven't been a student for over 20 years now and I understand how processors work in conjunction with operating systems. But damn, this video is just great. I think it would be great for explaining how protected mode works to non-IT people. Thanks a lot for the work!
Man! I'm SO HAPPY just because I found your channel. This is, by far, one of the best TH-cam channel about computing in a low level perspective. Your work is absolutely necessary. Please, never stop! 🙏🏻❤️
This actually one of the best videos I have seen so far explaining this. This is high quality content, thank you. There are almost like 0 zero mistakes explaining this. Perfect examples, Perfect visualization. Thank you. This is truly awesome!
This is one of the best videos on operating systems I have ever watched. In my lectures my professors really took a strong abstract look when talking about operating systems that for me made it very hard to wrap my head around (for example, talking about ring levels when thinking about programs running on a computer). This video is a light bulb moment to all the things I have been studying. Thank you so much for this free content!
Dude you are a legend! All other videos I have watched never answered ALL the questions I had, they just explained what I already knew. But YOU! Respecto! 🖤
Right now I'm recreating the RISC-I and applying modifications on it for my college's final paper, this video helped clear really well some concepts that are applied on it, thank you!
The fact that I, a novice non-programmer and casual PC user, enjoyed this video greatly showcases Core Dumped's skill in simplifying complex information to a user-friendly level. Subbed.
This has been quite interesting, I'm doing a project with a friend (for fun). He's writing his own OS, and I'm writing the file system for it. I hadn't really considered how privileged mode is enforced, or how the kernel is able to enter and exit it securely. Thank you for the easy to understand video, it was great!
There’s always this ambiguous talk about user space, kernel space and privileges; but it never really clicked for me and I never gained any intuition. This video fills the exact gaps everyone forgets to answer with much detail. Thanks
Brother this video is priceless, your way to teaching is literally best.I am an Electronics and Communication Engineering graduate but your video is thousand times knowledgeable than my university.
One more awesome video. Thanks! I know this one was already long but maybe you could talk in another video about how the OS end up in the correct address space, touching subjects like bootstrapping, boot loaders, bios, etc
Bro, I wanna say one thing. Education system lacks the features, you're covering. Just go on. Cover everything from Digital electonics to Computer architecture & organisation. I'm a student & you're helping a lot.
Great video dude! I've learn all this stuff in uni, but you've put it in such a simple way, yet explaining most relevant concepts. Keep doing this quality content!
In a multi-core environment it's also possible to have other designs handling transfer of data between kernel and user mode using shared memory or bus messages so the kernel could be running on one core and other cores submit their requests through messages to the core. I don't know if any operating system depends on this though.
As I understand it, only the “business logic” is implemented in user mode, the actual I/O (e.g. DMA) is still deferred to the kernel. At least that’s how it’s done in Windows
Nice! I knew most of this but it was mosaic collected from different books and articles with some pieces of guessing. If I ever meet a person asking the same questions I'll send this video to him.
Watching this one video is all it took for me to subscribe to your channel. U are making great videos and explaining it in great detail, hats off to u !!
These videos are crazy good! I would love to learn more about how the boot process into the OS works and what the Ring 0, 1 and so on mean in this context.
Great info, even for those of us who have worked on operating systems and drivers. These videos always contain info I was unfamiliar with, or have new ways of thinking about how it all goes together.
You made merge my useless information that learn university logical and super understandable. Now i have better understanding how OS works. Learning this kind of solutions giving bird of better approaches for programming. I appreciate.
Your videos are fantastic; they helped demystify and clear up a lot of knowledge gaps in my understanding of computer science and programming, and I honestly believe these foundational subjects should be covered by any reputable programming course.
So for people wondering, an "interrupt" does not interrupt the CPU. It interrupts the current program. The CPU polls the interrupt bit at the end of each instruction to see if it should go to the next instruction or jump to the interrupt routine. It's not "interrupt taps on the shoulder of the CPU." It's more like "Interrupt looks out the door to see if someone is waiting after each instruction." Also, there are CPUs without the privilege bit. Instead, they use memory maps, and the "kernel" has access to a memory map that includes all memory, and user peripherals are assigned memory maps that don't map the hardware addresses into the address space. So there's no bit, but the operating system just removes privileges by removing the memory they'd have to address from their address space.
Saw this video, loved it, now I'm binge watching your other vids. You explain things so well! Subscribed at 126k (I just KNOW you'll be getting lots more subscribers soon. Good luck!)
I am engineering my OS to be as lenient and as dynamic as possible. Your videos give me better understanding of what to account for. I guess your work makes you a contributor to my and many other projects in some way :D
Thank you a lot for making these videos! These are absolute gems, packed with so much interesting information about the low level inner workings of computers, that too is an easy to digest and engaging format! ❤
Also worth mentioning: micro kernels. In those kernels, drivers are just user space code, so they cannot easily take down your entire system. If a user space program wants to talk to hardware, it triggers a jump into the kernel, yet the kernel will just jump into another user space program, the hardware driver and it offers API to hardware drivers that will allow them to talk to the hardware it manages directly and thus with very little overhead (e.g. using DMA data transfers), so the driver won't need to trigger kernel calls for every tiny interaction with its hardware.
13:05 OSes don't require user code to call interrupts to gain back control. They can just use a timer interrupt for that. Pretty much every CPU or modern system has programmable timer interrupts, which are interrupts that will fire at programmed time intervals, so an OS can always program one of those interrupts to fire in short intervals and thus gain back control frequently even if a user process never makes a system call at all. See 15:20. Thus system calls aren't really traps, they are usually just perform the task the user requested as for everything else a timer interrupt is used or it is executed in the handler of a hardware interrupt.
Video suggestions: - how functions work in assembly (follow up to how if statements and loops work) - detailed explanation of a process and a program layout (stack, heap, static memory, command line arguments, where the program is in the process) and how a process is started and stopped - more system call things, like how you write something to output - foreign function interfaces (DLLs)
How i understand is cpu would try to run a program if you don't syscall "ExitProcess" even after reaching the last instruction of your code, it will result in segmentation fault. main function in c/c++ aren't real entry point in .exe file, your main function is called from 'mainCRTStartup' or something else and when you call return 0; from main function it doesn't return control to os like a lot of people describe it, it returns to 'mainCRTStartup' that then does something and calls ExitProcess with your return number 0.
14:15 I remember back in Windows 3.1 days in the early 90s. The pain of cooperating multitasking is real. One badly behaved program would frequently lock up your computer.
I remember the Minix experiment. Everything except a very minimal kernel runs in usermode. They had some really good measurements, like injecting bugs into the network driver so it crashes like a hundred times per second but still maintaining a decent throughput.
This video answers the exact question that I had when I first studied OS and Computer organization and architecture.
While studying OS we are told that theres something called kernel space and user space and one is more privileged than the other, but never told how this privilege is enforced. At the end of the day if both programs run on the same CPU, using the same hardware, what exactly stops a user program from invoking privileged instructions is a question that plagued me.
When I asked my professor, he answered with one word, "hardware" takes care of it. A very ambiguous useless answer.
Interrupts are hella underrated man, nobody talks about them. Anyway thank you for your video, It will surely help those students who had the same question I had.
Whatever this guy says
Yesss Man... Even I have the SAME QUESTION... And after all these Year... The Concept got me cleared
@@AnantaAkash.Podder confusion bit cleared.
It's actually not ambiguous, otherwise nobody would understand anything- it's just that it's a very terse (and dense) topic.
Bad teacher
I literally started writing my own kernel like 1 month ago as part of my mastery at 42. Would have been way harder to understand what I actually have to do without your videos starting at how stack heap works until now with this video!
Massive respect being able to explain SO complex topics so that they are easy to understand - shows crazy mastery of the subject.
Keep up the amazing work!
Everytime a core dumped video comes out, the world gets 20% smarter. Huge salute to you man, I love your easy to understand and lucid teaching style. Using the information from the previous videos of the ongoing video series on the workings of computers, I have finished building an ultra simple 8 bit computer. You have been like a god when it comes to my quest of learning how computers work deep down. (I'm not in college yet, but I bet this is far more lucid than that)
If you are building 8-bit computers without yet being in college, you will achieve amazing things in the future. Keep up the good work!
@@CoreDumpped thanks man, it means a lot to be acknowledged by one of my heroes
Impressive effort. Wish you all the best in your endeavors.
Cpu architecture is kinda easy but it needs to be properly described and teached but by reading documentations i see that majority of devs can't teach things.
@@SirusStarTV this is so accurate, once you get the concept, it isn't extremely hard (even though some parts might get complicated). I had such a hard time trying to find good sources to start learning from. And it's especially hard when you aren't in college yet so you don't get this information picked out for you.
Professional software engineer here. I want to commend you for making this video; the topics are presented accurately, clearly, and with both honesty and integrity. You gloss over the concepts we don't need to understand (such as how interrupts are triggered from a hardware level or how program segments are loaded) and instead focus on only exactly what is needed to convey the topic.
Your definitions of "kernel mode" and "user mode" are perhaps the simplest and most accurate definitions I've heard to date.
Thank you for using an x86-derivative assembly language in your examples. In my experience, it's the easiest to follow for new students who have not had exposure to assembly language programming.
Thank you for discussing what can go wrong when the Mode Bit is mishandled.
I absolutely love how you mentioned about kernel mode drivers being potentially untrustworthy (and that you're sceptical about proprietary operating systems too). I think it's very important to help people realise that.
And kernel anticheats. What a bunch of bullshit that i am forced to install that cancer when i want to play games i like. Like Pirate Software said, they are not even that much better
@@kliperxpirate software is a skid who only knows about stopping a macro user and multiboxer. he knows nothing about real game hacking. kernel anti-cheats are much better then user mode anti-cheats. user-mode anticheats allow anyone to bypass them, because the only reason why anti-cheats went kernel was because cheaters were doing it first. going kernel is the easiest way to bypass a user mode anticheat. kernel anticheats are good and are sketchy but it’s ignorant to say they aren’t much better than a user mode anticheat
I learned more about OS in this video than my entire bachelors degree in computer science. What a well explained and visually clear video!
Vishwadeep Gothi OS On Yt English..... He's pretty good
The way you explain OS concepts is above the level of most courses in even the most prestigious universities. Please never stop making these 🙏🏽
maybe pay attention in class? This video showed absolutely nothing new. Be a better student.
@@kevinzebbsays someone who has never visited an IT lecture
@@4_real_bruh doing a PhD in CS rn, a little better than IT. IT is for people who couldn't do cs, so they went the easy route.
Dont show this video to bit-flipping solar particles
Such security bits are stored directly inside a CPU, so they are not affected by the cosmic rays.
Storing them in RAM would've been very slow and insecure in the first place.
@@mk72v2oqwoosh
@@mk72v2oq Why are you implying CPUs are immune to cosmic rays? That's not true. Even less true once you introduce quantum tunneling.
@@Google_Censored_Commenter they are not completely immune of course. But probability is so low it makes such event practically impossible.
As for quantum tunneling, there is a non-zero probability of all your body's particles simultaneously teleporting into another galaxy. But the probability is so low that we say it is practically impossible.
Bits in the memory are affected because of DDR SDRAM inherent flaws. In fact, it is so vulnerable that you don't even need the cosmic rays to flip the bits. See DDR "Rowhammer" attack.
@@mk72v2oq Memory is not specially exposed to cosmic rays, that's just something you've made up in your head, that's all I wanted to get across. Maybe RAM is designed in such a way that it has other flaws, but that's irrelevant to whether cosmic rays can play a role in flipping bits or not, and it's been observed in reality, it's one of the reasons we invented ECC memory. It didn't become a relatively well known phenomena in computer science just because it sounds extravagant.
Labeling this video as a "bit mode" video is an understatement. I spent hours and got the best books about OS fundamentals and none of them put it all together like this. Even some books dive in more specific details like what is an Interrupt Vector Table etc. None of them puts it all together like this.
You've got a sub.
Fun fact: in x86, the mmu page tables are in memory, so if the os for whatever reason maps a part of memory where a page table is located, into a proceses virtual memory space, then the proces can modify the memoy layout using usermode instructions.
There's even apis for writin to other processes memory pages.
Isn't this the basis for userspace drivers in microkernels?
@@James2210You might map some mmio into userspace, but I don't think there's a good reason to give userspace the ability to write to page tables
A year ago, I was doing a car's racing game project with my colleges in assembly x86, and we encountered a problem where we wanted to make taking the input of keyboard kind of asynchronous, where you can press more than one button at the same time and all of them get handled at the same time, the problem was that the interrupt that was used to handle getting the pressed key on the keyboard didn't actually handle this the way we wanted, so after investigating a lot we had to override the default handler routine and used another one that did what we wanted, and this was actually one of the coolest things I have ever done since I started learning programming
what a generational run bro, been here since (almost) the start and praying to stay for long.
i bet this is what it felt like for earlier generations to watch and study from 3b1b and Ben Eater at the time they were releasing their videos.
i've recently started going the book route, going through the computer systems book, and i have to say you are such a good (and even on par) supplement.
i can't wait for the virtual memory video. cheers bro
This is all just ai generated lol
i mean sure, he doesnt hide it either... but the TTS gets the job done, and very well too, so who cares - the information and presentation is great
As a current electrical engineering student I am very glad I found this channel. Keep up the great work George!
Damn what a treasure.
I think subscribers should help this channel out give some donation to make sure the sustainability of it.
+1
Please do a series on RISC-V based softcore CPU, and it's interaction with kernel code, how ISA and architecture are related and compiler's compilation process
He has videos on those and this is yet another video regarding that
Great content. Even though I’m working as a .NET developer, it’s great to see the underlying technologies of what I’m doing.
Yikes... Isn't .NET running on a virtual machine like Java?
If you like this kinda stuff, check out RISC-V or ARM microcontroller assembly. It's really deep down the rabbit hole, for sure, but you gain a real appreciation for how the CPU does its thing.
Your videos simplify boring textbooks so well, that I'm starting to feel inpired to create videos. Honestly, your Ability to create engaging scripts is beyond the curve. Keep improving 🎉
I haven't been a student for over 20 years now and I understand how processors work in conjunction with operating systems.
But damn, this video is just great. I think it would be great for explaining how protected mode works to non-IT people. Thanks a lot for the work!
Man! I'm SO HAPPY just because I found your channel. This is, by far, one of the best TH-cam channel about computing in a low level perspective. Your work is absolutely necessary. Please, never stop! 🙏🏻❤️
This actually one of the best videos I have seen so far explaining this. This is high quality content, thank you. There are almost like 0 zero mistakes explaining this. Perfect examples, Perfect visualization. Thank you. This is truly awesome!
This is simply the best channel explaining how computers really work. Thank you SO much!
This is one of the best videos on operating systems I have ever watched. In my lectures my professors really took a strong abstract look when talking about operating systems that for me made it very hard to wrap my head around (for example, talking about ring levels when thinking about programs running on a computer). This video is a light bulb moment to all the things I have been studying. Thank you so much for this free content!
Dude you are a legend! All other videos I have watched never answered ALL the questions I had, they just explained what I already knew. But YOU! Respecto! 🖤
Right now I'm recreating the RISC-I and applying modifications on it for my college's final paper, this video helped clear really well some concepts that are applied on it, thank you!
To someone like me planning to take OS as my area of specialization (and starting the journey on that path) this is a priceless gem.
The fact that I, a novice non-programmer and casual PC user, enjoyed this video greatly showcases Core Dumped's skill in simplifying complex information to a user-friendly level. Subbed.
This has been quite interesting, I'm doing a project with a friend (for fun). He's writing his own OS, and I'm writing the file system for it. I hadn't really considered how privileged mode is enforced, or how the kernel is able to enter and exit it securely. Thank you for the easy to understand video, it was great!
There’s always this ambiguous talk about user space, kernel space and privileges; but it never really clicked for me and I never gained any intuition. This video fills the exact gaps everyone forgets to answer with much detail. Thanks
this video is objectively trash this foo just keeps rambling about something without making any sense
Brother this video is priceless, your way to teaching is literally best.I am an Electronics and Communication Engineering graduate but your video is thousand times knowledgeable than my university.
I cannot give you enough money for these videos.
Thanks for sharing those 3 videos from low level learning at the end. Really useful to put it into real world perspectives.
Fire thumbnail 🔥🔥
Every computer science lecture should start with your videos to grasp the fundamentals of software principles
One more awesome video. Thanks!
I know this one was already long but maybe you could talk in another video about how the OS end up in the correct address space, touching subjects like bootstrapping, boot loaders, bios, etc
你的节目真好!希望快点更新完计算机组成原理和操作系统两门课程!已经迫不及待了!感恩🎉
What I would have done for animations and videos like this when I was studying Computer Science 25 years ago!
OS and CompArc finally made sense together! Thanks a lot!
bro i dont know how to thank you for this masterpiece, you earned my subscription.
Babe wake up, new Core Dumped video just dropped! 🎉
Was gonna say this lol, the world gets 20% smarter everytime he posts
I was looking for this comment😂
New Core Dumped just… dumped
The scenario imagined by the original commentator is just….
Hugs from Brazil. I simply love your channel. Please keep doing more videos
Bro, I wanna say one thing. Education system lacks the features, you're covering. Just go on. Cover everything from Digital electonics to Computer architecture & organisation. I'm a student & you're helping a lot.
This is so good for my soul, please please make more videos you explain so elegant and so simple it's mind blowing
Great video dude! I've learn all this stuff in uni, but you've put it in such a simple way, yet explaining most relevant concepts. Keep doing this quality content!
These videos are absolute gold. Thank you for putting up such high quality content.
This channel is god send for low level / Embedded developers , Keep going mate love your work .
Damn, just found this channel,. definitely going to be one of the most imp YT channels for Comp sci students and for those interested, hats of sir❤
You forgot to mention microkernel-based operating systems. In those the device drivers run in user mode.
In a multi-core environment it's also possible to have other designs handling transfer of data between kernel and user mode using shared memory or bus messages so the kernel could be running on one core and other cores submit their requests through messages to the core.
I don't know if any operating system depends on this though.
As I understand it, only the “business logic” is implemented in user mode, the actual I/O (e.g. DMA) is still deferred to the kernel. At least that’s how it’s done in Windows
thats what I was wondering about too
Finally I feel like my curiosity from 20 years ago was finally answered, mad respect.
Nice! I knew most of this but it was mosaic collected from different books and articles with some pieces of guessing. If I ever meet a person asking the same questions I'll send this video to him.
I love that you don't speek in the speed of light and shout at the top of your voice, and i can actually follow as a non native English speaker.
That's because the voice is AI
this content is amazing, what a time to be alive
I don't care about AI voice. I care his explanation and teaching, which is top notch.
Out of AI voices go, this one isn't that bad tho.
If it was disclosed somewhere, it'd be better
That's a high quality voice
Bloody hell I didn’t notice 😮
@@ladripper47874why?
Watching this one video is all it took for me to subscribe to your channel. U are making great videos and explaining it in great detail, hats off to u !!
These videos are crazy good!
I would love to learn more about how the boot process into the OS works and what the Ring 0, 1 and so on mean in this context.
I couldn't have imagined how enlightening this has been to me, thank you
this video is insanely good ... thank you very much for your work, its incredible
Great info, even for those of us who have worked on operating systems and drivers. These videos always contain info I was unfamiliar with, or have new ways of thinking about how it all goes together.
You made merge my useless information that learn university logical and super understandable. Now i have better understanding how OS works. Learning this kind of solutions giving bird of better approaches for programming. I appreciate.
Your videos are fantastic; they helped demystify and clear up a lot of knowledge gaps in my understanding of computer science and programming, and I honestly believe these foundational subjects should be covered by any reputable programming course.
I just can't explain how good this video is oh my god
So for people wondering, an "interrupt" does not interrupt the CPU. It interrupts the current program. The CPU polls the interrupt bit at the end of each instruction to see if it should go to the next instruction or jump to the interrupt routine. It's not "interrupt taps on the shoulder of the CPU." It's more like "Interrupt looks out the door to see if someone is waiting after each instruction."
Also, there are CPUs without the privilege bit. Instead, they use memory maps, and the "kernel" has access to a memory map that includes all memory, and user peripherals are assigned memory maps that don't map the hardware addresses into the address space. So there's no bit, but the operating system just removes privileges by removing the memory they'd have to address from their address space.
Saw this video, loved it, now I'm binge watching your other vids. You explain things so well! Subscribed at 126k (I just KNOW you'll be getting lots more subscribers soon. Good luck!)
I am engineering my OS to be as lenient and as dynamic as possible. Your videos give me better understanding of what to account for. I guess your work makes you a contributor to my and many other projects in some way :D
Thank you a lot for making these videos! These are absolute gems, packed with so much interesting information about the low level inner workings of computers, that too is an easy to digest and engaging format! ❤
Love the work, please continue producing more on this low levels, and the graph shines.
Fantastic video. I always struggled with architecture of interrupts. Now it's clear to me. Thank you!
Your videos are number one for systems programming. Keep it up!
bro you are good at explaining and it seems to me you know a looot. you actually inspired me to learn low level programming
This is an amazing video. I shared it with the developers in my company
Also worth mentioning: micro kernels. In those kernels, drivers are just user space code, so they cannot easily take down your entire system. If a user space program wants to talk to hardware, it triggers a jump into the kernel, yet the kernel will just jump into another user space program, the hardware driver and it offers API to hardware drivers that will allow them to talk to the hardware it manages directly and thus with very little overhead (e.g. using DMA data transfers), so the driver won't need to trigger kernel calls for every tiny interaction with its hardware.
The editing is spectacular 🎉.
I loved your video, definitely subscribing!!!❤❤
I've been looking for a channel like this ever since 2005
Amazing content. Very illustrative and very well explained. Please, keep producing more and thanks a lot😎
I like your content so much!
Those videon explains complicated things in a terms easy to understand and well visualized with an animations.
Thank you!
What a lesson !!!! Very nice vid ! Thank's for your effort to explain in such very very detailed steps on how the thinks work !
Amazing. OS guys worked really hard to make all of that magic
Wow thanks for this video! This is very well thought and explained!
This channel s underrated. How come 131k…..wish u millions 🎉🎉
Love your videos. Can’t wait till you get to packet scheduling that concept’s implementation has eluded me for a while
13:05 OSes don't require user code to call interrupts to gain back control. They can just use a timer interrupt for that. Pretty much every CPU or modern system has programmable timer interrupts, which are interrupts that will fire at programmed time intervals, so an OS can always program one of those interrupts to fire in short intervals and thus gain back control frequently even if a user process never makes a system call at all. See 15:20. Thus system calls aren't really traps, they are usually just perform the task the user requested as for everything else a timer interrupt is used or it is executed in the handler of a hardware interrupt.
There's some charm of how he explains everything.
I love your videos, George! I always learn loads of new stuff when I watch them!
You are about to reveal the architecture of processors. We need more vids like this
This video is awesome! Make me understand computer so clearly 🎉
This channel is an invaluable resource.
Video suggestions:
- how functions work in assembly (follow up to how if statements and loops work)
- detailed explanation of a process and a program layout (stack, heap, static memory, command line arguments, where the program is in the process) and how a process is started and stopped
- more system call things, like how you write something to output
- foreign function interfaces (DLLs)
How i understand is cpu would try to run a program if you don't syscall "ExitProcess" even after reaching the last instruction of your code, it will result in segmentation fault.
main function in c/c++ aren't real entry point in .exe file, your main function is called from 'mainCRTStartup' or something else and when you call return 0; from main function it doesn't return control to os like a lot of people describe it, it returns to 'mainCRTStartup' that then does something and calls ExitProcess with your return number 0.
I am trying to rotate a pos machine printer motor with interrupts. This was helpful, and the video came right on time...
14:15 I remember back in Windows 3.1 days in the early 90s. The pain of cooperating multitasking is real. One badly behaved program would frequently lock up your computer.
Just arrived, immediately subscribed. This is heavy dope.
Best video ever.......Woow!!!!❤
I remember the Minix experiment. Everything except a very minimal kernel runs in usermode. They had some really good measurements, like injecting bugs into the network driver so it crashes like a hundred times per second but still maintaining a decent throughput.
Another excellent video! ¡Otro excelente vídeo! Outro vídeo excelente!
Class and elegant explanation
This channel is the best thing I accidently stumble upon
thank you for the video, I learned more about how does OS work
I made it two minutes before feeling overwhelmed, I’ll be back!
awesome explaination, i hope to see a video explaining the moment the OS gets loaded and gain control, thank you
very clear explanation .thank you as always for enlightening us
this is just a gem of a channel 💎 top notch 👍👍
Holy crap, how did I only find this channel today?
Insta-subbed!