Ok I will start. I'll start recording.
Okay, good afternoon. Let's go and get started.
I have no specific plans for today. My plan is to answer your questions.
So, basically, I need your questions and then I am happy to discuss them.
If we don't, no one has any questions and this will probably be rather short,
the split of the material pre post. I'm trying for roughly half half of but I'm still finishing up the exam so
I generally its way. It's about half half.
How much should you know about kernel code.
the concepts that are covered in the assignments, Alan.
How does Detroit seven question, Part D question the last question, work does let me find I don't know exactly like the question.
It's a tutorial seven Yeah, there's this part about like gain the PPI du ID and gid How does that work.
Well, it didn't destroy seven, let me find it real quick. Yeah, so what you're talking about here is right here is where we get the P ID.
So you're supposed to do something similar to this.
For the PP ID, and the G ID is that the card get your current get ID or somewhat current ID or something like that. Well, I'll show you how you you.
the way you found this was you search for this.
Okay, so it's used in.
Colonel sis dot c.
So, I actually had a reference to this here. So you see get task Id get thread Id get p ID. This is where I got it. So if you look through this file.
There's also right just right below it, get PP ID.
And so you get PP ID is.
That's the code for getting real you know that I get the effect get the group ID is this code right here.
Get the effect get the group ID is this code right here. So you literally just stick this in.
That's why you did.
But I'm not expecting you the quiet I expect you to edit kernel modules.
No, because you have two hours and Colonel programming is hard. So, I'm not, I mean, I did not ask you to write code in the midterm I'm not going to ask you to write code really on the final exam maybe like a line or two it's more about Do you understand
the concepts.
I explained the process of how the CPU gets the physical address in the virtual address. So this is not on the final exam, but the basic idea is the processor has a cache of physical addresses, as I as a cache of virtual addresses and physical address
mappings really the page to frame mappings. And it checks that cash that cash is called the translation look aside buffer. A TLB and if it's in the tob, then you've got it if it doesn't, if it's not in the TLB the virtual address has to be looked up in
a page table, which the kernel has for each process it's a data structure, and it tells us CPU, this is the page table that we currently using for user space.
And so the CPU walks.
You know walks that table and looks to see it if it comes up plan it's not there, then tells us. Hey, it's not defined what should I do, and then you can either load the data from disk or it can
kill the process or what
is it further interrupt from mouse and keyboards in the past, certainly in the past. I'd say also in the present.
I mean, how, how it happens is there's lots of complexity but basically there's still interrupt underneath it's just
policy care.
As you know, So the go to
interrupts got all these lovely interrupts
envy me is probably for my for my storage exit this is probably for this I think is pretty much for us be.
Yeah, Yeah, so there's,
there's a lot of interrupt
interrupts or interrupts are not user space concepts interrupts are kernel space concepts.
Close, I have not talked nearly as much about prophecies and threads so I can answer that question. But, you know, that is, that's not going to be in the final exam because this wasn't really covered in the, in the assignments.
But, which is similar to up from an API perspective, a new process.
A new processes easier create because you call fork. If you want to create a thread, you have to call clone until exactly what's going to be shared. It's much more complicated.
Would it be possible to cover all the extra tutorial questions I'd prefer not to cover the extra tutorial questions, because those aren't the focus of the final exam.
If this specific ones you're curious about I am but i mean but they're really there to help enrich your conceptual models so I had a request to kind of assignment for question three now that is useful, because again the know the final exam is based on
the assignments. Questions the reading so the ones f up structures declared and the ones module and reference in life, what does it do as any fields that aren't initialize so this is what this is referring to is.
This is a.
Go tutorial seven
oh sorry was that assignment three.
Question two. Okay.
Okay, so we'll talk about this, we do all this one's talking about the year is the ones is,
Is this talking about this so remember this is the thing that tells you how to do different operations for the special file so the mental model you should have is a special file is a file that has custom implementations of all the file API.
So, it has own definition of one read right, whatever. That's all there.
So,
so then BAM let's let's say also a question or question to when making a read call on Deaf ones ones read is called recon six we are grants. So,
the key idea here is, when you do this read.
We take for arguments. But if we look at the man page for.
So if you look at read it takes a file descriptor a buffer and account.
Here we get a struct file, and a character length and offsets the offset in the file struct are both represented in user space, just by the file descriptor.
Now, interesting thing if you go to Windows, they don't use file descriptors instead they use handles zo know to handle his
handle is a pointer to a pointer. So it's kind of like this.
You know, instead of having you the file descriptors essentially as an index into an array maintaining kernel space.
Whereas here, I don't whereas a Windows land you have a pointer to a pointer in kernel space.
You know, so, which then points to the object you want. So it's this whole indirect, you know, the key ideas you have a level of indirection so that use base doesn't have a direct reference so rather than just a simple integer, it's another pointer for
Windows. I'm
sure we know the implementation of their fault file API, where am I discussed that she is the teach you why in the final is teach you why in the assignments.
I think it is. So, Chuck.
What does set arch do.
So I put a handle is appointed to a point but so what is that arch do.
It's around.
It's wrong 25 questions.
Okay, it's about 50 points. So,
we'll tutorial 90 on the final IKEA tutorial nine is not directly on the final.
The concept of virtual and physical pages is, it's kind of in there it's important that they know but I'm not testing so much like too much except they're very high level.
Um,
I can discuss that arch.
But
I prefer not to answer questions that I mean that's basically set arch, that's, that's all set arch does is it lets you disable randomization.
I'm
creating a static library that's way beyond the scope of these basically you just have to.
We have not talked about creating static libraries, that's, yeah, that's way beyond the scope of this course I'm gonna have to look it up exactly how the linking thing so I'm not sure why you're asking that Julia.
What is this, how many questions to those are.
Oh, no in assignment one.
I didn't ask, how do you make a static library, how do you link against the static library that's a very different thing.
Which question here. Julie against clarify which question you're talking about we can talk about it specifically.
Yeah, Korea stack binary Yeah, you just use dash static
is a condition variable type of data structure.
Okay, so let me talk about this so how can you create a stock binary when that was light right don't use dash static is learning how the system calls is binary and here the solutions, you know.
You know
what to answer a different version of it.
Oh, right. that's 10.
Oh my answer is incomplete.
I will fix my answer for that, but basically it's a US dash static.
My answer was in completing that but I'm not going to yeah I will ask about that.
So the question is a condition variable at type of data structure text that says it was a queue.
So, the idea of a condition variable, there's different ways of implementing condition variables.
But you can think of. One way to think of is a QB and it's what, it's either has to be a distinct ordering of who changes the condition variable.
And so you have to basically, you have to keep track of whoever's waiting for changing the condition variable so implicit in any.
Some before or, you know, a symbol for a new text or something is a queue somewhere because you have to keep track of it but it can be implicit it can be explicit, the explicit ones allows you to go through and wake them up when necessary.
So,
but again, don't worry about the exact implementation of a condition variable story about how they how they're used.
So the point of this was, I'm really interested in that says version of the system called have AV system calls and it's binary.
But the way you do sign static is just, I mean this was in.
I was talking about tutorial to.
I would just talk about this.
Okay so step so like this is static Lee compile and optimize a program by doing dash static.
It's right there in tutorial to.
Would you mind explain the fine binary function 3000 shell.
What are you free uh what's, what do you want me to, what do you think it does I close can you get on voice chat.
I just say what or just say like. So what
can you hear me. Yep.
Okay, so this is in relation to the question on the tutorial i think it's question seven.
And what my basic understanding is when we type in a command, Andre doesn't show the mind defined binary is to find the binary so say if I type ls point of foreign binary is to find where the binary of letters look at it again.
But the, what I was confused about is how would I edit it to output every attempt. So, that's the part I was a little confused about, right, so what it's doing is, so you call you call find binary, you know so where's called find binary here so it's a
prompt. So in the prompt loop is where we call find binary here.
You know we parse the art, you know, we
buy as we say run program first and run program calls fine binder run program. This here, it calls find binary. It gives it the argument zeros basically the name of the problem we want to run the path which is list of all the directories and
buffer size, and basically this is, this is where we're going to put the result then farming.
So, so those are the article you understand those arguments right.
Yeah, yeah. Okay so that part's clear, so I'm just so we still Start Here we go into this and this part is just saying that it's not an app, it's not a this assessment either a relative or an absolute path, so we don't have to search.
So we just include it.
That's what this is doing now, we are now here we're doing the search for the path.
And now it's checking while we haven't gotten to the empty string. So maybe the no bite so basically we run out of paths remember that path is an array of strings that is no terminated.
Right. So when we get to we get to the end of the path, this is, this is what we got here. So we're looping through this, and
this is.
Now this one is copying up so I'm making sure this isn't know and we're then implementing it, you know. So, this is all kind of annoying you could even walk through all the point or, you know, thing but the main thing to know is that this is copying this
we have to build up this path fn with this, and then copy the name to it.
So this whole process is basically saying let's take the path that's their copy it, and then add on a slash, and then out on the binary.
You might be worth going through GDP and watching this, watching these variables work but that's that's what these lines are doing so and then at this point, the file name has the right fully qualified file name here, and then start so where do we tell
Okay. It's just before Scott.
Okay, so what did just output. What fn is the what started returning where it doesn't matter what y'all put it here will be return what stops returning because the point is you're wondering what's being chopped, what's not returned it says, Does it exist
or not. Right. Okay.
Yeah, that makes sense. So, but but just know this is just weird me basically in any of the language you use string copies or something or some equals and here we're just doing.
Yes, wonderful assembly like things.
I don't necessarily need to know what every single line does just have an idea of what these are doing you know what what the status of things are but don't mean we aren't talking about fine manipulation although you should be able to figure out what
this is doing.
All right.
Yeah, it's not it's not I don't expect you just look at this this is something I have to parse into, like, oh yeah they were getting like we're basically this newest we're setting, each character one by one.
And then we're implementing these things, right. Well, thank you.
No problem.
Oh sorry Oh sorry, so I just realized why this is so messy, is because the path is actually one, this is one in various environment variable it's one string, separated by colons.
They're not separate strings.
Okay, so this is.
So you have to basically read up until you get to a colon and that's a path.
Okay, so we're just iterating through the PATH environment variable. Exactly. and like extracting every single pack from there.
Exactly. Okay, okay, make sense.
And this is just saying, did we get to the straight, because remember the environment variables and little terminate that was wrong. This is talking about the specific path string being know terminated.
Okay so, um, is there a different stack and dynamically compiled versions.
Alan definitely there's a dirty stack and dynamic versions that's like tutorial to showing how many differences are the high level the differences is I dynamically linked binary has to load libraries into, into the process will have to map them into the
process, and a Stockley link binary doesn't doesn't have to use a direct link or it already has all the code necessary inside of the executable
here.
Yeah, my wife died.
Okay so
okay so so sometimes when we install modules, the logs the functions are stored in different files sometimes laser problem.
But what
Julian, I'm very confused by what you're saying.
With the logs, saying because the logs are in our log. The colonel messages come in D message, which is you know kind of what you get, but that's not written to a file that's just a perfect rank for Colonel buffer.
Ok, ok, Ok.
Other questions.
I so I don't understand why we have to mount a file says can you access it directly.
So, Sharon can you get on voice chat
on first hear me. Yeah.
Yeah. So like, I'm just wondering, because I know when we mount a file system. It's my understanding that you first created me directory. And then when you copy over the file system to that directory.
Well, you are copying it.
You're mounting it.
So remember when you're mounting a file system. What is a file system before a mount isn't just like a block of data. It's a block device, which means the data is, I mean, basically, It's a data structure stored in blocks.
When you mount which you want to access.
You want to access it as a file system so you want to be able to access coffee.
But the idea of mounting it is it mounting does two things. One is it allows you to look up data in the file system.
It also says, where that data is going to fit into the overall thousand because in Unix, there is only one file system hierarchy.
You know, there's not like, oh there's files on this device or files and not you know there's just one file system hierarchy. So you have to say when you want to access additional files from additional device, it has to fit into that file system hierarchy,
somewhere like on your standard unit standard Linux systems, you sticking a USB device, it's going to show up as a subdirectory of media.
You know, if you have a separate no partition for your home directory on a separate device that will be a file so maybe four slash home that will get them out on special for their instead of the files being in your where your file system so it's that
process of basically saying, I've got files on this device. Where does it fit it. When the system first boots up, it takes the boot device. And that goes on slash, and the other subsequent things have to go into sub directory, otherwise would cover up
everything that was in the file system.
Okay, that makes a bit more sense.
So thank you.
So, So,
Gordon are you. So,
Yes, this is your thing this often starts here every time you do read one's just confused about that. So remember, where is the offset coming from
read operation.
So, no more.
The. Look here.
Hold on one second, I just want to show you the code tutorial seven.
So remember we talked about you know any of these special devices.
remember any process can open deadlines.
Right.
Any process can open it. When that open happens, a new file struct is associated with the open file.
And I note in the kernel represents okay that's just the file into the file contents on disk, your disk is, you know, kind of pseudo disconnects.
But, although this is the this is the note of the device, you know, the special file, I know, but then once you open the file. When you open it, it creates a struct file to represent the open file.
And that's what has the offset in it, because that's the context of, like, when you read about, you know, 100 kilobyte file. If you just read one K, and then do another read and then do another one you get the first K, and then you get the next K and
then get the next one. The colonel remembers where you were that's a notion of a file pointer, representing where you are in the file you if you do a read every time you do a read your essay where you're reading in the fall, you say, give me the next,
you know, thousand 44 bytes, give you the next thousand 44 bytes.
know, thousand 44 bytes, give me the next thousand 44 bytes. But the colonel doesn't have that context at this level so that's why it has to be passed in with this offset that really why is it, you'd say, Why do I have to have the offset as a separate
thing why is it just instruct file, it's pulled out so you don't have to mess with changing the structure, and you have to all sorts of weird locking so instead less is having a separate thing that you can change separately.
I guess what I don't understand is that the for loop runs length Time. So why does it go infinitely in the terminal.
Ah, good question.
If you do an S trace.
What you will notice is that you do a read what's happening is you're doing a whole bunch of reads system calls.
Every read system call essentially what's happening is you send it, send it in a buffer a 4k or something.
It comes in here it fills up that 4k buffer.
but it never returns in the file.
So, you only this thing only returns a buffer amount of character length lead number of characters stored in buffs.
Each time but how many times do you call read.
Normally if you know something like cat or something is going to keep reading until it gets the end to file, when does one's read report and the file.
Never.
And the way it would report and the file is it would just return zero bytes.
If there's no more to read it goes like okay there's nothing more to read. So we're done.
It always has bytes. So all so programs that want to just keep reading until the end the file will read infinitely.
Okay so following that reasoning why in your solution did not return, like end of file, after 10,000.
I don't return to end to file a return zero.
And the file.
What really into file me so. So there's two separate things.
There's no the file, and there's no more bites.
Really here we're technically not saying the file is over. We're just saying there's no more bites to be read.
And most of the time like if you're doing some reading from a special device.
There's two ways you can interpret no more like a special device is a special file is like a character vice is really not in the file doesn't make much sense.
If you think about it, because.
is normally representing a device like, what does it mean to have in the file of characters, read from the keyboard.
No, it doesn't. So it just, but when we return zero it knows that okay well there's no more there, it could try again later but right now there's nothing more to happen, and programs like cat was just like, oh we read zero were to call that into file.
Okay, yeah, I found the code if they return zero, there's another return at the very end we return the, the count of yes how many things you read.
You get PhD read you see this. This one is more complicated than that right get used ever, or this telling the, the return I that get used by the next read or is it just no that's that's a local variable.
So it's gone after this function exits.
Look at carries between implications as the offset.
And that's why we do this offset equals i.
So I. If there's a nonzero number of really what's however many bytes we put into the buffer.
Yeah, and only represents that but because it, it gets deleted after to read it, it's pretty useless.
65th line, yet well no, this is, this is essential.
About 62 could be really a nonzero number.
No, no, this is how many bytes were read, so it should either be on or off. But if. So the reason why it's
so here this is not technically right for a more general thing it works here, because if it because we're always know we're starting at zero.
Normally you would add, I on the offset.
Like you read you read the first thousand, let's say a file has has, you know, eight K, you read it one day at a time. So you read the first thousand 24 bytes, then your initially your offset was zero.
And I guess up to 1023 and then you add that on.
So yeah, but then the next time you would want to read it'd be another thousand 224 bytes. And then you would add that field offset so now you're at two K, and then you would add it on against yet three k but every time you're only reading.
So, you know, 1024 bytes.
Okay, so I think that line 60 should be like, plus plus i times in a for loop to move the point.
I'm so because I think right now, offset and my 60 gets set like between one and 1024, let's say, but if the asset started at 1024, you really want to make it like 2048 yeah so this should be plus, equals, i plus equal sorry yeah, yeah.
Exactly.
And that's in fact if you look at the solutions for for assignment.
Three, that's where it has.
I'll show you what I'm talking about.
Tools assignment, three solutions.
Where's my code.
Oh sorry, I'm sorry, I'm
sorry, of course we have stuff solutions.
Here we go.
So here is the ones read, see the offset plus equals.
Here.
Yeah.
So I'm Max was so basically this is.
Yeah.
So questions here so
let's try see from there we try to get the context of the messages in the chat.
So, so the. So,
so do we. Are we all caught up Alejandra. Are you good.
Are you still confused.
Okay, that's a good question. Okay.
Yeah, so there's the offset comes from the struck file. Yes, exactly. It's duplicated in effect, because we have the offset here but this offset is also in here, but the idea is that we just update this and this will get put into here.
I think this might even be a pointer into the file offset.
But I'm not sure.
But you notice in this driver all we use this as basically to get access the file operations or whatever, but we otherwise don't use it too much.
Try I try to finish talking about things like so.
Do we have to know how efficient things like system calls and file structures of file structures, no efficient, we should know is that a system calls a much more expensive operation than a function call that you should know, because the system called
goes to the kernel and does all this work and stuff and and changes CPU contacts and things well function goal is just jump into another dress and returning.
How are you still good or if you're not thinking on voice chat and I can discuss.
Okay, good. Okay, great.
Okay, so I got another question about a compilation time is tackling binary is bigger than a dynamic one, but not sure in process. So, this is asking me about the midterm.
So, what that question the midterm is just to remind you all what we're talking about here.
Turn.
So, this question right here, which is bigger and process Mary cycling binary dynamically binary, why.
So let's just show you, I'll show you exactly what I'm talking about here. Let's go to.
Ok.
Ok so
let's start with Alice.
Okay, so I've got my printer.
So let's now compile this so.
Okay.
Okay, so that's directly linked here and then we're going to do the same thing here.
Okay, so now we've got these files here.
So as we know static is bigger than the dynamic one.
But
static is not die executable so it is self contained there's nothing else that has to be loaded at runtime. That's it. It's 846 k it's kind of piggy for a Hello World, but that's it.
But
this refers to these files.
Live.
La.
Copy Paste it so we've got this. Look at how big this file.
So.
So notice that Hello static is 827 k Hello dynamic is 16 K, but the lib C is 1.9 megabytes.
All of lives see this dynamic library is mapped into the process memory,
while only part of the library was included in the static fire so on disk. Hello dine only takes up 16 k it's small, but once you add a 22nd Hello static scenes is much bigger, but once you run it technically what's taken up in memory.
Hello, Diane will actually consume more virtual memory, because it's loading this entire thing here. Now, the difference is only the portion of this that's used his needs to be loaded and to share with all other programs that are using the same library.
So that's where the savings comes in.
But in terms of just how much code is in the processes address space. There's definitely much more because this entire file is there, rather than just the HR towards okay.
That's what I meant.
I yes go ahead Clarissa.
Can you hear me. Yep.
So then what I'm understanding is that it's better to statistically link things because even though it might just be bigger as compilation time as grace alone, because it's loading, what it needs, rather than everything.
No, no, no, so dynamic linking is in general better be as long as you have multiple programs using the same libraries.
Okay.
Because, like, Lipsey is used by everything on the system.
So, if I have 2020 processes using lip See, I will have 20 prophecies doing an M map of it into memory and they may be a different virtual addresses, but they will all be using the same physical addresses.
Right without fully loaded one copy of the library interact.
Okay.
And that's why when you run top or something. When you see shared. That's what it's talking about it saying that this memory is shared between more than one process.
Okay, so then it's just better to do it dynamically if multiple proxies are using that one loaded library. Yes, exactly.
So it makes like if you're doing your own application.
And you're doing.
And you've got the library of your own.
There's not much point in static like you.
Make it only makes sense if you have multiple binaries you're running. There'll be running at the same time, then you dynamically link it, and now the other beauty of static linking is you only include parts of the library that you you when you dynamic
a link your mapping in the entire thing now again it does all these tricks are only loads from this what's used, but there are actually security implications of having all that code in your address space, because there are Tiger gets into your database
could potentially use that code.
Okay.
Okay. Okay, that makes sense. Yes. Thank you. No problem. So, okay.
So I've got one.
Right.
So I a question here. Can you tell from the addresses were in memory something is stored in the stack are already in a heap or whatever.
You can't tell directly from any individual address there's conventions on where it is but you really have to look at it relative to everything else. Remember, stack, keep other things do you just labels that we placed help us understand things when the
the programs running it doesn't necessarily use that except will the loader.
Remember,
object.
The object of that show the sections of the binary.
They can kind of tell you which one you're in, but the address itself is kind of arbitrary and that can change so you can't just, you know, do that by experience and it would vary from system system.
So a question of what is.
So what is the CPE s been LD config into Make it fast. So, what is this why am I copying this stuff from LD config into Make it fast. The whole purpose of that is Mo, what is
what is LD config LD config is the dynamic link or configuration, I want to be able to configure the direct link or inside of there so I have to include its parts.
So all this stuff, referring to LD is all stuff for the dynamic linker, because if I don't include this I can't use any dynamically linked binaries.
The stifling buyers such as busy box work fine. But dynamically won't.
ry can sack calls not sure the libraries amongst each other, have because they are so here's the reason why is because they've been copied.
So like for example here.
Hello static.
I copy that into the binary.
So the eight and 27 k that is completely separate from those Lipsey. And if I made another binary I make a hello to or something that will have its own copy of all that code.
There is an automatic duplication when you run programs it. The only way the colonel knows that the duplicate things is that they're not duplicating all referring to the same file.
Here we made a copy of it so it doesn't know within the same.
So the only way the sharing happens is because you've actually done an M map of the same file.
And remember here every program that
we're doing this map of this half of the binary is my system at least a map, you know, load this library so they're all in mapping them into my into their address space.
So they're all loading the same file and so the chrome go oh you've all learned the same file only as you literally read only, I only keep one in memory.
You all can put it whatever adjusted you want your virtual just place and it's possibly weird places, but I'm only going to have more friends the same physical pages, it's all going to be the same place.
Awesome symbolic link similar to dynamic linking nothing to do with each other.
symbolic links and dynamic link here are completely separate concepts.
Remember a symbolic link is just a link is a file that refers to another file name.
That's all.
Other questions.
I'm question.
It's a continuation of the past two questions. But you just said that, with dynamic leading it loads at one. And then, when other binary see like okay, it's already here like I'm not going to load it again.
Correct.
Well, it's, it's just that the Colonel's lazy.
And basically it caches so the first time you load it is gonna have to load it from the disk whatever is needed.
If it's another program asked for the same file.
The colonel already has it in memory. Why would it go to disk.
And by memory do we mean like the processes addresses.
So remember there's, there's the each process has its own address space and and logically, those are private.
Right.
When you map a file, you're basically saying this range of addresses in my virtual address space correspond to the bytes of this file.
Right, right. So, if I access this address in the middle of that range, read from the file those corresponding bytes.
So, if two processes, em map, the same file.
The colonel and if they mapped them read only.
Then the colonel has an easy job, it just goes like oh you both want it okay maybe you want them. Maybe I knock them into different addresses, but I don't have to load it from this twice.
Okay, so the second procedure, I guess doesn't need to actually know if the first process has caught up loaded it or. In fact, in fact, it can't No, you can't know right, unless you do some timing things and maybe see how long it took to do it but in
general I can't figure it out.
Okay. Okay, so it's more like when it Ms. A second time entries that okay it's been loaded from.
It's been loaded once already.
parts that are accessed are basically storing our buffer and memory there when you, when you didn't you do top here, there's this buff cash thing.
This is basically saying, I've loaded some files and they're being, they were on disk there in memory now. And so whenever a process asset access a file it first checks to see Do I have it in right now.
If it's in RAM it'll just use that version.
Okay, cuz that's orders of magnitude faster.
And if it's not in RAM then it gets it from this and then it will keep it in a, you know, and buffer it in, you know, memory and because maybe someone else will want it, and it will only kick it out.
If it starts running out of memory.
Okay that was gonna be my next question like, how long would it keep it this is completely it's a dynamic thing it just depends on what else is happening on the system.
So you see on my system currently you'll see that how much memory, do I have I have total. I have like two gigs free.
This much use this much cash so I've got 16 gigs on my system. So basically I have two gigs of pages that aren't being used.
Okay, so nothing's getting kicked out.
Okay. And in general, it's always going to keep some amount free.
But the fact is I have this much in free and this much in buffer things. I'm not under memory pressure at all.
Okay, like my biggest process right here is one get is thinking at one gigabyte of memory I have 16 gigs.
Okay, so it's like my system is not stressed at all. If I had more things going on.
Then it would then have stopped making choices, and when it gets to when we go too far and there's too much that it needs to keep memories keep kicking things in and out, that's when your system we start slowing down.
Okay, I don't know if this might be out of the scope of this program but is it, is it a colonel that decides, like say we're really close to like people into the kernel that decide what gets kicked out and what day.
Yep.
Because it's the one managing all that.
So it's like, first in first out type of thing. That is, if you look in the textbook there's an entire chapter on page.
If you look in.
There we go.
So if you look here, what we are talking about here is this is swapping management swapping policies.
There's all talking about how you met you know basically decide what stays in memory. What does it. Of course this is all a much more simplified versus what the Linux kernel does.
Okay. But what rife, I've like there isn't a lot of OS courses focus on the algorithms that are used for this I specifically don't, because I think they're not interesting.
Compared to understand the problem, like you now seem to understand the problem.
And, and just think about it more you realize it's complicated what you'd want to do.
It's not simple and in fact it depends on the workload.
Right. So, yeah, that's, That's an entire discipline thing called IO scheduling.
Yeah, exactly. It's not in there. I mean, again this is beyond thing but part of this course is realizing, oh, there's something complicated over there, it has to deal with this problem
and managing that buffer this thing, that's complicated. That's part of the reason why live turtle is so big, complex.
Yeah, that answers my question. Thank you. No problem.
Is Ubuntu 2110 a better version of Ubuntu 2104, uh,
it's newer.
I plan to run 2110 after the semesters done I just haven't upgraded because I by the way if you're running a bunch of 21 or for you really should upgrade at 2110 because it's not long term support it, you'd want to wait till 2204 will be a long term support
release.
How often does a chrome need to scheduling operations, or what was a IO scheduling and CPU scheduling is anytime, it has to decide what runs next so every time you do a system call every time the process, you know returns back to you to space after it
has to do a scheduling decision. Every time an interrupted happens, ask them to a scheduling decision when it returned back to users based solely for IO events so decide when to Italy things scheduling is happening all the time.
Hello.
Here.
Come here.
Yes.
She brought a toy to the door.
Yes. you want me to play with you don't you.
Yes you do.
So,
so, Tommy we're about to Firefox's a snap by default.
I don't quite get the context for that. Oh, is that what is that and what is it really.
Ah,
I can see it though.
The reason why the reason why it's a snap.
The reason they're doing it as a snap is because they want,
One of the goals with a Linux distribution is they want to be able to update things and keep things stable and manage dependencies and stuff, which everything integrates and frequently updated programs like Firefox.
A world onto themselves and really are being updated purely by upstream and distributions. They don't even real Firefox doesn't really want distributions to mess with it.
So by using a snap essentially Firefox is saying, here's what you run and and a bunch of can go okay.
Boom. Here it is.
Yeah, okay.
Yeah, exactly. So, so this is, this is why we use, you know snaps and flat back, so all a snap is or a flat pack is exactly that true rooted environment, it's a container for it so it's literally having its own version of user space, all those libraries
and things. It's all self contained, and the other nice thing is they can put security policies on it to limit its access to the rest of the system.
I'm curious what security policy they would have on Firefox really I get the web browsers should be confined because their deal with all kinds of untrusted data, all the time.
So, yeah.
But I'm wondering how it's going to mess up my configuration.
Are there any main key points to remember.
I got questions, I mean there's, there's a lot of points, there's a lot of stuff we covered the semester.
The big my big advice is go through the assignments and really try to figure out what me it's not going to memorize me. Look at these.
Go back here I mean, if you go here, you go to these assignments, make sure you understand the solutions of the assignments and the younger really understand the solution assignments you really need to make sure you understand the corresponding parts
of the tutorials. So think of the assignments as a guidepost to like, okay, which parts of the tutorials I really pay attention to.
So go through the assignments one by one question go like what concept was I supposed to understand with this, you know, and go back. Um, but really for the first two assignments i'd more go by the midterm because that's what I chose to test you on and
so I'm my focus for the first half of the course is what was on the midterm.
But again, understanding this is, it's all interlocking so don't take these questions and I understood the question you're sending out this question fits into other stuff we've talked about.
If you only had time to read one chapter in the text, which one would I recommend probably the one on concurrency something one of the concurrency ones because those that's what I talked about the least.
But there isn't that much concurrency on the final so
okay so we got things I understood the two assignments and the solution right here last year was the midterm so if you did not understand the midterm but you understand the fruit you believe you've understood the first two assignments.
You didn't understand the first two assignments.
Probably the way you got to the first two assignments was by looking stuff up online.
So go back and try to figure out where the gap is
well questions for the midterm beyond the final, I will say a strong baby. Yes. Yes, what is it.
Did y'all hear her talking.
Yes, that shift. Yeah, she's like, she's complaining.
Yeah, she's bored. Here she is on the forehead.
Yes, Yes missing you.
Yes.
Oh you never saw how
I thought professors don't reuse questions on exams.
I'm not going to sit professors can do what they want.
So, question are we gonna write any code or is it mostly explained different concepts. Did you see.
Did you see me writing Did you write much code in the mid term.
Yes, hello, hello.
Should I go get tab right now. I can probably pick them up and probably bring them up here, and I say hi to y'all. Okay, I will go get, Go get one.
Here is.
This is tab.
Say hello to tab.
He was sleeping where he wasn't supposed to be he was on my bed.
He's not supposed to be in my bedroom.
No, he's not.
The know he's a little sleepy.
Okay.
He's a big guy. Okay.
I'll let you go.
Yeah.
Okay, so then the questions.
Now time for tell me I think he's going for.
Okay, there's anything else.
You're constantly on teams, if you've already sent me a message on teams I haven't replied to it yet.
If I haven't replied to it.
Because I'm I have other things I need to do before going through points things like finished making the final exam so
as a bonus questions in the final of, we'll see if I'm inspired.
How much assembly language should be knowing again look at the mid term.
There's no you really I don't expect you to have a much better. Emily Mauritian you understand whereas some language fits in. What can you do and see and why do you have to leave see to go to assembly and how that relates to operating systems.