 All right, everyone. Hello. Hello, everybody. Welcome back to campus. I guess people have been to campus before. It's been like, what, two years since the pandemic? So welcome to hopefully your first semester back. That's somewhat normal. Maybe anywhere from kind of scary to amazing or anywhere in between like how you're feeling right now. So no matter how you're feeling, we'll get through this semester together somehow. So I am your instructor that you definitely have never seen before because I'm new. So I'm John. I prefer just John. You don't have to be super official with me. I guess I have a title professor now so you're allowed to call me that if you want to. It is weird before because I only just got that title and everyone called me that when I wasn't, which was kind of weird. But use whatever you're comfortable with. I advise against my last name because as you can see, it's kind of a disaster. Easiest way to pronounce it, you know, pretend like it's Elf sin, like Santa's little elf sin. And then if you ever have to spell it, God forbid, just throw a yo right after the e and it makes sense. So hopefully you don't have to spell it, but in the off chance you do, that's a good way to remember it. So I'm a new teaching stream professor. That means I get to 100% teach everyone. And you know, I chose this position. I like teaching. So hopefully we can develop a good course. A little bit about me. I've kind of always been interested in computers, understanding how things work, taking it apart, being like, Oh, someone tells me that that works. And that's not really a satisfying answer. I always kind of want to know why. So that's kind of why I'm here. Alright, that led me to grad school and all that kind of boring, long story. So little bit of housekeeping. I, since I'm new, they don't give me that much responsibility. Thank God. So Professor Ashen Gual is your course coordinator. So he sets, you know, the exams kind of the evaluation part of the course. And it's my job to make sure, you know, we do very well in the evaluation. So you'll find the overall course website there. So that's what he maintained. So he gets to override me and everything. So that one is true, no matter what I say. There's also a piazza there for course discussion. I think he added everyone already. Yeah, I see some nods. Okay, so that's where you'll find everything. I guess another bit of housekeeping notes for your practical, if you have a practical on Friday, you don't go there because the lab's going to be released tomorrow at like five ish. So there's not going to be any lab to talk about. So for you, lucky bunch that is that are all under my wing, you can check this website. So this is where I'll post all the course materials. So you don't have to log in or anything. Although people at this university seem to actually like Corkus. No, okay, do we like Corkus? Hands up if we like Corkus, like half ish. That's like most people. Okay. So at any other previous institution I was at, they hated whatever the system was. So this is kind of weird to me. But I can also post stuff on Corkus if you'd rather also have it there. Doesn't really matter to me, although my sections got deleted somehow. So maybe I can't post anything there. So I guess we'll figure that out. For lectures, right, we're back in person for the first time a long time, like normal in person. Hopefully it stays that way. So, you know, I encourage everyone to come to class, feel free to raise your hand, ask a question if anything's unclear, or if I'm just like saying something really, really stupid, or you want to have some input or have something interesting to say, you can also just kind of interrupt me as long as you're not like too rude about it and say like, Hey, idiot, go do that. So as long as you don't say that, we're probably good. Coming to class is pretty important for both you and me. That's why there's like two different sections. So I can actually see your reaction. Even if you don't like put your hand up and talk to me, I can see if you're kind of confused or not. If I say something really dumb and then revise it. So it's kind of nice and instant feedback for both yourself and me, right? So and also you get the advantage of I have like a 9am before this. So I already had my practice run out of the way. So you guys can, you know, take advantage. And I can also probably ask some questions that they asked as well, or just, you know, see what class has better questions. So another fun bit. So just in case, you know, you're not comfortable coming to class on whatever day, I guess you don't have the excuse that's too early. But maybe you ate like too much too big of a lunch and you have to go home and nap or something. So just in case, or you know, you feel sick or whatever. So I'll be streaming all the lectures on YouTube as well. And there'll be a vaude as soon as it's done, right? So you can review the material and all that after. So I encourage you to come, but you don't have to, right? There's good options if you don't. Yep. I should be the links are also in the slides, which like, yeah, yeah, there should be on the website. So offline. And these are all in the slides, you can click these links to you don't have to copy and paste them. So they'll all so everything will be on there. I guess this, yeah, last class gave like that a round of applause, like they really, really liked it. I guess you guys don't care that much. So whatever. Okay. Although maybe other people did that and no one cares anymore. It's not new. The camera angle is a bit weird because you're looking up at me. So I'll try and get my camera here so it doesn't look so terrible. And then yeah, another fun bit. So discussion will be interactive on Discord, at least for our sections. So that's the length. There's a QR code if people like QR codes to join that. I find it a lot easier. So there's always piazza for everyone. For my sections, I'll try a Discord and see how everyone likes it. It's generally pretty interactive. And you also can, you know, ask a question, pretty much get an answer pretty much immediately instead of just waiting around on piazza. And hopefully other students can help answer the question too. So that would be great. The office hours will mostly be out. Yeah, I see some people joining. Maybe if people actually like Discord, I can also take questions from there and maybe play around and post some stuff on there too. So my office hours are mostly by appointment, I can put a poll on the Discord to see when people are available since we're all in third year engineering, your schedules are kind of a disaster. So finding a time that works for everyone probably isn't going to work. But I'll try them hours aside, where I'll definitely be there. And then otherwise you can email me or drop by. And hopefully I'll be there. Otherwise I'll be kind of on the Discord pretty much all the time. If you want to contact me on there too. And yeah, office hours aren't going to be streamed and recorded, right? That's kind of just for you to ask questions. So yeah, I encourage you to go to that those also eventually my office might have an espresso machine. So even if you want to come, you know, have some free drinks, maybe I can bribe you to come to office hours if I'm really bored by coffee. It's not there now. So don't hold me to that. It's I have a disaster with moving stuff. But hopefully eventually. So that's soon TM. Okay, so how the evaluation works is that there's going to be quizzes instead of a midterm. And they'll be online. So there'll be three quizzes 10% each. First one is September 29. Someone already told me there's a bit of a conflict who's in 302. Jesus. Okay, a lot of your 302 that has like a midterm already on the 29th. That's six. So I will talk to the course coordinator, see if I can change that because yours is in a room. This is online at eight. So hopefully this can be moved since it seems to be a conflict for pretty much everyone. So yeah, the labs will be 30%. There's first one supposed to be released tomorrow. For every lab, you'll have two weeks. First one is just a review of C. Just to make sure you know the language. Hopefully everyone has background and see from like 105. And yeah, so this course is pretty much all in C. All operating system stuff is in C. So like it or hate it, this course is in C, because people program operating systems in C. So if you know C++, you can pretty much delete classes, delete templates, delete namespaces and everything nice. And then you have C. So hopefully it's not too bad. If you don't know pointers, I would brush up on pointers because you're going to be using them. But hopefully it makes sense because in addition to pointers in this course, you will be the one that manages what pointers point to. So it will be which sounds awful, but trust me, it's fun. Yeah, other labs are going to be threads, which most hands up if you've used threads before, I don't think anyone had like, okay, last time it was around 20%. There's like, eh, and some okay, so we will learn threads, which will be fun that this is the first operating systems is the first time you're introduced to threads because in addition to being introduced to threads and having to learn how you use them, you will also use learn how to implement them. So that will be fun. Yep. So C is they basically use C as portable assembly. So C is close enough to assembly that you can, you know, for example, the Linux kernel runs on like, you know, 25 different architectures, 30 different architectures, they write as much as they can and see, and some parts will use assembly, but they want to make it as small as possible. So you don't have to rewrite everything when there's a new architecture. Yep. I don't know what's on probably C 11. I assume it might be C 97 for all I know, but it should it should hopefully it shouldn't matter too much. And then after we learn threads, we're going to build on threads, have a web server. So the labs kind of build on each other lab three builds on lab two, which as it's presented right now, you don't know what any of this means. So that's kind of useless. But we'll use threads to implement a web server. And then after you implement your basic web server, you're going to implement a caching web server. And then after that, we'll learn all about or you'll have a lab on file systems. And then of course, 40% final because it's engineering. And I think you have to. Alright, so I think I'm contractually obligated to have this slide on academic honesty. So again, you've probably heard this a million times, you can study it together, but you can't do like labs or quizzes together. These labs are fairly open ended. So it'll be pretty obvious if you have the same solution. And like, don't do what my friends tried to do of like changing variable names. That doesn't work very well. And it also kind of just hurts you because all the operating system stuff, if you write any software whatsoever, there's no way around it, it has to interact with the operating system. And if you want to write good software, you kind of always have to understand the layer below it, which in this case is the operating system. So the more you know about offering systems, the better of a programmer you'll be, you'll be able to write better applications, and so on and so forth. So you actually kind of want to know this stuff. And it's actually interesting stuff, which is why I chose to teach it. And yeah, any cheating course not tolerated U of T has like a fun thing where they post up publicly. So you can see like the big suspension reports and see like people's degrees being taken away and stuff just to scare you. So if you want any like fun reading before on the weekend before class starts, you can read those. So yeah, they're posted publicly online, they're they're kind of frightening to see. But hey, they do it. And yeah, it's kind of weird because lawyers get involved sometimes and it's a gigantic mess. So please do not make a gigantic mess. So there's a few books you can use that complement the lectures you do not need to get the books. First one is modern operating systems, which is kind of a classic book. I believe you have to pay money for it. So I don't think anyone will get it. The operating system three easy pieces is freely available online in PDFs. So that one's pretty good. It has a few really corny jokes in it too. If you like programming humor. So that's a good one to complement. But of course, you don't need that need these. It's just if there's any kind of gaps in your knowledge, or maybe I'm explaining something rapidly, you can say, Hey, you know, I learned it better from this book and I'll adjust. And then if you don't know see, there's the C programming language book. But hopefully most people have experience and see if you don't have a lot of experience and see you can also just ask me and the first lab is intended to see kind of where you were at with C. So if you have no problem with the first lab, it should be okay. If you don't and yeah, if you have problem with the first lab, then you can always ask me all the labs are kind of optional. All the TAs are there to help you. You can do all the labs online if you want. You don't have to go there. So I'm told but given I said that the labs will probably be sparsely attended. So your TAs will probably be bored and more than willing to help you. So if you even want help with the lab or anything, I suggest you go to the labs and you know, give the TAs some something to do or at least hang out with them and keep them company while you do your labs. So again, like I said, I'm new here. So you can please provide some feedback, right? Hopefully, I don't really want to wait till the end of the semester to get some feedback and adjust. If something sucks, just say it sucks. If something's working well, say it's working well, and I will try and do that more right. And just caveat. I'm new here. So don't completely destroy me. Give me a so yeah, hopefully it works out all right. But feel free to email me drop drop drop by my office, which I guess I didn't have on the slides is BA 5110. I guess I'll post it on my website since I don't have it there. But yeah, just let me know. I'm open to suggestions. And you know, first suggestions to try and move the first quiz. So you guys aren't, you know, in pain for the first midterm. Yep. Oh, yeah, so I think labs are you have two weeks for every lab. And I think they're released on Friday and then do on Friday. Yeah. Yeah. So they'll be submitted through get just on the ECF machine or one Linux machine. So all the instruction should be on there they're setting up the lab. So I'm told they'll be done tomorrow at five. So first lab you can try and set up, see how the system works. It should be fairly straightforward. If it's not, we will do something about it. Okay, so into the actual introduction to the course and what we'll be learning. So this quote pretty much sums up, well, all of computer science. All problems in computer science can be solved by another layer of indirection, which is kind of shockingly true. I only learned this in fourth year. So hopefully if this is your first time seeing it, you learned it a year earlier than me. So hopefully that will be better. But it's yep. So indirection. So we'll see. So indirection is just instead of, you know, let's just see an example. So one example is instead of if you have an application, instead of talking directly to the hardware, instead of talking directly to the hardware, you would indirectly talk to something else. And that's something else talks to the hardware. So in this case, if you're an application, right, one thing you would do it have to do is if you're running on a computer, right, you're running on hardware, hardware changes over time, right? If I write my application, and it only runs on a specific piece of hardware, then later they come out with a new CPU, new video card, whatever. If I don't have an operating system, I have to rewrite my application to support the new hardware. So in order to avoid doing that, I write my application against a operating system, which is the layer of indirection there. So I don't talk to the hardware. I talk to the operating system. And then the operating system talks to the hardware. Then if there's new hardware released, all I have to do is update my operating system. It knows how to talk to the hardware. I don't have to rewrite my application. It saves me a lot of time. So that's basically the primary role of an operating system. It is just to manage and coordinate resources, which is all the hardware. So we know kind of some resources, right, we took the computer organization class, which you kind of built a CPU ish or used one, and had some assembly experience. So that's one thing we'll have to manage. Because in that, did you execute any code on that CPU? Yeah, and if you execute code on it, you probably just like loaded it directly to it, and it just kind of ran, right? Yeah, so that, that did not require an operating system because you just ran one application. Now we want to run lots of applications. So and also if we talk about operating systems, it's kind of weird to talk about what an operating system is because the definition is kind of fuzzy, some people trying to find it, but it kind of depends who you talk to. So like Ubuntu and Android are both considered most people would consider those different operating systems. But they both use the Linux kernel. And that's kind of the important piece of software that actually talks directly to the hardware. So both of them use the exact same important part of the operating system. But again, you still wouldn't call them the same operating system, right? Because applications are way different. On Linux, you have some GUI application or you have some CLI application where you just type into a terminal on Android, right? You have apps that you can fling the windows all around and do all that fun stuff. So for kind of those types of applications, you would consider things different operating systems, probably at like their display server. So the piece of software that actually controls how you see whatever you want to present with your application. So Linux and Android in that respect are different. Linux uses something called Wayland or x 11. If you're super old school, an Android uses something called surface flinger. And if you talk about Apple stuff, the difference between operating system gets even weirder. So like, what's the difference between iOS and iPad OS? Are they different operating systems when they use 99.9% of the same software? You probably would say they're the same operating system, but Apple would, you know, disagree with you and market it as different operating systems when really it's just the screen size is different. So kind of depends who you talk to. But at the core of it, no matter what operating system you have, their goal is to allow you to run more than one application. If you just had a single application, you can just run directly on the device like you did in that computer organization course, right? You just the CPU starts executing as a fixed address, you put your application that address, and whatever you power it on starts executing, you're good to go. So if you do embedded development, you can get away with that because typically the hardware is small, the hardware doesn't change, you just put whatever you want to run directly on the hardware, you don't need an operating system. But for kind of general use stuff, you definitely need an operating system because you want to use more than one application at a time. If you could only use, well, you could probably get away with just using a web browser now, but if you could only use a web browser, that would kind of suck. So, yeah, and then if you do that again, that's the same problem where is if the hardware change, which for computers, generally it changes quite often, you'd have to rewrite your application, and no one wants to do that, right? So instead of executing whatever program you want to run on your little chip, if we have a gigantic chip, instead of executing your program, it executes the operating system, which is really just a program that runs programs. So meta. So one of the first abstractions we'll see in this course is something called a process. Basically, a process is a virtual CPU. So to run your applications right, you needed the program can't like you set the CPU at the program counter and just kept on going away. So now if we have multiple applications, you can think of each application kind of have its own virtual processors that keeps track of different program counters. So your web browser is running at program counter, this address, you know, Libre offices running at program counter, this address. And then to switch between them, your operating system just kind of has to change the program counter over so another application can run. So when you write your program to you don't do this, but in your executable file, it will say, you know, where to start executing the program. And that is kind of another layer of indirection. So instead of your CPU having a fixed address that it starts, you can create a program and say and point the starting address to execute at wherever you want. So your compiler does this to you for you. So you don't have to do it yourself. But that's kind of one of the things your compiler is doing when it's creating an executable. So for keeping track of stuff, an operating system needs to do and therefore stuff you will be learning. An offering system would need to keep track of registers for each process and then switch between different processes. So even if you have just a single CPU, which no one has anymore, but even if you still have a single CPU, you can run multiple applications and it looks as if they're running at the same time, because you could run one application for a millisecond, run another one for a millisecond, they both make some progress that you can see. And it looks like they're both running at the same time. So that one millisecond was completely arbitrary. I just made it up. If you are implementing the operating system or learning about it, the amount of time you give to process kind of matters of how responsive it feels and all those fun engineering tradeoffs were kind of used to. And if you're the operating system, you get to decide when applications actually run and for how long. So you get to decide and the nice thing about that is you have the freedom, but you also have the freedom and have to decide. And if you make a wrong move, users will probably complain. So if you use your web browser and then your other applications all froze because you gave your web browser too much CPU time, you would probably be pretty upset and users are probably just going to blame you. So that's the CPU part of it. The next part of it is the memory part. So like with your little embedded, embedded processor that just, you know, only had one application on it. You just used all of the memory directly, right? You've had free reign. You manage all the memory. Well, that's not true with an operating system. Different applications have to share the memory. So if this was your whole address space there of all the memory in your computer, one kind of naive thing you could do is just kind of section it up ahead of time and say what applications can use what part of memory. So if that was like eight gigs of memory, you could say like, Hey, Firefox, you use four gigs. LibreOffice, you use two gigs operating system, you use two gigs. And if you've used web browsers before with as many tabs as I do, you know that four gigs probably isn't enough. So this already isn't going to work for that. So if you want to use, right, if you only give Firefox four gigs ahead of time and you can't change it as it's running, if you want to use six gigs, well, then you're kind of out of luck and you your Firefox runs out of memory. And this kind of gets even worse. If you want to run multiple applications, then you'd need to siphon off some area of memory for them, even if they aren't running, just to make sure that if it does run, they have space to actually operate it. So this kind of we can kind of mix this as a solution kind of off the bat, because this won't work. Yep. Yeah, sorry, I'm kind of using process and application as the same term. Yeah, application typically has some graphical component to it process can just be like a terminal application too. But you can use process and app pretty much interchangeably. Okay, so the solution to the memory problem is something called virtualization. It kind of full at the heart of it virtualization just fools something into thinking it has all the resources, which is good for them and bad for you. So you from Libre Office's point of view, you tell it that it has access to the entire memory space. And that kind of black part there is just memory reserved for the operating system that you can't really give to them, because you need kind of some room to operate. But you'd give it an entire view of the memory and say, Hey, you know, you can use all the memory you want. And then when Firefox boots up, it also has a view of the entire memory space and thinks it can access everything. So the kind of neat thing about this too is that Libre Office and Firefox can access what they both believe is the same bit of memory. So like Libre Office could access, you know, address 1000, Firefox could access address 1000. But Libre Office's address 1000 is actually like the physical address 2000. And Firefox's it could be its 1000 could be physical address 3000. And then the whole goal of managing all that is kind of now your responsibility. So it kind of abstracts away physical memory. So each process believes it has all the memory. And then different processes can have, you know, the same starting address, they can access the same bytes, but the operating system will actually manage what physical memory that maps to. So more goals of the operating system is it has to do that mapping. So it has to map virtual memory addresses to physical memory addresses. So kind of like that 1000 for both processes to whatever physical memory. They also have to keep track of memory usage. So, you know, allocating memory deallocating memory because you don't typically know how much memory your program is going to use up front. Right. Imagine your web browser it starts at like a few hundred megabytes and then grows to a few gigabytes. So, but if you're the operating system, you have to manage that you have to let that web browser grow to gigabytes. And you actually have to do something about it if you physically run out of memory. So if you are the one managing memory, if you run out, you have to do something about it. So anyone want to tell me what you might be able to do if you have run out of memory, if you are an operating system. Yep. Okay. Yep. That's definitely one. You can go to disk and start using the hard drive instead of memory. Yep. You can restart the entire system. That's solution always works in computers. Yep. Yeah. You can also just kill an application whatever is using the most memory and then every other application gets to survive. So in Linux, that's what does it has a process called the out of memory killer that will pick an application based off some criteria and just kill it and then free memory. But before that, if you don't want processes to get randomly killed, you can, what she said, you could just put some memory into disk and kind of fake it that way that we'll see later in the course as well. Oh, yep. Yes. Yeah. Yeah. So everyone that thought you know, and see your rays are all contiguous memory and everything, all the addresses are contiguous. That has been a lie since day one. So that is not true. So if you want to spoiler for the course, how it deals with memories and blocks of typically four kilobytes and the operating system can map them however it wants. So even in your program, if it looks like, you know, two memory addresses are within like 4,000 bytes and you think they're beside each other. They're beside each other in virtual addresses, but physically they will not be beside each other unless you are insanely lucky or, you know, if you just booted your computer, maybe. Yep. Since like the other things want to start off and on and say there was only one CPU to do this, how does it tell itself to turn on if it's not even on yet? That is a good point. So that's much later, but a fast explanation is you can, you used interrupts before, right? So it will just do an interrupt and then get control back and then it will decide. So that's one way it can decide what runs right and application runs. You can set an interrupt. So CPUs also have only or operating systems have access to instructions normal programs can't. So one of the things that it can do that you can't do is interrupt itself and wake itself back up and then take this CPU away from you. So this concept of virtualization is pretty powerful, right? It applies to processes or applications, which is essentially you can think of it's like a virtual CPU and then virtual memory. So sorry about the contiguous memory lie that's been a lie all along. But in this course we will discover the truths. So also your virtualization can also be extended to an entire machine. So instead of being only able to run one operating system on one machine, right? A physical machine can wear on multiple operating systems at once. So that's what all your cloud providers do. If anyone's used AWS or used anything on the cloud, they will typically just have one machine and it can run, you know, sometimes they overload them and they can just run hundreds and hundreds of servers and you are none the wiser. It just looks like a computer to you. So like that's also what I'll be doing in the lectures showing you examples. So like this machine is macOS but throughout the lectures when we go to play with it we'll be playing on Linux, which is what all your assignments will be into. So like this is actually a virtual machine. So this is Linux running under macOS. So I'm running two operating systems on the same machine. So the next part is kind of probably the if that wasn't confusing enough, this is probably the most challenging part is concurrency. So when multiple things are happening at the same time, right, either running multiple applications at once on a single CPU or running those multiple applications on multiple CPUs. You want applications doing multiple things at once, talking to each other and you have to kind of make sure everything happens safely. So you and you don't want applications isolated because if an application can't talk to another application, it's pretty much just wasting CPU and just making your machine hotter without doing anything useful. So you want applications and libraries to communicate with each other in some respect. Even the simplest program will communicate. So it's kind of a necessary thing for operating systems. So again, writing one application at a time is not a good experience. And completely isolated applications also aren't useful. So even the simplest application we can think of, which would probably be Hello World, does some communication. It communicates with the terminal. So it sends, you know, help the string Hello World to the terminal and then you get to see it. So you aren't responsible for, you know, writing the code that actually draws those pixels on the screen. You just communicate with the terminal and then it magically draws them for you, right? No one, at least at this point, you haven't you haven't drawn pixels on the screen. You've sent text so far. So I think in your graphics course, you'll be drawing pixels to the screen. But for now, right, we're just sending data and letting something else do that. So other things we have our operating system has to do is allow multiple executions at once and do that safely. And we will see kind of where the difficulties in that lie, because it's again, one of the most challenging things. So concurrency is kind of the hardest class of bugs to fix to. So some bugs in the Linux kernel have been around for seven years without anyone ever finding them. So we only have like four months and you also have to learn about them. So it's going to be hard. But hopefully, you know, we'll get the gist of it. You'll have to manage some abstractions for different kinds of inter process communication or IPC. And basically, that's just a fancy way of saying communicating between processes. So talking between two different applications. And then of course, if programs are talking to each other, there are some programs you probably don't want intercepting messages and all of that. So if you are the operating system, you also have to provide permission and kind of access controls and make sure that only things that are allowed to talk to each other are actually talking to each other. So the last part we need is persistence for our basic operating system. You want to be able to access data between boots. So on your little micro controller, if you didn't have, you know, any persistent memory any time you powered it down and then powered it back up, it would start from scratch and on a computer that would be any files you've modified or anything that you created would then suddenly be gone, which we don't want in general. So what you do is you create something called a file system that kind of lays out how you structure directories and files on the disk and actually write it to the hardware so it can persist next time you boot up your computer. So all your files are still there. So if you're the offering system, more jobs we have to do, right? Our list keeps on kind of growing and growing. You have to store and retrieve data and you also have to kind of ensure the integrity of that data. So persistent storage generally fails all the time without you knowing it. Your SSDs fail a lot, but they just don't let you know. So you're none the wiser and the offering system is kind of responsible for hiding it from you. If you have a, you know, mechanical disk that maybe some of you have never seen before, but they still exist that spins. Those fail a lot of the time and sometimes catastrophically and you can't get it back. But like little bits of that will fail all the time and kind of silently it will just fix everything for you. So luckily you've benefited from this because you've never noticed how bad they actually are. Okay, so one of the most important abstractions is something called a file descriptor, which who has used a file descriptor before? We got like two hands. All right. So this is another lie everyone's told you. So who's written to a file before? All right, who's printed Hello World before? And who's done both of these things on Linux? Or at least one of them? Okay. They've lied to you again, you've used a file descriptor. So a file descriptor is, you can think of it as just a number associated with your application where you can read bytes to or write bytes from. So for example, you could say, Hey, I want to read some bytes, write some just random data from file descriptor zero. And then I want to write some bytes out to file descriptor one, for example. So if you write Hello World, one thing that probably is happening based off what I'm saying is it's writing the string Hello World to some file descriptor, and then your operating system is making sure that that goes to your terminal. So you actually see all the characters that say Hello World on your screen. So again, if you're the operating system, you have to direct these bytes to whatever it represents. So it could go to your terminal, it could go, you know, to a file, it could even go to a network connection. But all these things, they kind of files your terminal, a network connection, another abstraction or layer of indirection is this file descriptor. So to the operating system or how the offerings presents them to you, it's just like, write some bytes to this number, whatever it represents, I'll figure it out, it's just something that you get bytes from and write bytes to. And then if you think of it that way, you really don't care what it represents. And you just let the operating system figure out the details. So when you actually get into kind of hacking on a kernel, which is just the important core part of the operating system that mostly that does all this management stuff, and also talks directly to the hardware. If you look at it at GitHub, and like if you break down what each bits of code are responsible for, you'll find that like a lot, a lot of it is just device drivers. So talking directly to the hardware. It's a pretty boring, thankless job. So you should thank everyone that works on it because it's basically reading manufacturer specifications. And we've all documented our software and hardware. And no, it's probably not perfect in the real world is also not perfect. But if you are writing the operating system, you have to deal with all the bugs and create workarounds to work around other people's bugs. Because if there's a bug in the hardware, they can't just release a software update and it gets fixed. That hardware just has some software flashed on to it that you can't change. And now you have to deal with it. So yikes. So just to give you some insight. So this is like an actual comment from Linux source. So there's two biases, which is like the first bit of code that runs when you turn on your machine before the operating system even starts. So you're going to so if you write a kernel, you have to interact with it. So there's these two kind of Dell computers that were made really close together. And this is kind of their joke that talks about how their technique for writing the code. So they said, oh, the developers that wrote this just wrote bias code. If it didn't compile, no problem, I'll write some more code, make sure it compiles. And then after compiles, see if it boots Windows 98, which is pretty old. And then if it doesn't boot Windows 98, go ahead, write some more code. And then as soon as it boots Windows 98, you don't care, you just ship it. So in that, if that's your development process, right, you're probably going to ship a lot of bugs. So this and then, you know, again, if you're the current developer, you're the one that has to deal with it. So comments like this are all around the kernel, right? If you want to search for expletives in the kernel source tree, you'll find a lot. They're mostly related to manufacturers writing something wrong. All right. And just to kind of dispel a lot of magic. So everyone can read hex, right? Kind of, okay. So hopefully everyone can read hex because sometimes if you get into the nitty gritty, kind of need to read some hex. So everything in computers, everything's just a number. It just depends how you interpret it. So no matter what you see on your computer, everything's just a number at the end of the day. Don't let anyone tell you different. But in this case, this sequence of numbers represents a program that prints Hello World. So each of those, you know, between each space, those are each a byte. So if you take 168 bytes in this case and put them out in that order, and then try and execute it on Linux, on an ARM machine, this will actually print Hello World, which is kind of amazing. So everyone's written Hello World in C before, right? Anyone know how big, how many characters were in that like Hello World file? Like ballpark, probably 100. So it seems kind of weird that an actual executable could be almost as big as the source file. But let's make sure I'm not lying to you first, I guess. So on my machine, see, so I have this 168 byte executable. It's the same thing that was on the slide. So it just looks like an executable. And if I execute it, if I didn't lie to you, it should get Hello World, which it does, which is pretty amazing, because if I look here and look at, oh, I guess this file's too long. So if I look at this file, right, this is a Hello World you'll typically see. So if I look at that and see how big that is, that is 100 bytes. So the whole executable, you know, with some other, the whole executable is actually only 68 bytes bigger than the entire source code, which is pretty magical. But it's not so let's go ahead and compile it Hello World to see just how big it is and kind of see how much bloat there is in C, because everyone told you sees pretty, you know, slim and flexible and all that. So let's see. So if I compile that, right, it's like 9048 bytes, which is significantly bigger than 168 several orders of magnitude. And if you execute them, right, it does the exact same thing. So weird. So if we go, oh, no, there's no question. Okay, so this right is not that many bytes. So you can actually understand Hello World as it relates to the operating system, what the operating system has to do and not that many bytes. And you actually like fully understand everything eventually. Yeah. No, so this is doing the exact same thing as a C program. Yeah, so this isn't doing anything special. It's doing the exact same thing as a C program, but instead of the 9000 bytes, it's 148. So yeah, so just to wrap up, there's three major concepts in this course, right? You'll learn the following and how they applied operating system, virtualization, concurrency, persistence, and how Hello World works. So with that, just remember, I'm pulling for you. We're all in this together.