How does an OS boot? //Source Dive// 001
HTML-код
- Опубликовано: 26 сен 2024
- In this installment of //Source Dive//, we're learning about the xv6 Operating System; Specifically the low-level boot code that gets the CPU in the correct state to run the OS!
=[ 🔗 Links 🔗 ]=
🐋 RISC-V Docker Image: github.com/fra...
🎥 Series Playlist:
🗣 Discord: / discord
⭐️ Patreon: / lowleveljavascript
💻 Github Repo: github.com/mit...
The RUclips algorithm just landed me into a gold mine, this is pure computer science heaven ❤
True
This is gold . Link to the other gold ones you ran into ?
We need a discord
computation heaven for real so much so we should all say f the system and big companies and make our own tech :)
🙈
The step by step walkthrough explanation of the source code of how an operating system's kernel is bootstrapped from asm to C systems level code through showing how the compiler, assembler, linker, etc. sets up the stack frame, system registers, interrupts, exceptions, privileges, modes is just as good as watching Ben Eater's series on how to build a CPU from discrete logic gates and integrated circuits. Job well done. I'd love to see how far this series will go and where it will end up.
Ben eater ❤
@@zoro.73what RUclips channel is that??
@@davidbriggs8109 search it up, he goes into basic gates up to 8 bit processor in breadboard
@@davidbriggs8109 it's just named Ben Eater
@@davidbriggs8109 he does a lot of electrical engineering stuff; he has a series where he makes an 8-bit cpu out of logic gates
man this is just absolute gold. To find videos that focus on the right details and with such clarity and simplicity is amazing.
God bless youtube for recommending this channel.
I never got the chance of going this deep into CS since I majored in electrical engineering and then transitioned into dev jobs so I've been filling the gaps over the years, I hope you can continue this series sincce there is not a lot of Operating Systems content specially as well explained as this.
I'm currently going the other way around - I've always been firmly planted in the software world, but these days am learning a lot about digital and analog electronics 😄
nice pfp
We have the same path
This is briliant! I'm a self-taught Software Engineer working daily with high-level Java / Kotlin web applications, and I've always felt the need to understand what's going on in the lower levels. This series is both very well explained and detailed! Keep it going!
Also I feel this is 'real' programming and what we do in the web dev is just 'riding on the shoulders of giants' ;-)
Thank you, and I'm really glad that you're enjoying it and are curious about the lower levels of the stack. Most of my career was also spent in the Web space, and I hate the attitude that this kind of stuff is out of reach for anyone who isn't a "systems programmer" by trade.
I really recommend you nand2tetris and nand2tetris2... really fun and learned a lot (Im also a self taught SE)
spectacular video, i’m so happy someone actually goes through every single step of the process and doesn’t just describe what’s going on generally
This video is really awesome. Keep making these videos please.
For all the grief I give the youtube algorithm, every now and then it puts out a gem. Thanks for making this video.
I just find low level programming extremely fascinating and this was very well-done!
Thank you!
This is an absolutely fantastic video. I really enjoyed your prior series on building a bootloader, and this scratches that same itch. I've been a professional developer for almost 30 years, but I've never really worked at such a low level, and I find this stuff fascinating. I'm looking forward to the rest of this series, and would love to see the next series tackle adapting this to physical hardware.
I took two undergrad OS classes that used xv6 and oh boy does this bring back some memories. But they were some of my favorite classes and it’s super cool to see this kind of material on RUclips. This video was very well explained and I look forward to watching more videos in this series
Did you debugged on the same VM as the speaker? I suppose, it's a bit more painfull, than my Python+Sentry stack? TELL ME MOAR
I agree with the crowd. Such videos (explanation of each line of code)is much more useful than most of related videos available. Thanks!
finally, long-form detailed content I can actually learn from.
no snappy edits, no doom-y & clickbait titles, no music and fiesta, just learning together.
great video! binging your channel rn.
Man, kudos to you. I've been on youtube for many years trying to find a youtube who knows how to tell a story during a tutorial. I love your approach to explaining how OSs works. You have my sub!
I am a Mechanical Engineer with 30 years in (Manufacturing) Engineering Industry in Equipment Maintenance (Mechanical/Electrical/Electronics), not from computer engineering background but a computer and electronics enthusiast. I use to watch such videos and learn everyday about coding, programming etc. new latest happenings. I have used regularly the most of the OS from MSDOS 6.22, Unix, Linux, Windows, Android ... Still I curiously watched your video, and enlightened with many things I never thought about the internal functioning of OS ! Thank you for such amazing explanation videos !
Wow, I'm honestly shocked how small this project is. When I first saw you open the folder I thought "that's it?" Really helps reduce the intimidation of looking at kernel source code.
My bachelor project was implementing an OS. I made a 64-bit version of JOS originating at MIT. There were references to XV6 in there too. This is a spectacular video reminding me a lot of that work. - The structure of this OS is very similar to what I made
Interesting. What was the core of your OS? I keep thinking the bare minimum is managing all the different tasks and allowing communication among them.
@@kayakMike1000 I’m not sure what you mean by the core? It had preemptive multitasking, virtual memory isolation, file systems, copy on write memory and more
Great video! I really appreciate the emphasis you're putting on understanding code. As someone who's been in the software development field for years, I can vouch for how crucial it is to comprehend different coding styles and logic.
Your videos are not just informative but also incredibly valuable for developers at all levels. Even though I've retired, I can still see the need for these resources in the industry. Keep up the good work! Looking forward to more code reading and review videos from you! 👍😊
This whole video helped me to refresh a lot about my S.O classes. Seeing and understanding how everything is wired up it's so interesting
This is so fascinating to get a peak under the hood at what a basic operating system involves. Your explanations are very clear and consise, it makes this a great experience to watch
I have never written a line of code, barely seen it, of a operating system in my days, yet I find myself intrigued by your videos. That says alot about your storry telling and knowledge!
I absolutely love this clear and concise content for low level stuff which is almost non-existent out there on RUclips. Props for going through actual code as well. Gold for me as an embedded engineer. Subscribed.
I changed field to Embedded engineering not long ago but unfortunately I normally write app level stuff and only have to deal with low level stuff once in a while. Thinking about preparing myself as an actual embedded engineer who can architect embedded software from scratch so this sort of video is extremely useful for my future career.
One of the best videos I've ever came across in this platform.
This video is exactly what I need to watch. As a beginner, I don’t know where to start, the others I have watched about kernel is either about showing me a whole bunch of assembly to run specially on that processor or about a simple os that does nothing but printing just a line, or about diving deeply into what Linux kernel is doing. I am not say they are wrong, but hey “In operating system project, arguably the first thing you want to do is to get out of assembly as soon as possible”. This is gold! Please continue of what you are doing and you are doing it right!
This video is an absolute gem, my OS classes didn't go that deep and this really filled the void of how things really start.
This is amazing please don't stop; it is very rare to find such in-depth details for low-level explanation . Thank you
This is awesome!
Beforehand I already watched Ben Eaters 6502 series and watched/read multiple other sources on how operating systems work. This fills that gap perfectly! Thank you :)
you're a legend for making that, legit better than 1000 books
This is really informative... I am currently taking a course in operating systems engineering and feel completely lost, I finally feel like I can actually understand what is going on!
Thank you
Thank you very much for this video! Im a Software-Developer for corporate applications mainly in JS/TS/PHP/Python world and i am very keen about this topic for a long time now.
Its very pleasent to have someone with a good knowledge in OS-Development explain how "it" really works. I personally found it hard to find out where to even start and what the order is to get into this topic of OS-Booting, OS-Runtime and interaction between an OS and the code i am writing on a daily basis.
Very good video! Brings back memories. Back in -96, second year in CS studies, we had a group assignment in the OS course. Write a multitasking operating system for a RISC processor. It was a bit overwhelming to say the least.
Seeing it like this, with some experience gained along the way, was both educational and entertaining!
[I get it that this is the boot part of the OS. Another piece of "magic" is, as far as I'm concerned, the thing that happens between power on and the entry point of the OS boot sequence. On actual hardware in particular but also in comparison with virtual hardware. The "oh, I have a docker image doing all that magic here" is to kind of skipping things. For a very good reason too. Still, for a curious mind, a logical next step (at some point) would be "ok now I have tested on a VM, how can I run this (or any smaller OS) on something real?"]
Thanks for this very interesting session, which was even more giving by having the source code downloaded to watch in parallel!
Thank you for the great explanation! I have a CS background and work as a software engineer for many years but never had the chance to work on such a low level. I recently read "Operating Systems: Three Easy Pieces" (which is fantastic and can be read freely on the site of the authors) and xv6 was mentioned many times. However, not having the right background I had a hard time understanding the code when I tried to explore it later. This video hits the perfect balance for me of concepts which I know with a new content. I am very interested in seeing the next videos.
What a great video. I never expected to find a resource that covers such low-level systems code in such great detail.
This is the first video from this channel I'm watching. It hasn't been a minute, I just subscribed to the channel by hearing the topic.
Great video! I'm a user mode developer, but have always been interested on what's going on the other side of the curtain. This was really well presented and clearly explained. Onwards to part two...
Absolutely loved every minute of that. Thank you so much!
As a non programmer, I really enjoyed your explanation and level,of detail. Thanks
For a non-programmer to remain engaged with the material is a huge compliment! I hope it sparks some further curiosity about this world for you
My recommendation section blessed with this video ❤
It's very difficult to find such amazing detailed videos elsewhere. Please continue making them!
and it's even more surprising that YT recommend it. pls continue
totally agree!
@@Turjak_arthow so? It’s got 58k views in 12 days. Sure it’s not millions but how many of us do you think there are that are interested in watching someone review code. Not many I imagaine
@@CloudCoderChapI learn more about code review than reading any other documentation.Lately I feel ike YT is trying to keep us dumb with their recommendations...
@@Turjak_art I think it depends on what else you watch. Like if you watch one random video then it messes up your feed and you just see less educational stuff. I find if you click the three dots and not interested or don’t recommend then it helps. I always forget about the subscriptions list which if you curate then you will only see stuff you want.
Please keep doing this kind of content, you explain it in a very clever way!
What great stuff - im getting into coreboot and this is pure heaven. Thanks so much!!!
Great, awesome, fantastic, wonderful video! This content is necessary and should be easily available to the world to anyone interested in computers.
17:00 It's called the text section because it is the "text" of the program; as opposed to, the data on which the program operates.
Ooooh, looking forward to the rest of this series 👀
answering your question regarding how useful such sort of videos are: they are useful. At least from a perspective of a guy who is curious about the subject but does not know where to start. Thank you for your work.
This is amazing, thank you, please don't stop! Most people do
No plans to stop!
I am a bit of a nerd that has always been fascinated with this type of low-level stuff ... despite that it difficult to convey detailed information like this, so I was expecting something a bit more dry and difficult to understand. However, I found myself really fascinated. I really liked how you opened up the topic step by step. "We are looking at xv6, xv6 is ..... this is how you get xv6 .... this is how you run xv6 ... this is what the project files look like ... this is how to find the start of the program ... " so by the time you got to the details of the topic, I felt very well grounded in where I was. So then it was a real pleasure following along, imagining myself the lowly CPU waking up to run my first instruction at 0x800000 (or whatever it was). So yes, very good video!
Wacthed from 0:00 to the last second. It is all interesting. Thank you! You make just the right amount of explaining. The need for this kinda content is really big
"We stand on the shoulders of giants."
This video is one of them. 👍
RUclips algorithm win - you've earned yourself another subscriber!
Excellent presentation! I wish there were enough hours in a day for me to watch to all channels I'm interested in.
Loved these videos, these are rare content. Keep continuing the good work❤
Wow, that's what i would call a great first video of a new series. I think your explanations are perfect for people who have basic soft- and hardware knowledge. Will definitely continue watching this series even tho i will never do systems/kernel programming. Thank you for doing this!
One of the best videos I could've hoped for. I'm super excited for this series, please keep it up!
Man thanks for creating these kinds of videos, I am really digging low level stuff nowadays, even though I do not understand much xD. There is just so much to learn
Keep at it!
Such a great explanation for all of us laymen trying to get into the weeds, thanks!
This is a great introduction to exploring unfamiliar code and especially a very informative look at the bootstrapping of an OS! If I had to make one suggestion, I would say, in my experience, getting code working in a debugger and actually watching registers and single stepping through the code helps me understand it a lot better. The process for that might be a bit harder since this is an OS and not some user space program. But I would love to see a visualization of what the registers and hardware threads are all doing while the code is running. Either way, a great first video and I'm look forward to the rest of the series :)
Totally agree. I actually have the debugger setup in this project, able to debug on the individual cores. I'll definitely involve it in future installments.
that's one of the great advantages of running under an emulator! you can connect a normal/software debugger up to the emulator and it mostly just works like debugging "some user space program"
This video gave me material for at least 6 months of study. Thank you very much.
One of the most valuable contents on RUclips! I am very happy to find this content! ❤🙏
What a time to be alive, such quality material for free!
now to actually understand it though lol
This was so fun to watch, makes me excited about computers again. Thank you
This comment made me genuinely happy 😊 do something cool with that new energy!
@@LowByteProductions Very hard when most days now are filled 90% to the brim with senior year highschool homework haha. I try to dedicate at least a day each weekend to having fun, trying not to lose the curiosity that got me to take these difficult courses in the first place. School is doing the opposite of what it should be for me :sob: Anyways learning C has been on my passion todo list for a while, this video is the kind of thing that really pushes me to finish the homework and get to it. Watched it on my way home :P Genuinely thank you! (first up is NixOS though :) )
fantastic. I finally understand how xv6 works deeply even though I did a lot of assignment with xv6 during my college days 🤣
- Pufff 🤯 - said my head after using sudo for - literaly - whole my adult life.
Just before end I thought it was about 15 minutes, not 50!
So breathtaking! 😶🌫
I’d love to see more of these!
Subscribed to this channel and liked the video a minute in! The RUclips gods blessed me with this recommendation!
This vid is fantastic. I have a decently-strong background in c.s. theory / programming languages, but I don't do embedded anything + haven't written ASM in ~25years ... This was comprehensible without being patronising -- and I 100% agree about the value of finding your way through a new codebase: Totally valuable, totally underrated skill ... that I'm going to be a bit more heavy-handed in 'encouraging' our devs to work on.
Given my strongly-typed brain, though, seeing things like casting `(uint64)main` makes me cringe -- there is no sane universe where `main` has anything like that type ... except, of course, that punning like this / doing not-even-remotely-safe shenanigans is what OS code is all about!
You earned my sub!
A really fantastic video, not only great technical theory but also great way of teaching it, thank you for creating it 👍
Fantastic! Would love to see more! Your teaching is also very clear
wohoo!! My journey to low level coding. Thanks.
This channel is a hidden gem. Keep up the good work!
All time, All time, All stuff , All videos inside this channel are amazing 😊.
thank you. this kind of video is really helpful. this really gives an answer to our curious questions which we always had but never able to find any detailed answers maybe due to lack of access to resources. Your video has really helped me in understanding the concept at low level, and you have really explained in a detailed and orgainsed flow with clear explaination. thank you
this is so so so good videos and explanation, i love this.
Thank you very much! Tried so many guides, but they aren't even close as good as yours
Too Interesting Please continue the series😊
What do I think... amazing and very intuitive explanation which is the most important aspect here, thank you.
great video, wish the civilian internet had been this robust when i was growing up
Thanks so very much for creating this content. It's exactly what I have been looking for. Your presentation of the topic is informative and interesting. Love It!
Wow, I loved it! Incredibly clear and detailed without being boring ! Only one suggestion: for the next videos could you increase the resolution to like QHD or 4K? That would be amazing :)
This is absolutely amazing! Thank you! I missed out on building an operating system in college. You made it seem so easy here. And now I have a good reason to use Docker.
As an aspiring Linux Kernel Developer, I really loved this video and I'm really looking forward to the next one!
Absolutely fantastic video! I look forward to watching more content from this channel. Thanks!
First time here and I love it!
An absolutely fantastic video man. I hope you continue this series! As someone who studied ECE but does EE as a living now, this is so insightful
Yes, Most excellent video. I shall watch more of them. Cheers..
17:10 the “text section” is so named because this is where the instructions of the program live; it’s meant to be read-only. It’s also sometimes called the code segment. This has its own segment to distinguish it from the “data section” where statically compiled or pre-initialized data for the program lives, such as string constants. The data section may further be divided into read-only data and read-write data. Using different segments for each purpose allows the kernel to place them in protected areas of memory so that buggy or rogue code doesn’t try to write data to an instruction block or execute instructions from a data block.
This video is awesome so many things explained in a simple and coherent way. Really hard to ask for everything you don't know and easy to miss one simple jet important piece if you explain it to someone.
High quality content, great to see it here. Enjoyed watching and learning. Big thank you for the efforts that went into this!
Fascinating, deeply deeply fascinating, interested for the continuation, keep up the amazing work 👍🏻
This is very very nice, especially from a wholesale operating system understanding
Really good video! You explained everything that I didn't know and kept the pace of the video. Looking forward to the next one.
Super interesting! thanks for this very detailed deep dive video series, this is very instructive, material like this is hard to find, keep them coming :).
Here before this channel gets millions of subs! Fantastic video
Love to see a rundow of coreboot. Bootstrapping before the OS..
Im currently doing a course about operation systems at my studys and so much of the theoretical stuff i learned make so much more sense now. its great!
This is superb. Keep making such videos and complete the series please.
My fingers ached me to code haha . Keep it up !
Your channel is great, thank you for sharing!