The fundamental unit of work in modern computer systems
ฝัง
- เผยแพร่เมื่อ 25 ก.ย. 2024
- This video was sponsored by Brilliant.
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/.... You’ll also get 20% off an annual premium subscription.
In this video we dive into the technical details of processes.
Questions and business contact:
contact.coredumped@gmail.com
Sponsor my work on Github:
github.com/jdv...
Join our discord server:
/ discord
Follow me on twitter:
twittter.com/c...
Twitch:
/ coredumpped
Getting this compliment in early in hopes you see it before it gets buried. Your videos have demystified the fundamental parts of computers I had thought I wasnt smart enough to understand. You have given me the confidence to feel like I can tackle any computer challenge I come across. I ravenously wait for your next video after each one is released. Thank you!
yeah he really is influential
Same here
He's amazing. A good human
This is truly amazing, as a low level enthusiast, I now know what processes really look like at the low level, you really explained the concepts in one of the most beginner friendly ways possible. Keep going George! looking forward for the next episode.
Once again, the production and educational quality are absolutely marvelous! Even though I’ve already read about many of these things, the visuals always solidify my knowledge and somehow excite me because I get to live in this wonderful era of computing. Please keep it up.
Will do! Thanks for the support!
@@CoreDumppedwhere are you from? Please keep the brilliant work
I wish these videos existed back when I was taking OS course. Simply amazing.
I hardly ever comment on anything, but the quality here is insane. Not just the graphical quality either, the quality and accessibility of the information blows my mind. Like others have said you are a wizard at demystifying the concepts you explain. I come from a mechanical engineering background but feel as though even I can grasp these concepts now. Keep up the good work! You've made a lifelong fan here.
@CoreDumpped your creations are excellent. I'm waiting for video of Virtual memory, mapping of virtual memory to physical memory, pages, page tables,TLB. Please make it proper descriptive take your time and make us understand it crystal clear.
your work is truly amazing but if possible share some of the resources is description section so that viewer who is interested could understand it more clearly. thank you for amazing content
Bro keep making low level videos these visuals aren’t found any where else. You’re gonna blow up in subs there’s a huge market for this.
Well done! My suggestion: after your video about threads, a video about forks and pipes to explain how process "talk" to each other.
Best video on modern digital computing on the whole wide web. Thanks a lot Core Dumped.
The Linux scheduler code part was neat, I would love to see more real-world code snippets in future videos!
Absolutely in love with these videos!! Very clear explanations. Keep em coming! 👏👏
Another Great Video with Great Animation. Thank You for your work !!
What app do you use to make these animations ?
I was curious about the same
From another comment, it's PowerPoint!
@@SetKat-Alex 🤯! That is amazing. I personally find it (and the entire Microsoft Office product family for that matter) so not user friendly,thst I prefer Libre Office I didn't even know that this is possible in what I always call "the game managers can play at work".
Amazing video! Learning these low-level concepts is so fascinating!
Absolutely amazing content, thank you! BTW what animation tools you use for creating animations like this?
Everything you see on my videos is PowerPoint slides.
@@CoreDumpped Respect! 👍
@@CoreDumpped WHAT!!? Awesome, I thought you custom made your own animation framework (like manim python). I guess I grossly understimated powerpoint 😅
For those who aren't aware, the Power Point application is Turing Complete. Someone has actually made a basic general-purpose CPU with its slides and transitions states. Power Point is very flexible and powerful!
Great video! It just misses one thing. I think you should mention that the OS itself also is something that is executed by the CPU, so simply claiming that it manages a context switch doesn't really explain how it works. Therefore I hope that you plan some video about interrupts.
Thank you for this video CoreDumped
Your videos are gold. Are there any resources you can share for further reading?
Amazing video, super educational. Thanks for sharing.
Its finally here!
Where is the cpu state being stored?
Is the capturing of the cpu state something that is stored in heap memory? Or some special memory location?
Edit: I should have waited longer before asking the question
I guess the real question is: where is that structure (PCB) stored? Does the OS have a stack and a heap? Interesting topic for a future episode😉
@CoreDumpped That is an interesting question. The stack is normally restricted in size by the OS, but the OS makes the rules, so I guess it could hypothetically run solely on a very large stack, but it would seem useful to save user process cpu snapshots on the heap external to the stack since you have a dynamic number of processes being generated and terminated.
@@CoreDumppedcannot wait to watch!
@@CoreDumpped I noticed you have a double p in your handle. But it's most likely too late to change it.
@@ltecherofficalyou think he doesn't know that brother 😂😂❤❤
Another great video! Thanks.
Great video! Keep up the good work :D
I love this channel so much
Great Video!
Now im curious how interrupts work.
Love your videos man
and now for the hard part: how would an operating system allow the processes to be able to "talk" to eachother.
There's a video on different forms of IPC already in the list.
This is so great!
This is MCU level world building for OS. Each building on top to give "OS Infinity Saga".
thank you for your great content :)
very nice!
But where does the operating system run on in the corruption example?
What is the point of storing terminated processes?
¡¡El puto Amo!!
This is good
so while context switching, how does the OS restore the previous state of a process?
does it restore the previous state using one by one instruction just like it do to execute content of a process?
or is there any other way to restore back the previous state of the process into CPU at once?
Depends, on simpler CPUs its just one by one instructions, on x86 its one by one for the integer registers and a theres a xsave instruction for saving the SSE/AVX/whatever registers
So. You going to talk about ZMQ?
Hi George 😊
Well done! I like that you use Rust in your examples, I find it much easier to understand than C.
For me, it is the same way, but it's mostly because of the int sizes in variable definitions. I would use Rust except the borrow checker destroys me every time.
Its nice to see you are using Rust code in your examples? Rust is best.
fkk this is hard
14:10 I am not sure about the memory limits part. Each process works in a virtual address space so when it wants to fetch anything from it the MMU just translates it to the physical address or produces an exception/interrupt if there is no current mapping for the accessed address (or if the process does not have permissions to access the mapping). Now, to access the memory of another process as in the example, the OS should have mapped that memory previously and this can be achieved solely through system calls. If the OS works correctly it should never allow a process to map any resource that's beyond the process' privileges. Another note, the 1:07 image is a bit incomplete, usually half of the virtual address space of a process is kernel space where kernel code is mapped (obviously when the process is running in user mode it can't access the kernel mappings).
you are a awesome teacher in my life i have ever seen 🥰🥰🥰
would you ever dab on a video about cuda and also gpu hardware ?
great stuff btw :)
What a Chad, using Rust for code examples.
woah this was extremely easy to follow, and thank you for using rust for the example code, I think rust is the best language to show examples for such concepts
Lookin' forward to the one about the MMU.
I really enjoyed watching this! Thank you for making this. I would love to do some additional reading on this, would it be possible to reference books/articles that you referenced through while making this video? Thanks man.
For Operating Systems theory: "Operating System Concepts" by Silverschatz.
For low-level stuff in general: "Computer systems a programmer's perspective" by Bryant, O'Hallaron.
Thank you so much for this wonderful amazing explanation. Eagerly waiting for CPU scheduling video.
It's a public act of profanation browsing source code of Linux in VSCode 👻
Hey core dumped, i really enjoy your series of providing better understanding of low-level concept. I also like the animation style, may i ask what software you use to do these animations?
Dear Core Dumped... plz also Make Video in the Future about "System Call" & "Kernel Space"... that thing is Very Confusing... like... does "Kernel Space" exist for Each of the Processes Individually or there is Only One "Kernel Space" in the Whole RAM
Please don't stop making videos 🙏🙏
Core Dumped is one channel which I made sure, I visited regularly while researching and writing my book.
Following you for almost more than 6 months+... You truly are Criminally Underrated TH-camr... Even after Subscribing I am Not getting your Videos Update... I have to manually Come here to see if any New Video is being Uploaded.
They should show this video in IT department classes. The visualizations are incredibly fascinating. I recommend your videos to other developers. I can see that they are starting to understand more.
Sir, you will be recognized someday, at least 1M sub. Please keep up these great work!
This is some really awesome work buddy ❤
Keep up the good work 🙌
Hello! This is absolutely amazing work. Computer Architecture fundamentals in its easiest form. Can you please suggest any books on microprocessors and computer architecture?
Your videos are amazing! So clear and interesting!
Hey George. Your videos are incredibly satisfying to watch. They let me follow your train of thought both visually and by listening to your well-articulated words. I get multiple "aha" moments in each video. I'm sure tons of work goes into creating each one, so I hope you can keep it up.
The way the explanation is taking place from the beginning to end really marvelous. Eagerly waiting for the next episode.
I want to like your videos more than once 😅
Love your content, you are amazing!!!
oh, so child AND parent processes use Arc?
well done, you've got a memory leak! ❤
(not sure as of which one should use Weak in this case. I guess it's implementation-specific)
Old discord logo. Earnt my respect
I love your videos. I've finished university a few years ago and some concepts started to fade away from my mind but your videos are not only a perfect refresher but also add some new and interesting information. And so well produced. I do hope you keep getting more and more sponsorships
Another great video, keep it up! One question tho, how does the GPU play into this!
Oh my goodness, I could like the video a thousand times over. The Process Control Block has been the missing piece for me all this while. This is such a great resource
How can I learn this stuff from the bare basics? If there’s any course or degree I can go after?
I don't usually coment on any video, but this channel has something different. You explain these low level concepts in a way no one else does. The clarity of the explanations is astonishing.
Keep going, you're doing a great job! I can't wait to see your next videos!
Wow, this is one of the best channels about low level stuff
now i'll build os better than windows
just wait 😂
By the time you finish this series, these should be taught in unis. Great work.
Bro i am starting my new position as a software engineer. Once i make some money i promise i will donate to you. The level of quality you put out needs to be studied at the highest levels, and videos need to be used in college classes
Thank you very much am grateful
i always love your videos the animations are very well done and you explain it in detail without overwhelming. please keep this series going i already learned a lot < 3
Keep giving me these gems HAHAHA
beautiful
👏👏👏👌👌👌👌🙏🙏🙏🙏🙏🖖🖖🖖🖖🖖
Thanks!
Great video
This is GOLD!
nailed it
Voice AI
I've always been kinda curious as of how does CPU distinguish OS from any other process?
I mean, process can't just tell the CPU to never interrupt itself, so there must be a way... 🤔
"Kernel mode vs User mode." A topic for a future episode.
Thanks, I just have one question: when the OS starts executing some other program, how does it ever get back out? E.g., if the OS hops into a part of an entirely separate process, and changes the program counter to point to that program instead, how does it regain control and switch back to its own execution?
I explained this on my video about concurrency.
There are two ways:
-System calls: The process itself calls the OS when requesting some resource.
-Timer interruptions: Right before allocating the CPU to the "next" process, the OS uses an special instructions to set a hardware timer. The process might still return control to the OS via a system call, but if it doesn't, once the timer expires it will trigger an hardware interruption that makes the CPU jump to the OS executable code.
i can't find the linux source code path for the sched.h file .any help
github.com/torvalds/linux/blob/master/include/linux/sched.h
❤
I’d love to know how hyper threading deals with all this. I read that it “exposes” 2 contexts to the core but my understanding just can’t fit the puzzle piece. Shoving another dependency chain into the execution unit is straight forward, but what about the non-general purpose registers? Does each core have 2 PCs and SPs and etc.? Can you context switch one without the other or are they switched out together?
For the operating system they are just 2 independent CPUs with their own set of independent registers
what really happens inside the physical core.... who knows?
Ugh, Rust.
Great video! But doesn't the OS itself also need to be run on the CPU? The context switching must require processing as well, right? How would the whole thing be juggled then?
I was waiting for this question😄
I'll cover this soon in an episode. But the short answer is: Hardware support.
Operating systems have access to Privilege Instructions that User Programs don't.
The problem can be addressed by:
Using multiple sets of registers, so when the OS is invoke it uses its own register set to operate, hence not altering the state of the interrupted process.
Another way can be a Privilege Instruction that copies (in one go) the content of ALL the registers into a specific memory location whenever an interruption is fired.
These are only two examples, I'm pretty sure there are more ways to do it.
@@CoreDumppedappreciate the reply! Yes, this makes sense. I look forward to the episode on this 😃
The overview of a process being context switch is very good and all and the mentioning of the scheduler is nice, however, I noticed that there was no mention of or lack thereof of what is typically called an Activation Record(s) within computer science either it being software or hardware engineering. I think this ought to be mentioned and well explained as well as I feel or believe that it is related, relevant within the context of this topic or material. Other than that, excellent video, great material.
This was AI generated so don't expect correct answers.
@@ArthurSchoppenweghauer Possibly.
Activation Records are stored in the Stack, and the Stack was in deed mentioned. I even specified that, during execution, programs need memory space to save temporary results.
A lot information omitted, I know. But it's very difficult to put so much information into a 15 minute video.
@@CoreDumpped True. So perhaps it was in an older video leading into this one. It's just that the association of it within the context of process space was kind of left out.
As per usual, great video.Please keep it up.
One thing Im left wondering about is how the context copy scheme works. That procedure must use some logic, and things like registers need to be preserved without modification, right? Is there some kind of hardware acceleration or assistance for this in modern CPUs, or is it handled in another way? I’d love to hear more details on that.
One of the things I love about your channel is how you build out every topic so exhaustively, leaving almost no room for questions. I think it's first real one I have. What you’re creating is seriously exceptional quality. Thanks for the upload!
Two examples:
-Use of Registers Sets: The operating system uses its own set of registers so while performing the Context-Switch it doesn't overwrite the state of the interrupted process.
-Every time an interruption is fired, the CPU automatically copies the content of ALL the registers to a hardcoded memory location.
So, yeah, hardware support is needed. Again, these are just two examples; there are more ways to handle the problem you described. Ultimately, whatever method is used depends on the CPU architecture.
@@CoreDumpped Okay, that makes sense. Thank you!
best channel for software engineers!
Your English is lacking. Phrases like "children processes" or "these extra steps resolves..." diminish the quality of this video. Furthermore, I must wonder just how incorrect your videos are in general. AI systems tend to hallucinate falsehoods but present them with enough confidence to convince naive human beings susceptible to hype and other forms of general bullshit. Edit: given the overly enthusiastic audience reaction, it may be the case that a) most people are even more naive than I assumed or b) the comments section is full of bots. The lack of critical thinking is astonishing.
I recognize my lack of English. In fact, I've mentioned in the past that english is not my native language and that is why I use TTS for voiceover. But not a single line of the script is AI generated. My main source of knowledge is: "Operating Systems Concepts by Silberschatz".
The fact that you assume my audience is stupid or just bots without ensuring the content is correct says a lot more about you than it does about me. And yet you complain about the "lack of critical thinking" of others.