WEBVTT 1 00:00:02.520 --> 00:00:09.990 William Cheng: So this is the second part of lecture 12 so we're talking about how does the Unix and Linux system access files. 2 00:00:10.679 --> 00:00:18.420 William Cheng: So the idea here is that we have a, you know, we have a file sitting on the desk. Here's the desk. There's a file sitting over here that and then 3 00:00:18.780 --> 00:00:23.730 William Cheng: who's accessing this file, right. So, so, you know, so it's not a person who's accessing the file. 4 00:00:24.180 --> 00:00:29.940 William Cheng: It's a running process that's that's accessing about right. So there's a process over here, try to access file. 5 00:00:30.390 --> 00:00:36.210 William Cheng: Guys are in order for us to determine whether this process has the right kind of privilege to access the file. 6 00:00:36.600 --> 00:00:47.280 William Cheng: The way this is done in the sixth edition UNIX is that every process come with two pieces of credentials. I guess they use a fancy terminology to say they called us security principles. 7 00:00:47.790 --> 00:01:01.530 William Cheng: So basically, every process come with two pieces of credential. One is, which user, the process represent. And then the second piece of credential is what group of users at the process or represent. Okay, so this is no as the user ID. 8 00:01:02.160 --> 00:01:05.310 William Cheng: For the process. And then the other one is called the group ID of the process. 9 00:01:05.700 --> 00:01:12.330 William Cheng: Okay. Similarly, for every file, though, for every file. They also said, you know what kind of user can access this file and also what kind of group. 10 00:01:12.750 --> 00:01:20.490 William Cheng: You know what kind of what group or user are allowed to access this file. So for every file. There's also a user ID and they're also group ID. 11 00:01:21.120 --> 00:01:32.160 William Cheng: Rather, the basic idea is that when the process tried to access the file. The first thing you want to do is to match up with the user ID in the group ID, if they're compatible, then the process is allowed to open this file. 12 00:01:32.880 --> 00:01:36.660 William Cheng: Okay, if it turns out that they are not compatible like that case access is tonight. 13 00:01:37.290 --> 00:01:43.590 William Cheng: Okay, so, so the first thing that you need to determine over here. So with the process tried to access a particular file you want to say that, you know, 14 00:01:43.920 --> 00:01:52.710 William Cheng: This pretty good process do you have the right kind of credential. Once you determine the process, whether it has the right kind of credential and then the next thing that you need to do is I need to determine 15 00:01:53.190 --> 00:02:01.020 William Cheng: What is the process was due to this file, right, what is this word is read only. So if the father is read only. And the process tried to write to avoid in that case access will still be tonight. 16 00:02:01.500 --> 00:02:06.810 William Cheng: OK, so again this is done in two steps. First we need to determine whether the process has the right credentials or not. 17 00:02:06.990 --> 00:02:12.780 William Cheng: And once we determine whether the President has right kind of a credential and then we want to see what the President want to do to to to this file. 18 00:02:13.140 --> 00:02:20.760 William Cheng: Okay, if he wants to open it for reading or writing open for other reasons. Then we decide whether to grant permissions or not. Okay. All right. 19 00:02:21.510 --> 00:02:28.260 William Cheng: So, so what kind of so. So again, you know. So those are three classes up your security principles will get this is basically a six issue next 20 00:02:28.680 --> 00:02:40.560 William Cheng: One is called the user right will mentioned before, there's something called the user ID. So the user ID. It's a 16 bit number on the system that represent who the user is. Okay, so, so I think, by default, I will you 21 00:02:41.970 --> 00:02:48.870 William Cheng: Will you create your user Ubuntu 16 point or for your user ID. I think it's either 500 or thousand. Right. So that will be the 22 00:02:49.380 --> 00:02:56.160 William Cheng: The user ID. So on unisys and there's a file costs, etc. Slash password PA SS WD 23 00:02:56.580 --> 00:03:04.830 William Cheng: If you look into that file and you look up your, your username or you're going to see your user ID that there's another file costs, etc. Slash group. 24 00:03:05.220 --> 00:03:11.520 William Cheng: If you open that file. So again on Ubuntu 16 partner for your username, your group name is exactly the same. So again, if you look at 25 00:03:11.730 --> 00:03:19.530 William Cheng: You look at this file. You will also find out you know which group you belong to. And also, what is the group IDs right user ID and a group ID. They're both 16 bit number 26 00:03:19.860 --> 00:03:26.370 William Cheng: Now, so, so when we take a look at a fall over here. So for example, if we do an ls minus L over here for file that 27 00:03:26.970 --> 00:03:35.010 William Cheng: So what it will do is it will show you what kind of access, you have for particular file right so let's take a look at this output over here. I don't think I've ever used LS minus out 28 00:03:35.580 --> 00:03:44.130 William Cheng: The first character over here tells you what kind of file, it is ok. So again, what kind of balls are there, there is a regular far there's a directory. There's a symbolic meaning there's a device. 29 00:03:44.880 --> 00:03:52.860 William Cheng: So I think on the Unix or Linux system. The first character over here. If it's a dash that mean that it's a regular file. If it's a D. That means as a directory 30 00:03:53.280 --> 00:04:00.240 William Cheng: If it's equal to or equal, that means that it's a device. And then if it's equal to. So that means is a symbolic link there. There are other choices. 31 00:04:00.780 --> 00:04:09.660 William Cheng: So I guess, you know, today's modern you know Linux is them. They're actually have many, many choices, more than those okay but the sixth edition Unix. So those are the symbols. 32 00:04:10.440 --> 00:04:18.690 William Cheng: And then comes the you know the the access rights for different you know for for for for different security principles that. So the way you read this is 33 00:04:18.960 --> 00:04:24.210 William Cheng: The security principle going to divide into into three groups. The first one is going to be the owner, the 34 00:04:24.840 --> 00:04:32.250 William Cheng: Sort of the, the, the first group is the owner of the file right so if you own this far. So it's how you actually own a file. If you are the 35 00:04:32.670 --> 00:04:42.030 William Cheng: If you have the user that created the vow, then you are the owner of the file. So the first three characters over here tells you that access right for the owner of the file. 36 00:04:42.510 --> 00:04:47.850 William Cheng: Guys are this guy is only three characters. So the way we sort of think about the three correct characters on our W ads. 37 00:04:48.150 --> 00:04:55.530 William Cheng: Are means that you have read access to the file W mean that you have write access to the file and X over here means that you have execute privilege to the file. 38 00:04:56.280 --> 00:05:07.650 William Cheng: Okay, so the first character. So if you see any dashes. That means that you don't have that access. So, so when you have all three access, you will see RE. RE W RW as well. You have none of the X at USC dash dash dash 39 00:05:08.400 --> 00:05:15.750 William Cheng: So in this example over here for the owner of the file, it has read access to realize that it does not have execute access to this file, then 40 00:05:16.020 --> 00:05:20.580 William Cheng: The next three characters over here are the privilege for the group, owner of this particular file. 41 00:05:20.760 --> 00:05:29.010 William Cheng: Right. So this guy is over here, the group owner, the group. The or any any member of the group can read this file, but it cannot modify this file, and it can execute as far as 42 00:05:29.430 --> 00:05:39.060 William Cheng: The last part over here is for anybody else on the system. Okay, so actually only have a bunch of 16.04 you can create many, many user account that you want. So in this case, every user will be on to a different group. 43 00:05:39.570 --> 00:05:46.920 William Cheng: So if you so if a process tried to access this file, and if this process, you know, it doesn't have the user credential and it doesn't have the group. 44 00:05:47.220 --> 00:05:54.930 William Cheng: credential. Well, in that case, this process is trying to access the fall as anybody else on the system. Right. So the third part over here is no as others. 45 00:05:55.380 --> 00:06:06.150 William Cheng: So, this one says for anybody else. That's not the owner. So sorry. The that that's not the, the, the, the creator creator, the file or they are not the 46 00:06:07.590 --> 00:06:15.720 William Cheng: You know, and also they are not the group, owner of the file one. In that case, you know any other user in the system, they can read the file, but they cannot write to the file and also they cannot execute 47 00:06:17.010 --> 00:06:31.170 William Cheng: Okay, so, so the access. So, so the different kind of access, as specified by these nine bids over here. Again, the first three because we don't to the user. And this next group is over you appeal to the group owner. And then the last one over here. Is anybody else on the system. 48 00:06:32.040 --> 00:06:42.660 William Cheng: Now, so, so, so, so, so, so we're here. So let's take a look at the definition of our W x over here. So for a file is actually pretty obvious, right. 49 00:06:43.380 --> 00:06:52.140 William Cheng: The, the, you know, the read permission allow you to open the file for reading. Okay. The right a permission over here, allow you to have the right permissions. 50 00:06:53.460 --> 00:06:57.870 William Cheng: For right into the file. So, so basically the right, the right permission allow you to modify the file. 51 00:06:58.170 --> 00:07:07.350 William Cheng: Yeah. What about the excellent over here, the SEC over here, that means that this file can be used as a first argument exact system called right because when you first had the first argument executive all 52 00:07:07.530 --> 00:07:15.210 William Cheng: That means that you want to run this far as a program. So if you have to execute this set over here, then that means that this is executable program and you will be able to run it. 53 00:07:15.720 --> 00:07:22.440 William Cheng: Again. So for example, if you look at your warm up wine and warm up to executable, you will see that the expert over here will be said because they are executable files. 54 00:07:23.190 --> 00:07:31.680 William Cheng: That. So, by the way you know this, I guess, over here, there are other the rest of the line over here. So let's continue to see what the rest of the line is when you do an ls minus out 55 00:07:32.160 --> 00:07:38.340 William Cheng: The next field over here. This is going to be the heart, Link, you know, the number of hardening that are pointing to this file. 56 00:07:38.970 --> 00:07:43.800 William Cheng: Okay, so in this example over here. This is a hardening over here is equal to one. So why is that why 57 00:07:44.610 --> 00:07:53.940 William Cheng: Well, because the directory you know that the directory found the content, the content found see over here that directory file will actually point to this file, so therefore there's something kind of one. Yeah. 58 00:07:54.660 --> 00:08:03.990 William Cheng: The next one over here is going to be the identifier for the owner of the file. So, this one says bill actually own this file. So again, if you look out there cetera slash password file you gonna find out what the 59 00:08:04.830 --> 00:08:09.780 William Cheng: User ideas, you know, something like that. Now the next one over here is going to be the group ownership. 60 00:08:10.080 --> 00:08:18.510 William Cheng: Right, so, so anybody who's, who's a member of the ATM group. So what is a DM and maybe the administrator or whatever you can create a group of any name that you want. 61 00:08:18.720 --> 00:08:28.050 William Cheng: That. So the group owner for the star is Adm. So any member of that group will be able to read from this file, but they will not be able to write to the value and not be able to execute as well. 62 00:08:28.470 --> 00:08:39.540 William Cheng: Yeah, the next one over here is the number of bytes in this file, right. So, this one says that this file is 593 bites long exactly right. So again, the fight off that go from zero all the way to 592 63 00:08:40.050 --> 00:08:47.850 William Cheng: You can access the file from from you in that pretty good range. Yeah. The next one over here is going to be the timestamp for the last time you modify this file. 64 00:08:48.450 --> 00:08:54.270 William Cheng: Okay, so over here is the December 17, you know, blah, blah, blah. Right, you should be familiar with that because you you know you 65 00:08:56.190 --> 00:09:02.400 William Cheng: You have called the function see time as we have seen something like that now. And the last thing I'll be here is this is going to be the component name. 66 00:09:02.820 --> 00:09:08.580 William Cheng: You know inside those. Yeah. So, so there's gonna be a component name inside the parent directory that alright 67 00:09:09.360 --> 00:09:13.530 William Cheng: So we've been executed a kind of an obvious meaning, but what do they mean for a directory 68 00:09:14.460 --> 00:09:23.550 William Cheng: Okay, so, so go forward directory, you know, what does that mean to to to to be the directory file, right. So again, a directory is a file when you try to read it you are reading the directory entries 69 00:09:23.820 --> 00:09:31.590 William Cheng: Right. So if you want to do a directory listing. You want to be able to read it. So this way for every component name, you can actually, you know, to a directory listing list all the component as 70 00:09:32.370 --> 00:09:36.450 William Cheng: Well, so you can open a direct revival readings. So this way you can you can actually find out 71 00:09:36.930 --> 00:09:44.100 William Cheng: You know, what are the file names, the one of the component names inside the directory file, then what about white privilege for the for directory 72 00:09:44.910 --> 00:09:50.700 William Cheng: Reza remember them whenever you think about the directory well for this class, right, you should think about a directory, isn't it. 73 00:09:51.390 --> 00:09:57.690 William Cheng: It's an array of the actual entry right and the left hand side over here is going to be a string right on the right hand side over here is going to be a number 74 00:09:57.990 --> 00:10:02.010 William Cheng: Of that. So in this case, if you want to modify this file. Why would you want to modify this file. 75 00:10:02.280 --> 00:10:10.080 William Cheng: Why we saw an example before. If you want to add a hard link to it. Are you going to add an entry is over here. Why this case you need right privilege to this directory file. 76 00:10:10.620 --> 00:10:15.900 William Cheng: Okay. And also, if you want to create a sub directory in a you need to write privilege. If you want to create a following. Is that a directory, you know, 77 00:10:16.290 --> 00:10:19.620 William Cheng: You need a ride privilege. How about if you want to rename the file. 78 00:10:20.280 --> 00:10:27.360 William Cheng: Okay, if you want to rename the file you basically have to modify the stream over here. So in that case, you also have to have right privilege to this to this particular directory file. 79 00:10:27.840 --> 00:10:36.030 William Cheng: Okay, so again, there's a lot of the example here. So for example, if you also want to delete a file. If you wanted to live and entries over here. Well, then again you need to be able to modify the directory file. 80 00:10:36.600 --> 00:10:45.450 William Cheng: Okay, so in that case for directory writing means, all that kind of things. OK. So again you modify a directory. Then finally, for execute. Can you execute directory 81 00:10:45.990 --> 00:10:53.130 William Cheng: Okay, so that doesn't make sense at all right so. So as it turns out, the expert over here for directory actually have a complete different meaning. 82 00:10:53.400 --> 00:10:58.140 William Cheng: Okay, the executable over here for directory, it means that you want to follow a pass through it. 83 00:10:58.710 --> 00:11:04.080 William Cheng: Okay, what does it mean to follow passed away. So that means that the fall that you actually trying to open is actually underneath us directory 84 00:11:04.590 --> 00:11:16.830 William Cheng: So in this case, what you want is that you want to pass through a privilege. Just want to use this directory to get to the file you try to open. Okay, so in that case you need to execute privilege for the directory otherwise access will be tonight, then 85 00:11:18.840 --> 00:11:25.770 William Cheng: So the algorithm that you use over here. So again, the, the way that you determine whether a process can access the file is that you have to follow the 86 00:11:26.040 --> 00:11:31.260 William Cheng: rule over here. I just wanted to read for checking that permission. So it's red because they're very important right 87 00:11:31.440 --> 00:11:41.400 William Cheng: For any Unix and Linux system to have to follow this rule. Okay, so the first thing you have to do that, you have to determine the smallest costs of principal security principle that the request to belong to 88 00:11:41.910 --> 00:11:52.440 William Cheng: Right. So to get the request is a process. They have three cost of that can belong to it. It can be the, the owner of the file or the group, owner of the file or everybody else in the system. So in this case, the owner of the file. There's only one 89 00:11:52.890 --> 00:11:54.060 William Cheng: Only one user belongs to that. 90 00:11:54.390 --> 00:12:02.220 William Cheng: So, so, therefore, that will be the smallest classes to the principal. So if it turns out it's not the owner of the file. Well, then we needs to go back and see if it's a group, owner of the file. 91 00:12:02.400 --> 00:12:09.210 William Cheng: If it's a group, owner of the file. What, then, then, then we found the smallest cause a principle that that process belong to, if it turns out it's not 92 00:12:09.480 --> 00:12:15.120 William Cheng: If it's not the owner. It's not the group owner, then in that case it falls within the third group, which means everybody else in the system. 93 00:12:15.960 --> 00:12:24.150 William Cheng: Okay, so the first thing the in order for you to determine access is that you need to determine, you know, which security principle that the the process belong to. Okay. And once you 94 00:12:24.420 --> 00:12:33.450 William Cheng: Once you have determine, you know which group would also. So if you go back to the previous slide over here you are only allowed to look at those three bits correspond to the corresponding that that group. 95 00:12:33.960 --> 00:12:40.980 William Cheng: Okay, which means that if you determine that you're accessing as far as the owner of the file you are only allowed to look at these three characters I hear 96 00:12:41.760 --> 00:12:47.700 William Cheng: That if it turns out you're not the owner and you're the group owner that you're only allowed to look at these three Beth, you're not allowed to look at anything else. 97 00:12:47.880 --> 00:12:55.110 William Cheng: If it turns out if you are others, then you're only allowed to have it to look at Las Vegas, right, so we're gonna run through a bunch of examples. So you see exactly how this works. Yeah. 98 00:12:55.950 --> 00:13:04.800 William Cheng: Alright, and the algorithm for you to determine whether you are the owner, the group owner simply like this, so I'll be here. I mean, since you know they're all you idea and they're all God. So we're going to add a letter in front of it. 99 00:13:05.070 --> 00:13:12.930 William Cheng: So inside every process though there are two pieces of credential. That's your process user ID or your process group ID for every file in 100 00:13:13.620 --> 00:13:23.130 William Cheng: For every file inside of our system, they're also the two pieces of information. One is the the the file user ID and also there's the file group ID. 101 00:13:23.610 --> 00:13:31.350 William Cheng: So the way you match these two things up as slim simply by running this elbow them. The first thing you need to do is to compare the process user ID. 102 00:13:32.250 --> 00:13:37.350 William Cheng: User ID, if they're exactly the same, then you are accessing the file as the owner of the file. 103 00:13:37.920 --> 00:13:48.780 William Cheng: Okay, otherwise over here is that if they're not equal to in this case. So what you will do is it will compare the Process Group ID against the group ID, if they are equal, then you are accessing this file as the group, owner of the file. 104 00:13:49.200 --> 00:13:57.030 William Cheng: Okay. Otherwise, if you don't have the same, then you know the request is other so you have to look at the last three beds inside us permission. That's right. 105 00:13:57.750 --> 00:14:09.420 William Cheng: Alright, so we're going to do a run through a bunch of examples to see exactly how this works. So remember, the first thing you need to do is decide who you are you the owner or the group owner or you everybody else and then you decide what kind of Access that you want. Yeah. 106 00:14:10.920 --> 00:14:19.860 William Cheng: Alright, so let's go through this example of us and we're going to run this command LS minus oh and then with a capital over here. So all will do the directory listing recursive Lee. 107 00:14:19.980 --> 00:14:28.470 William Cheng: Starting with the current working directory and work all the way down. So in this case, we're going to see the printer is going to look like this in the current directory or as a thought is the current directory 108 00:14:28.890 --> 00:14:38.010 William Cheng: Rise over here. So inside the dark directly over here, we have to entry. Both of them are directories. One of them is called a and the other one is called be right for a over here. 109 00:14:38.460 --> 00:14:47.790 William Cheng: These are the permission bits for the owner, the group owner and the other. And we can see that this is owned by Bill and this one at the group ownership is on by the administrator group. 110 00:14:48.180 --> 00:15:01.230 William Cheng: Okay, file be over here at the access rights over here is a little bit different. But again, is owned by Bill and the group ownership is by the administrator group, both of them that the you know the directory file sizes 1024 and this is the last time they were modified 111 00:15:02.970 --> 00:15:13.710 William Cheng: Inside a director over here, pass rush. Oh, here it is the current working directory. And this is a that's a sub directory. There's a subject called a right here. So inside a directory over here. There's one file. 112 00:15:13.980 --> 00:15:27.150 William Cheng: And this file is a regular file right the first character over here is Dash, that's a regular file and this one guy here is the access right for these three groups this belong to do and then belong to the ATM group the file size is fine it three and the file name is x 113 00:15:28.230 --> 00:15:35.640 William Cheng: Inside the be directory dot slash speed over here. There are two files. One is also called x and the other one's called why they are both regular files. 114 00:15:36.120 --> 00:15:47.280 William Cheng: The first of all over here on call x, it belongs to Bill and then the group ownership is Adm. The second fall over here. I should belong to Trina as it turns out, Trina and Bill. They both belong to the ATM group. 115 00:15:47.640 --> 00:15:50.160 William Cheng: Okay, but there are different users. So the second one over here. 116 00:15:50.670 --> 00:15:57.120 William Cheng: So it's kind of weird right instead of directory that's owned by Bill. There's actually a father owned by Trina okay we don't really care how you get there. 117 00:15:57.510 --> 00:16:05.820 William Cheng: Okay, we just know that this example inside the director on by do there's a file that's actually owned by Trina and Trina and then this the group ownership for this fog is also a idea. 118 00:16:06.870 --> 00:16:11.520 William Cheng: Alright, so we're going to sort of run a bunch of example here, we also going to introduce us to the user. The user 119 00:16:12.900 --> 00:16:14.640 William Cheng: So therefore, the third users, Andy. 120 00:16:15.810 --> 00:16:21.720 William Cheng: So Bill and Trina you don't to the ATM grew and Andi and Andi does, it does not belong to a group 121 00:16:22.860 --> 00:16:28.140 William Cheng: There. So now we're going to run a bunch of example to see whether you should grant access or deny access that 122 00:16:28.830 --> 00:16:42.030 William Cheng: All right, first example right here is that may and the list the content or directory. So first we need to determine who's Andy is any the owner is any the group owner or Andy's everybody else, right. So, therefore, you know, the director over here is a is right here. 123 00:16:42.360 --> 00:16:45.180 William Cheng: Right here. Right. So who is Andy is Andy, the owner 124 00:16:45.570 --> 00:16:49.470 William Cheng: What the owner over here is bill so Andy's not the owner is Andy, the group owner 125 00:16:49.620 --> 00:16:59.460 William Cheng: And he does not belong to the ATM grew so therefore NDS consider others. So now we're only are allowed to look at the last few bits. So therefore, in this case, we're going to focus on last group is over here. 126 00:16:59.670 --> 00:17:07.650 William Cheng: And then we ask the question, right. So we need to follow this rule over here. First we need to determine who Andy is and then we're going to only look at three best suited to determine whether 127 00:17:08.490 --> 00:17:15.750 William Cheng: The Andy, we should grant and the access or not. Yeah. So now we need to come back to the question of years at what does, and he wants to do with this directory 128 00:17:16.020 --> 00:17:23.130 William Cheng: And he wants to list the content of the directory so Eve and he wants to list the content of directory. What kind of access does Andy 129 00:17:23.610 --> 00:17:27.150 William Cheng: Andy require right and he's required to have read access to this. 130 00:17:27.390 --> 00:17:37.560 William Cheng: Directory. So over here, you look all these three buckets. The first part over here is real and you see a dash. So, therefore, access is denied you know for Andy. And we also know exactly where access is tonight. 131 00:17:38.070 --> 00:17:51.750 William Cheng: Okay, the access denied exactly this bit. Okay. So, therefore I'm going to draw the picture like this over here. I'm going to turn this bit over here to read to indicate that you know the answer is no because Andy's denied access exactly at this particular bit 132 00:17:52.830 --> 00:18:06.090 William Cheng: Yeah, all right. Second example over here, I'm Andy Reid, a slash X over here. So again, so what we need to do is that, you know, we need to verify adding the access, both at the directory level and also at the file level. Okay, so first 133 00:18:06.690 --> 00:18:14.040 William Cheng: And he needs to access directory, right, because when we perform having resolution. We're going to do a one component at a time. So first, we're at directory it over here. 134 00:18:14.430 --> 00:18:19.500 William Cheng: Who's Andy why we already seen that Andy is other so therefore we're all gonna look at the last week. This over here. 135 00:18:19.770 --> 00:18:29.700 William Cheng: What does Andy wants to do with this directory right not not not the file over here because we're only at the the directory level over here and he wants to do what to directly a 136 00:18:30.390 --> 00:18:36.660 William Cheng: Right. And he wants to follow a pastor because Andy wants to read from, you know, if I'm a slash x 137 00:18:37.200 --> 00:18:43.770 William Cheng: Okay, so in this case. And these only requesting pass through privilege to directory. A. So this guy is Andy nice the expert. 138 00:18:44.130 --> 00:18:49.980 William Cheng: Right, because he wants to execute that directory that. So, therefore, this guy's got all these numbers over here x over here is 139 00:18:50.580 --> 00:18:56.340 William Cheng: Actually going to be grounded. So now you are you are you allowed to proceed with your path name resolution. 140 00:18:57.210 --> 00:19:06.600 William Cheng: Okay, so, so, yeah, when you perform how thin resolution, you're gonna be a long file system have over here at every step over here, you have to verify that Andy has access. OK. And then all the way to the 141 00:19:07.230 --> 00:19:14.850 William Cheng: To the last component. So they will have to this one time. So again, it's a very, very long process. Will you try to perform path and resolution that 142 00:19:15.900 --> 00:19:21.990 William Cheng: So a so so Andy is granted access over here for directory. A because Andy only required pastoral privilege. 143 00:19:22.170 --> 00:19:32.610 William Cheng: To directory. So now we're in a slash acts as a child is right here. So again, we're inside directory over here we're looking at a component called x, right. So again, we need to ask a question, all over again. Who's Andy 144 00:19:33.540 --> 00:19:38.820 William Cheng: Okay, because because previously we try to figure out who Andy is what directory. A. Now we go into another 145 00:19:40.020 --> 00:19:49.860 William Cheng: Another level, we have to start all over again to ask who's Andy Right is any the owner and he's not the owner is any the group owner and is not the group owner. So therefore, we're going to only look at the last group is over here. 146 00:19:50.220 --> 00:19:59.640 William Cheng: Okay, and what does, and he wants to do with this file, right. This one is x over here and he wants to read from this file, so therefore the rebid is set over here. So therefore access is granted. 147 00:20:00.240 --> 00:20:09.060 William Cheng: OK, so now we also know exactly how access is granted the access granted to Andy, both because this period of years and ads and also this spin up here is that our 148 00:20:09.480 --> 00:20:23.940 William Cheng: Guys over here. I'm going to answer the question with yes I'm going to use green over here to indicate that these are the exact to places where Andy is granted access and Eddie, Eddie. Nice nice nice nice to be granted access at the director level and also at the file level that 149 00:20:25.020 --> 00:20:34.140 William Cheng: Third example over here may Trina list the content of directory be directly be is right here who is Trina is Trina the owner know Trina is not the owner is Tina, the group owner 150 00:20:34.320 --> 00:20:41.700 William Cheng: Trina belong to the ATM group. So therefore, Trina is the group owner. So we are only allowed to look at the middle stupids over here. The middle school is over here. 151 00:20:41.940 --> 00:20:48.480 William Cheng: Was it turns out all kinds of access denied over here. So, can train our list the condo directory be or the answer will be no 152 00:20:48.930 --> 00:20:59.520 William Cheng: Okay, so also we know exactly where the access to the access denied. What is Trina want to do with the directory. Be right Trina wants to list the content of the directory v. So, therefore, Trina need read access to to 153 00:20:59.850 --> 00:21:08.520 William Cheng: To the directory. So, therefore, this person over here is where Trina got denied access. Okay, so. So for this example, the answer is. Oh, sorry. 154 00:21:09.900 --> 00:21:11.730 William Cheng: I think I missed the the bits over here. 155 00:21:12.630 --> 00:21:21.990 William Cheng: Alright so let me clean this up over here. I think I missed. Oh, yeah. So, so again, be you know also Trina is the group owner. So I think I want the wrong group is over here, it should be these three days over here. 156 00:21:22.530 --> 00:21:27.270 William Cheng: So, d is the first character and then our W, X is next three character and then our dash dash 157 00:21:27.480 --> 00:21:34.830 William Cheng: Is the next three character Trina wants to list the kind of directory be so therefore Trina needs to have read access to this directory. So we're right here. 158 00:21:35.010 --> 00:21:41.880 William Cheng: So therefore, the answer is yes, and we turn this character all over here because this is the only bit that you need to grant access to Trina 159 00:21:42.360 --> 00:21:48.090 William Cheng: That, for example over here may Trina modify the slash why so again be is right here. 160 00:21:48.810 --> 00:21:56.430 William Cheng: Trina is not the owner Trina is the group owners and this is a girl, we need to look at these three bullets over here. What is true. Now I want to do with directory be 161 00:21:56.760 --> 00:22:06.270 William Cheng: Trina wants to follow a password because Trina tried to reach. Why so Trina is requesting pass through privilege. This the this directory. You can see that this bit over here. 162 00:22:06.630 --> 00:22:13.950 William Cheng: This bit over here is what this meant over here is that, so therefore Trina is not allowed to pass through the directory. Yeah. So in this case, 163 00:22:14.460 --> 00:22:20.310 William Cheng: The this particular file okay access denied over here and we know exactly where this access is tonight. 164 00:22:20.910 --> 00:22:28.830 William Cheng: Okay, so even though, if you look at the bigger picture over here besides right. Besides, why is this fall over here. This was owned by Trina Trina has rewrite 165 00:22:29.190 --> 00:22:37.800 William Cheng: Rewrite privilege to this file but Trina was denied access as a directory level. So even though Trina has all the access below that directory level, we never got there. 166 00:22:38.400 --> 00:22:44.100 William Cheng: Okay, because what we're doing. Catherine resolution. We're going to do a one directly at a time, you know, by, by falling directory sub directories. 167 00:22:44.370 --> 00:22:55.710 William Cheng: Directory. So if you have Tina access anywhere in the higher level, the director hierarchy, you will never get to the bottom part. Okay. So, therefore, again, it's very important to understand exactly where Trina was denied access, then 168 00:22:57.240 --> 00:23:05.070 William Cheng: The fifth example. I'm a bill modified besides s who is bill for directory be bill is the owner. So we're going to look at the first three bids over here. 169 00:23:05.250 --> 00:23:17.100 William Cheng: What is Bill wants to do with directory P Bill wants to follow a pasta. So does Bill have the access rights, the answer will be yes. So therefore, we are in directory be over here. Second one, I'm going to come to this farm, who is bill. 170 00:23:17.730 --> 00:23:24.000 William Cheng: Guys are gonna do is the owner and that builds builds the order over here. So, therefore, we only need to look at the first week is over here. 171 00:23:24.630 --> 00:23:33.810 William Cheng: That. So in this case, Bill wants to modify, you know, fall X over here. So in this case we need the right there right here. So this guy, since we're missing the right there. Access is denied for Bill 172 00:23:34.290 --> 00:23:46.800 William Cheng: Okay, so the answer is no. Over here, I'm going to show you over here at the director level access. Granted, so therefore it's green API. Exactly. Because of this bear but in the fall over here. This one is read over here. And that's what Bill, you know, 173 00:23:47.340 --> 00:23:56.880 William Cheng: The access was denied. Well, it's kind of weird over here because over the years that if, you know, we try to open this is the group owner was another group owner can actually modify this particular file. 174 00:23:57.150 --> 00:24:03.390 William Cheng: Okay, only the owner can I modify this file again how, you know, how do we actually get into this day. We don't want to care. 175 00:24:03.780 --> 00:24:14.100 William Cheng: About it, because when we try to access the file. We simply need to follow the rule right determine who it is and then look at those three beds in the 3% denied access then then the then you're done. 176 00:24:14.970 --> 00:24:26.100 William Cheng: I mean, some people might argue to say you know so bill is also builds IS THE OWNER OF five x over here, but it was also the group owner. Right, so therefore we should backtrack once we look at these three files or three bids over here. 177 00:24:26.760 --> 00:24:38.370 William Cheng: Bill fail when this goes. We're going to backtrack because Bill is also the group owner, so therefore we should look at the middle, middle group is also be here. And in this case, you know, the robot over here to say, so we have to give access to bill. 178 00:24:38.910 --> 00:24:48.630 William Cheng: Okay, that will be wrong. So if a system that does that then it won't be a Linux, isn't it won't be a UNIX system. Okay. Because UNIX system illnesses and follow the follow the rules that 179 00:24:49.320 --> 00:24:54.060 William Cheng: Are so excited. I know backtracking when you try to determine whether you have access or not. Okay. 180 00:24:54.660 --> 00:25:01.530 William Cheng: The last example over here. I'm a bill repeat slash why. So these right here who is built those the owner Bill wants to follow a pastor 181 00:25:01.980 --> 00:25:13.440 William Cheng: And now you're in the directory be over here for fall. Why are we here. What is, you know, who is bill is below the owner bill is not the owner is though the group, owner of those the group owner. So therefore, we're only looking a lot to look at these three minutes over here. 182 00:25:13.740 --> 00:25:24.870 William Cheng: Now, so what has been wanting to do with this file Bill wants to read this fall, we need to our bit over here. So accesses denies or again, people will say, oh, maybe you can backtrack to other again, there's no backtracking that's allowed 183 00:25:25.170 --> 00:25:40.740 William Cheng: Okay, so therefore, for this case over here. We're going to see that bill was granted access as a director level up, but it was denied access over here, you know, with the, you know, at, at the file level. OK. So again, this is how you determine access, you know, by following the rebel. Yeah. 184 00:25:44.610 --> 00:25:54.360 William Cheng: So by knowing the previous case over here, Bill, can access this file, right. So as it turns out that in the Unix and Linux system. If you are the owner of the file, you can actually modify the permissions for that file. 185 00:25:54.810 --> 00:26:00.390 William Cheng: Okay, so even though this one is read only by you. But, but you can actually change it. We're gonna see how to change that. Pretty soon that 186 00:26:01.740 --> 00:26:04.230 William Cheng: Alright, so when you try to open the file. 187 00:26:05.370 --> 00:26:11.880 William Cheng: If you do a man on open races man open, right, you're going to see that the man page will open actually look like the following. 188 00:26:12.120 --> 00:26:16.260 William Cheng: There are actually two ways to open the file. The first argument over here is going to be a file system path. 189 00:26:16.470 --> 00:26:23.520 William Cheng: The second one over here is how you want to open the file. We don't need rewrite or something like that. There's actually an optional third argument over here. 190 00:26:24.420 --> 00:26:29.400 William Cheng: OK. So the third argument over here is called know so in this case is is talking about a protection mode. 191 00:26:29.820 --> 00:26:41.670 William Cheng: Guys on the unit lettuces, and actually they use very confusing terminology, sometimes they will use them with the word mo to describe the protection mode, the file, sometimes they will use the MO to describe what kind of, you know, what kind of fire this 192 00:26:42.090 --> 00:26:50.910 William Cheng: Or guys and when they talk about the mode of the file you need to, you know, be, be very clear whether they are talking about production, though, or you know whether the size of regular file or directory follows this symbolically 193 00:26:51.390 --> 00:27:00.600 William Cheng: Etc. Now, so in this case the mode over here is talking about the protection mode, right. So normally, you don't need the third argument when you try to open up off of medium for writing. You don't need a production mouth. 194 00:27:00.750 --> 00:27:10.920 William Cheng: Right, because you know what the example that we saw before. We don't really specify a production mode. Yeah. But when you try to create a file Weiner case you have to specify what you create a ball, what should be the production mode. 195 00:27:11.790 --> 00:27:17.730 William Cheng: That. So the third argument over here is optional, only if you specify all created over here in the second argument. 196 00:27:18.450 --> 00:27:24.690 William Cheng: Okay, so the second argument over here is a bunch of these symbols of your order together as you can say, you know, one of these things, or the other one or the other way. 197 00:27:25.080 --> 00:27:33.150 William Cheng: So if one of them contain all create that means that you want to create a new file so so Robin is that, you know, I guess in Colonel to you have to implement the open system call 198 00:27:33.420 --> 00:27:36.060 William Cheng: That. So if the options over here include create 199 00:27:36.210 --> 00:27:42.720 William Cheng: The first thing you want to make sure is that this file doesn't exist. That's how you are allowed to create a file, right, because the file already exists. You're not allowed to create it. Right. 200 00:27:42.840 --> 00:27:51.600 William Cheng: So once you create a file over here, you have to use a third argument to set the protection most said those nine beds inside the file over here so you can specify who has access you 201 00:27:52.680 --> 00:27:59.430 William Cheng: can access the, the owner has what kind of access the group owner has what kind of access, everybody else. Everybody else as well. 202 00:28:00.420 --> 00:28:08.130 William Cheng: So there's a bunch of the other options will be allegedly pretty complicated. There are tons of different options. You can have. So again, if you do if you look at the man pages of open 203 00:28:08.310 --> 00:28:19.680 William Cheng: You're going to see that there's a bunch of stuff you can actually or together. OK. So again, a reminder for your corner to assignment for your cool Colonel to examine all you have to do is to pass all the tests in the grading guidelines of Colonel to 204 00:28:20.280 --> 00:28:28.590 William Cheng: Okay, so don't overdo it. Don't try to implement everything because because that will take you forever. Okay, only implement a minimal set. So, you will pass all the tests that 205 00:28:29.880 --> 00:28:32.730 William Cheng: Alright, so another go over all these things right. 206 00:28:33.690 --> 00:28:40.410 William Cheng: Okay so well you said a change of protection law. So if you are the owner of the file, you can actually change the production model. So again, if you want to change the production mode and if 207 00:28:41.310 --> 00:28:48.840 William Cheng: You didn't need to make a you need to make the system called change mode, the first argument is going to be the fastest and Pat. And the second one over here is going to be a mode. 208 00:28:49.110 --> 00:28:59.670 William Cheng: So again, the mode over here. You can order a bunch of bits together. So over here, this a bunch of symbol, you can use to order them together. The other way to do it is to actually specify this one using a nine bit binary 209 00:29:01.830 --> 00:29:14.280 William Cheng: Binary integer. So for example, if you want to specify our W like the example I was happy for our w dash, dash, dash, dash, dash, dash, right. So what is this number in binary. Well, so again, 210 00:29:15.030 --> 00:29:19.380 William Cheng: You know, when there's a letter that means that we're granting access. So, therefore, is going to be a one. 211 00:29:19.890 --> 00:29:30.630 William Cheng: When there's no access and that would be a zero. So if you convert this to a binary number. What do you get you get 110100000 I'm going to write this one in phase two by 212 00:29:31.050 --> 00:29:39.420 William Cheng: Two over here. Okay, so this one is the binary number over here. So in this case, we can actually, you know what, we tried to call change mode over here at the more we get will be this way. 213 00:29:39.930 --> 00:29:49.500 William Cheng: But there's no way for you to specify binary number you know in seat. Right. So, therefore, you could either convert them into a hex number by the hex number here hex number every four bit is a 214 00:29:50.160 --> 00:29:51.750 William Cheng: Letter. So for been over here. 215 00:29:51.990 --> 00:30:06.900 William Cheng: For a bit over here. So, this will be equal to zero, x 1800 that's okay, here's a one. Right. And here's a 1010 that's a and Apollo app is zero. So 010 it's exactly the same as this pattern exactly the same as as binary data. Yeah. 216 00:30:07.110 --> 00:30:09.120 William Cheng: There's another way to do is to use the optimal number 217 00:30:09.900 --> 00:30:20.640 William Cheng: Okay, number every three days, give you our number. So this case, what is the first three letter over here 110 that's equal to six. Right. And then the next one over here is 100 that's a four. And the last one over here equals zero. 218 00:30:21.000 --> 00:30:30.720 William Cheng: So if you guys 640 over here. How can you tell when it's a decimal number auto number. There's no way for you to tell. So therefore, the way that we do the auto number is to add a leading zero here. 219 00:30:32.010 --> 00:30:43.290 William Cheng: Okay, so in C and c++ if you have a leading zero that means the number over here is the octo number. So every digital will go from zero to seven. And if you want to increase by one more than you have to do a carrier and it goes back to zero. 220 00:30:43.680 --> 00:30:46.590 William Cheng: Okay out the number only go from zero to seven. Right, so also 221 00:30:47.160 --> 00:30:52.410 William Cheng: The actual numbers actually pretty convenient. Right. You can actually look at this a try to read the outer number every three bit of years there's 222 00:30:52.620 --> 00:31:04.380 William Cheng: Going to be auto number, right. So this one is going to be a RW, you don't know access. So this will be a six, right, followed by the next three bit over here 100 that will be a four. And the last one over to be 0000 223 00:31:05.520 --> 00:31:16.740 William Cheng: Okay so typical. Is it, you know, it's very common when you try to call it CH M. O. D. The last argument you will give it an octo number or you can construct them by ordering a bunch of these patterns patterns here together. 224 00:31:17.220 --> 00:31:24.570 William Cheng: Okay, so it's up to you, they're both equal that similarly when you make the open system call it all created over here is one of the options over here. 225 00:31:24.780 --> 00:31:31.260 William Cheng: The mode over here. You can also specify either using the auto number or you can actually help or bunch of these patterns together. 226 00:31:31.740 --> 00:31:36.360 William Cheng: Or if you want to use hexadecimal that's also fine but hexadecimal. The it's really difficult. 227 00:31:36.720 --> 00:31:48.300 William Cheng: To look at where you are thinking about protection mode right because protection mode you're grouping three bits together and every three bit can express a number from zero to seven. So therefore, using the auto number is the most natural way to go. Yeah. 228 00:31:50.610 --> 00:31:57.960 William Cheng: Alright, so, so when you try to create a file right can you can use open and then the flag over heating, cooling co create and you have a mode over here. 229 00:31:58.320 --> 00:32:07.320 William Cheng: There's also another system Coco create right so we're going to create the again the first argument over here is going to be a file system pathway and then a second argument, of course, is gonna be the protection, though. 230 00:32:07.620 --> 00:32:13.470 William Cheng: Okay. Over here says, Open is prefer because you want to learn the minimum the minimum set of system call 231 00:32:13.950 --> 00:32:19.020 William Cheng: You know, for, you know, for, for, for you to write your program. You don't really want to use as many different kind of system called as possible. 232 00:32:19.770 --> 00:32:31.080 William Cheng: Okay. So, therefore, if you know that open is equivalent to to to create if you include the OH career flag over here, then you just that they just have to know how to use open guys typically nobody wants to use create that 233 00:32:32.670 --> 00:32:35.070 William Cheng: The man over here. When you specify this mode over here. 234 00:32:36.060 --> 00:32:42.300 William Cheng: You know when you try to create a fall over here. As it turns out, for UNIX and the the the Linux system over here. 235 00:32:42.510 --> 00:32:50.670 William Cheng: They actually go through a one, you know, one more levels of complication over here, the actual permission of the file is not going to be the last argument over here. 236 00:32:51.210 --> 00:33:03.090 William Cheng: Okay, so like the example that I made. Over here. Over here I you know I use. I use 00640 to specify our w dash, dash, dash, dash, dash, dash 237 00:33:04.170 --> 00:33:16.500 William Cheng: Okay. So in this case, you know, this particular pattern over here that get generated for the fall. As it turns out, it's going to be the last argument when you make all the system call logical, we ended with the inverse of the user mask. 238 00:33:17.220 --> 00:33:28.470 William Cheng: Why it sounds really complicated as what is the user mask over here. So on Linux or Unix and you can type the user if you're in a lot of Asia, you type the command you mask and he will show you what the user mask is 239 00:33:29.250 --> 00:33:34.800 William Cheng: That. So I think on one through 16.04 I will type this you're going to see the number is 077 240 00:33:35.100 --> 00:33:46.860 William Cheng: But that's okay. This is going to be auto number. So what do we do, is that he will say that, you know, so what we're going to do is that when you try to create a fall. I'm going to deny access for all the group owner and also for everybody else in the system. 241 00:33:47.970 --> 00:33:53.250 William Cheng: Right. So the way this is done is that we're going to take this pill powder over here and the Twitter over here the Twitter symbol over here. 242 00:33:53.400 --> 00:34:10.800 William Cheng: Is going to be a bit flip right zero become one one becomes zero. So what is 077 right. This one will be zero in binary will be 000111111 right so this will be a face to number of a binary number. So if you flip all the bills, you're going to get 111000000 243 00:34:11.220 --> 00:34:18.570 William Cheng: Okay. And then over here is the logical an operation. So you're going to do a bitwise and with whatever the argument that you pass to open 244 00:34:19.050 --> 00:34:31.920 William Cheng: Guys, the last argument over here is going to be 640026 406-401-1010 0000 so if you perform a logical logical an operation right here. What would you get 245 00:34:32.790 --> 00:34:45.180 William Cheng: Okay, so where you end fits together if both of them are one that you get one, otherwise you're going to get a zero right so if you add these two patterns here together, you're going to end up with a 110000000 246 00:34:46.410 --> 00:34:52.260 William Cheng: Okay, so what happens over here is that when you try to create this file you want to say that the owner of the file is going to have six 247 00:34:52.380 --> 00:34:57.480 William Cheng: Which is rewrite rewrite access over here we're going to end up with the owner of the file have the rewrites is over here. 248 00:34:57.660 --> 00:35:07.230 William Cheng: For everybody else they're all denied over here because the user mass over here is equal to seven. Seven. So therefore you deny all the group owner access and also all the other access to this file. 249 00:35:07.740 --> 00:35:12.810 William Cheng: Okay, so we're going to end up with, you know, basically 0600 as the final mode. 250 00:35:13.620 --> 00:35:24.300 William Cheng: Yeah, so the reason this is done over here is that, so this way you know if you're using a compiler. So let's say that you know the program that you write, actually, the compiler. Compiler at the end has to generate executable file. 251 00:35:24.810 --> 00:35:31.980 William Cheng: Okay, so therefore, in this case, how do you actually create a file. If you have to sort of ask the user to say hey you know what kind of a production mode you want. That's a little messy. 252 00:35:32.520 --> 00:35:39.000 William Cheng: Okay. So Robert, is that the compiler will always the last argument when you try to open the file, they will always use 0777 253 00:35:39.570 --> 00:35:47.370 William Cheng: Okay, so this way, the user can actually specify user mass ratchet example that we saw before. If you use a message 077 so in this case we saw before. 254 00:35:47.640 --> 00:36:08.940 William Cheng: The, the big three or the mass is going to be in binary is gonna be 111000000 if you use 777 is going to be 111111111 if you logically and them together, where you going to get, you're going to get 111000000 so if you're using a massive 077 the file that you create it will have access 255 00:36:10.620 --> 00:36:14.100 William Cheng: Is going to have the access rest specified by this matter. 256 00:36:14.280 --> 00:36:24.600 William Cheng: Which means that you you the owner can have read a privilege and right privilege and also the extra your privilege, because you try to compile a file. So in the end, this one, this part will be executable. 257 00:36:24.840 --> 00:36:32.880 William Cheng: That we're all the other numbers over here, equal to zero. So, therefore, the group owner will have no access this file and everybody else in the system will be here will have no access as well. 258 00:36:33.420 --> 00:36:41.520 William Cheng: Okay, so by specifying the user master be seven. Seven years spent, you know, this is exactly what you want. Right. You want to see. Not all access to the group owner and also to 259 00:36:42.420 --> 00:36:50.670 William Cheng: To everybody else. Everybody else everybody else inside the system, but for compiler when the compiler, try to generate a file, they don't want the file to be executable. So therefore, 260 00:36:51.120 --> 00:37:03.600 William Cheng: The note over here will be will be 666 right so again will be 110110110 right so if you end up with the the flip of the user mass which is 111000000 261 00:37:03.810 --> 00:37:12.270 William Cheng: If you add them together. What are you going to get, you're going to get 110 and one is gonna be a zero right everything else. Again, they're all zero, right. So in this case, when you're using your editor. 262 00:37:12.450 --> 00:37:19.260 William Cheng: The fall will get created will allow you to read and write to the file, but for everybody has this is that they all have zero privilege. 263 00:37:19.710 --> 00:37:27.150 William Cheng: Okay. And yeah, that's exactly what you want. So again, when you look at your system. Every time you finish using the editor. If you look at your file, you're going to see that you're going 264 00:37:27.420 --> 00:37:33.690 William Cheng: To see our w dash an dash, dash, dash, dash, dash, dash, if you do an ls myself that 265 00:37:34.440 --> 00:37:45.870 William Cheng: Right, so we can also play with other kind of user mask over here. So what is the user model here 027 so again 027 in binary is going to be 000010111 266 00:37:46.080 --> 00:38:06.270 William Cheng: If you do a backflip. You're going to get 11101000 right so if you end up with, you know, 066666 right will be 110110110, what would you get right. So again, you know, if both of them are why you go Why so you got 110100 and 000 267 00:38:07.230 --> 00:38:12.780 William Cheng: Okay, so again, the way you interpret this is that, you know, so when it's a to seven over here. So in this case, when I create a file. 268 00:38:12.900 --> 00:38:22.410 William Cheng: I wanted to deny access for the group owner, only the right bit. Right. So therefore, the group owner can I write to this file, so. So in the end, in the beginning of the year I started out with 666 269 00:38:22.800 --> 00:38:34.020 William Cheng: Okay, so I'm denying the group owner for writing to this. So this bit over here is going to turn to a zero and also for all the other user of the system. I'm going to deny all their access. So therefore, the last three beers over here. Alternative zero 270 00:38:35.310 --> 00:38:43.500 William Cheng: Well, that's okay. You can do the math over here or you can sort of think about logically, what kind of operate. You don't have to ask you want to deny you don't end up with the exactly the same bit pattern. 271 00:38:44.100 --> 00:38:49.890 William Cheng: Yeah. So anyways, uh, you need to, you know, give maybe practices to understand exactly how this works. 272 00:38:53.370 --> 00:39:05.520 William Cheng: Alright, so actually, we're not too far away from the midterm exam. The midterm is that about a week, a little less than two weeks away. So the midterm exams gonna cover everything from the beginning of the semester to the last slide. 273 00:39:06.780 --> 00:39:15.270 William Cheng: Okay, but it only cover chapter one through four. So we're going to so so the middle coverage is everything that will cover so far, except for chapter five. 274 00:39:15.750 --> 00:39:22.350 William Cheng: Guys, there's going to be chapters one through four only chapter five material our exclusive on them into chapter five will be including the final exam. 275 00:39:23.190 --> 00:39:26.550 William Cheng: The final exam coverage will not overlap the midterm exam. 276 00:39:27.180 --> 00:39:36.720 William Cheng: Coverage, but I always get get get a question to say, you know, are you guarantee that the final exam, you're not going to ask anything about the the minimum cover the material to cover by the midterm. 277 00:39:37.200 --> 00:39:46.680 William Cheng: While the second part of the semester is actually based on the first part of semester. So therefore, there's really very difficult to actually figure out a question that only asked about the second hop. It has nothing to do with the first half. 278 00:39:47.400 --> 00:39:56.790 William Cheng: Okay, so therefore the right thing will do the right thing to say is that is that, you know, for the final exam will focus on Chapter five plus everything else beyond this life. 279 00:39:57.750 --> 00:40:07.320 William Cheng: Okay, the mid term is Chapter one through four chapter one through four intersect with everything we talked about the final exam, starting with this slide over here, you know, plus a plus chapter five. 280 00:40:08.880 --> 00:40:19.620 William Cheng: Or so again we're focusing on this part, I'm not guarantee you that will not ask any question that's related to the midterm and a final exam. Alright, so again, why have a good reason to say something like that. Yeah. 281 00:40:21.270 --> 00:40:27.090 William Cheng: All right. So I guess the next thing that we're gonna do is, I'm going to briefly go to sort of talk about the midterm exam. Yeah. 282 00:40:31.980 --> 00:40:39.930 William Cheng: Alright, I guess this is probably a good time to break. So I'm gonna take a break right now. And then when we come back over here. We're going to talk about that. What, what the heck. 283 00:40:40.710 --> 00:40:44.760 William Cheng: I'll talk about the midterm exam. Okay, my sins. I still have a few minutes, I'll be here. 284 00:40:45.660 --> 00:40:53.820 William Cheng: So the midterm exam over here. So we'll talk about some of the important rules over here. So make sure, again, I'm a stickler two rules and make sure you follow all these things right. 285 00:40:54.720 --> 00:41:00.660 William Cheng: Right. The first thing I want is automation is that some people think that the MIT. The, the exams are is a learning experience. 286 00:41:01.140 --> 00:41:11.580 William Cheng: Okay, so that's where all the exam for this class is not a learning, it's a learning experience. What does it just is it just like God. Just like TOEFL exam. It's an assessment. 287 00:41:12.180 --> 00:41:22.530 William Cheng: Okay, because I'm, I, I'm required to give you a gray. So that's why you are getting exactly if I am not, you know, if I'm not required to give you a grant. It's just learning experience rather than, you know, then 288 00:41:23.580 --> 00:41:31.950 William Cheng: Then, then in that case it can be a pure learning experience right there. The exam. It just is it just assessment because I'm required to give you a fair. Great. 289 00:41:32.700 --> 00:41:45.450 William Cheng: Okay. So, therefore I'm going to create everybody exactly the same way. So in the air. I'm going to end. Okay, great. Yeah. So. So in this case, again, again, you know, the exam is about this class. The exam is not about your general operating system knowledge. 290 00:41:46.500 --> 00:41:49.410 William Cheng: Okay, so the exam is only about CS world. Right. It's about the exam. 291 00:41:49.770 --> 00:41:54.450 William Cheng: Of other material you have learned in this class. So you are being tested for the material. 292 00:41:54.630 --> 00:42:02.670 William Cheng: That you have learned in this class. It's not about testing your general operating system knowledge. Right. So that's why it was so ask people not to, you know, look at the Internet too much. 293 00:42:03.030 --> 00:42:08.880 William Cheng: Because you're gonna get confused guy because India when I give you the exact they're completely based on the material in this class. 294 00:42:09.060 --> 00:42:16.470 William Cheng: So what are the material you're learning in this class, right, there's the lecture slide. There's a textbook or your programming as a man, those are the sources of your exam. 295 00:42:17.100 --> 00:42:24.840 William Cheng: Okay, so you are being tested, you know, on the knowledge about CSP or two plus you're a grad student. Now you're being tested on critical thinking. 296 00:42:25.380 --> 00:42:36.240 William Cheng: Okay. Some people don't really know exactly what that may rise over here. We're going to try to explain exactly what critical thinking. Nice. Okay, so. So basically when you try to look at exact problem over here. You need to think very carefully and write down your answer. 297 00:42:37.410 --> 00:42:42.120 William Cheng: Okay. So, don't you know also so so again you need to, you know, you need to think very hard. 298 00:42:42.360 --> 00:42:48.030 William Cheng: So that you can you can select the correct answers and don't select any of the incorrect answer. And if you want to write down the answers over here. 299 00:42:48.270 --> 00:42:56.580 William Cheng: Make sure that they're correct. Okay. So by thinking very carefully, I think, very critically being able to tell whether something is wrong or something is right. Yeah. 300 00:42:58.350 --> 00:43:00.450 William Cheng: Alright, so I guess on the classroom. 301 00:43:00.870 --> 00:43:06.900 William Cheng: Page and so it tells you what kind of exam questions there are. There are three types of exam question. The first one is a calculation type question. 302 00:43:07.110 --> 00:43:15.960 William Cheng: So far, we haven't really done any kind of calculation, even though he warm up to you asked to calculate averages. So if I give you three number as what the averages, you should be able to tell me what the averages. 303 00:43:16.380 --> 00:43:22.320 William Cheng: If I give you three number I asked you what the standard deviation is you should give me the standard. The standard deviation 304 00:43:23.160 --> 00:43:28.710 William Cheng: OK, so those will be the kind of calculation type question. You know, for the metric, right, because we haven't really done any kind of calculation now. 305 00:43:29.280 --> 00:43:41.550 William Cheng: The other question or the short answer there. So, so if I asked you a question over here. You need to read the question very, very carefully and exercise critical, critical thinking and then give me the best answer for a question. 306 00:43:43.380 --> 00:43:52.530 William Cheng: Okay, so if you don't give me the best answer. You give me the second best answer, maybe you will get partial credit, maybe you will not get any partial credit at all. Okay, so it depends on how good your answer is 307 00:43:53.010 --> 00:43:56.220 William Cheng: OK. So again, it's important to exercise critical thinking, okay, 308 00:43:56.730 --> 00:44:04.050 William Cheng: Typically, the question was a, you know, the only in N words or less, and could be five can be 20 can be 30 so. And over here it's not a requirement. 309 00:44:04.290 --> 00:44:12.150 William Cheng: Okay, it's just a hint to tell you. Approximately how many words, I'm looking for, right. So if I say in five words or less. And you give me a 30 word answer. 310 00:44:12.750 --> 00:44:18.960 William Cheng: Well guys, in that case, I'm not going to deduct points just because you go over the limit or we ever go yeah because. And over here it's just a suggestion. 311 00:44:19.470 --> 00:44:24.960 William Cheng: Okay. Well, when you give me a 31 answer you better make sure that the 30 or so they're all correct 312 00:44:25.380 --> 00:44:37.140 William Cheng: Okay, because if the 31 so that you give contains the five words that I'm looking for. Okay, you're going to get all the credit, but then all the other 25 words if you say something wrong. I'm going to start deducting points from the points that you have already earned 313 00:44:38.700 --> 00:44:44.070 William Cheng: Okay, so therefore I strongly recommend you to think about your answer. Over here, if I say five words or letting you give me a 314 00:44:44.340 --> 00:44:53.160 William Cheng: I mean, so why would people give me a 30 way answer because they're basically you know they're not sure what answer the gear, so they don't bring down. They say write down everything they know about, you know, this pretty good question. 315 00:44:53.910 --> 00:44:58.620 William Cheng: Okay. So as it turns out, some of that is going to be correct. And then you got to get credit for it. But if some of them are wrong. 316 00:44:59.160 --> 00:45:05.370 William Cheng: Okay, that we're going to start taking points away from you. So in the end, you know, the, the total number of points for question. Can I go to zero. 317 00:45:06.000 --> 00:45:11.670 William Cheng: Okay, so for example if the question is two points over here. You give me those five words, I'm looking for, you're going to get. You're going to get two points. 318 00:45:11.850 --> 00:45:17.340 William Cheng: But then you're going to say for things that are wrong every wrong thing. I wouldn't eat that half a point for you, and in the end to end up with zero 319 00:45:18.720 --> 00:45:27.510 William Cheng: Okay, so if you say the right thing about these tools and everything else consistent won't be one wrong thing. Why, in that case, I'm going to have a point off. So in the end, going to end up with one, one and a half points. 320 00:45:27.870 --> 00:45:31.800 William Cheng: OK. So again, that's what I'm going to go gray and you have to exercise critical thinking. 321 00:45:33.240 --> 00:45:37.770 William Cheng: Right, so you get credit for including the right so you get the deduction for saying something that's wrong. 322 00:45:37.980 --> 00:45:47.280 William Cheng: Okay, so here's some important heads over here. You must not answer a general question, but give you an example. Right. The question. So what's a general question, right, the question asked you in general. 323 00:45:47.580 --> 00:45:54.750 William Cheng: Okay, you know, give me the answer for the following question. Don't say for example you know i mean how do you answer a general question by giving an example. 324 00:45:55.020 --> 00:45:59.340 William Cheng: That's clearly the wrong way to answer a question, right. So in this case you should not expect you will get full credit 325 00:45:59.970 --> 00:46:04.020 William Cheng: Okay. And sometimes you will not, you will not get any credit at all, because if you give me a tiny example. 326 00:46:04.650 --> 00:46:11.340 William Cheng: You know, I'm asking you, in general, right. So, in that case, you should only expect a very tiny amount of the partial credit or no partial credit at all. 327 00:46:11.970 --> 00:46:24.330 William Cheng: That summary. If I asked you a very specific question, I say in six different units. How do they do this. Okay, if you give me a general very high level questions. Okay. And this guy. You shouldn't be expecting getting very much a partial credit 328 00:46:25.380 --> 00:46:35.010 William Cheng: Okay. So, okay, you need to exercise critical thinking, both by reading the question very, very carefully and analyze the question to find out exactly what you're being asked and then give a very, very precise answer. 329 00:46:36.060 --> 00:46:40.500 William Cheng: All right, especially, you know, I'll make sure that you don't you know make mistakes like this. Yeah. 330 00:46:42.000 --> 00:46:48.690 William Cheng: All right. The third kind of question is the hardest kind of question or these other multiple choice question now. They are the hardest kind of questions over here because of this. 331 00:46:49.020 --> 00:46:56.520 William Cheng: unless explicitly stated every multiple choice question has one or more correct answers. I'm not going to tell you how many correct answers are there. 332 00:46:57.150 --> 00:47:10.800 William Cheng: Okay. Every multiple choice question has five a half or five answers. Okay, yeah, you could have one correct answer 234 or five, he will never have five correct answers. Okay, you will also have no correct answer. If there's no correct answer. You have to, you have to choose the best answer. 333 00:47:11.820 --> 00:47:15.330 William Cheng: Right. So even if the question asks Which statements are correct. 334 00:47:15.810 --> 00:47:24.270 William Cheng: Okay. So does that mean that the has more than one of the Community has more than one correct answer. You say, Oh, I use the plural. We hear something must have more than one correct, sir. No. 335 00:47:24.570 --> 00:47:27.990 William Cheng: Okay, because I don't really want to, you know, say, you know, which statement or statements. 336 00:47:28.170 --> 00:47:36.240 William Cheng: Are correct because I don't want to write every question like that. So I'm going to say up front. Over here, when the question asked like that is still mean the same thing. It has one or more correct answer. 337 00:47:36.600 --> 00:47:45.390 William Cheng: Okay, what I say, you know, unless explicitly say that only if the question says this question only has one correct answer. And please only select one answer. Well, in that case, you only choose one. 338 00:47:46.380 --> 00:47:51.990 William Cheng: Okay. Otherwise, all the other question I have one or correct answer. It doesn't matter what I say statements or singular or plural. 339 00:47:53.100 --> 00:48:02.490 William Cheng: When I say I know rock condition is the following statement true over here again, even though I don't know what conditions. This is singular. You can have one or more correct answer. 340 00:48:03.000 --> 00:48:08.940 William Cheng: Okay, so please also via the point of view is up please ignore minor grammatical and spelling mistakes. 341 00:48:09.510 --> 00:48:22.110 William Cheng: Okay, because I'm not perfect. Sometime making mistakes in my exempt over here. So these are consider your grammatical mistake over here. They're understood, because I mentioned this before the exam ever say that people enjoy the exact even got started. 342 00:48:22.890 --> 00:48:31.020 William Cheng: Okay, so every multiple choice question has one or more correct answer. So you need to select all the correct answer. And you need to make sure you don't select any of the incorrect answer. 343 00:48:31.500 --> 00:48:36.900 William Cheng: That. So you just select all the correct answer. You're gonna get two points, whereas all these five choices over here. There'll be worth two points. 344 00:48:37.350 --> 00:48:44.280 William Cheng: If there's only one correct answer. That means that one of them is going to worth two points. All the other ones over here. If you don't select that then there'll be no deduction. 345 00:48:44.580 --> 00:48:53.430 William Cheng: Okay, so there's only one correct. So if you select our why you get two points. If there are two correct answer. Each one of them is going to be worth one point. Right. So if you select those both of them, you'll get two points. 346 00:48:53.880 --> 00:48:58.470 William Cheng: Are there three correct answers over here. The first one, doesn't really matter which one it is, is going to be with one point. 347 00:48:58.710 --> 00:49:05.670 William Cheng: And the, the other tools that are worth half a point. Each then finally if there are four correct answers over here. Each Correct answer is worth half a point 348 00:49:06.330 --> 00:49:15.510 William Cheng: OK. So again, there'll be no question as fight correct answer. And there'll be no question I have zero correct answer. Okay. For every wrong answer that you have selected, you will lose one point. 349 00:49:16.980 --> 00:49:23.430 William Cheng: Okay, so for example if the answer is one and two. And your answer is one and three. How many points would you get 350 00:49:24.060 --> 00:49:28.350 William Cheng: Okay, so good. The answer is one and two over here. So each other to correct answer. 351 00:49:28.560 --> 00:49:37.800 William Cheng: Each one is worth one point over here. The first one over here, one that will give you one point. What about a three over here, three is a wrong answer. So you will subtract from one place so India, you can get zero point 352 00:49:40.290 --> 00:49:50.940 William Cheng: OK. So again, you lose points very, very quickly. God, because everyone has over here without one plan. So again, the total number of flights cannot go negative. Okay, so when he reaches zero, then that 353 00:49:52.050 --> 00:50:06.330 William Cheng: Is what we're going to stop. Okay. So I think, you know, so yeah, I think it's best not to get some people love to guess. Okay, so I you know my recommendation is is probably not a good idea to be too aggressive and guessing okay because we're going to end up with a zero that 354 00:50:08.520 --> 00:50:14.070 William Cheng: Alright, so there's another note over here. If a statement is inconsistent or incorrect so so so 355 00:50:14.940 --> 00:50:19.320 William Cheng: For example, if the question asks, please select all the correct statement 12345 over here. 356 00:50:19.650 --> 00:50:30.030 William Cheng: Okay, if one of the seminar here is logically inconsistent or logical incorrect, then it's considered a false statement. Right. So if I asked you the question, Does it say please select all the correct statement over here, whether you should 357 00:50:30.420 --> 00:50:35.460 William Cheng: You should ask like that. But what am I questions that please let all the wrong state. Man, why not. Okay. You should include that as answer. 358 00:50:36.300 --> 00:50:45.330 William Cheng: Okay, so if a statement itself is self inconsistent or incorrect, it must be considered a false statement that. All right. And finally, the total 359 00:50:45.960 --> 00:50:51.810 William Cheng: Points for any problem either the multiple choice or, you know, sort of fill in the blank over here, they cannot go negative. 360 00:50:52.290 --> 00:50:55.500 William Cheng: So I think I missed one of the points over here. I mean, the short answer over here. 361 00:50:55.830 --> 00:51:06.120 William Cheng: You know, the only exception is that it's a fill in the blank kind of question right so I'm here, I'm gonna give you a lot of text over here. And then there's an underline over here to say, you know, here's the answer. And you have to write in towards 362 00:51:07.320 --> 00:51:15.690 William Cheng: Okay, so, so, so, so, so in this case if it's a fill in the blank over here, then you must not use more than you know more than words. Okay, otherwise. 363 00:51:16.980 --> 00:51:27.270 William Cheng: Otherwise, you're not gonna get any credit for. Okay. If it doesn't, you know, do the fill in the blank during that case again at the end will be just as much as a suggestion there are as will get very important to understand the school. 364 00:51:29.370 --> 00:51:35.130 William Cheng: So whether the correct answer come from. I had the correct answer for most question the exam, are the ones that own lecture slides. 365 00:51:36.240 --> 00:51:46.680 William Cheng: Okay, so again the exam question is not about your general knowledge and operating system, but about stuff going on in this class. So therefore, most of the stuff is uncomfortable lecture. So why don't they come from the textbook. 366 00:51:47.250 --> 00:51:52.800 William Cheng: Right. So because the textbook is sort of older information. If the textbook has a mistake. There's no way for me to fix it. 367 00:51:53.340 --> 00:52:03.540 William Cheng: Because it's the textbook. So therefore, the only way I can fix it is to override them on the lecture slides. Okay, so if there's any inconsistency between attachment. Now, let your slides over here and the lecture slides. When 368 00:52:04.980 --> 00:52:15.810 William Cheng: Okay. What if you think that the lecture slides wrong when I say this case, what do you need to do that, you need to complain to me to say, hey, the textbook says a and then the lecture sizes be I think your wall and then I need to fix the lectures life. 369 00:52:16.470 --> 00:52:22.080 William Cheng: Okay, and you have to come, you have to convince me to change the lecture slides before the exam. Sorry, because once the exam starts too late. 370 00:52:22.590 --> 00:52:25.740 William Cheng: Okay, then in that case the lectures level. People will come to the correct answer. 371 00:52:26.130 --> 00:52:35.490 William Cheng: OK. So again, if you can convince me that the lecture slide is wrong. I need to change the legislation, I will also send out a message to the entire class to say I'm fixing my lecture slides is over here. 372 00:52:35.700 --> 00:52:41.280 William Cheng: This is what it says before and this is what it says. Now, and from this point on that. Let's just like will be hopefully consistent with a textbook. 373 00:52:41.580 --> 00:52:49.680 William Cheng: That or I can also tell you that the textbook is wrong. So that's why I'm fixing the intellect, just like, Okay, so again, all these things needs to be crystal clear then 374 00:52:51.210 --> 00:53:03.180 William Cheng: Finally, over here says I reserve the right to ask you about things that I think you should know and not on the lecture slides because I don't want argument to say you are not allowed to ask me that question because that question is not exactly on the lecture slides. 375 00:53:04.050 --> 00:53:11.610 William Cheng: Okay. So, therefore I'm say I reserve the right to ask you about anything that I think you should know. And now, and Alexa and also you need to understand that for multiple choice question. 376 00:53:11.910 --> 00:53:16.680 William Cheng: The correct answers might be on the left side. But what about the wrong answer or the wrong answer on the lecture slides. 377 00:53:17.280 --> 00:53:25.560 William Cheng: I mean, is the legislators gonna say this is the wrong answer. I'm gonna let you know clearly legislators not gonna tell you all the possible, wrong, wrong answers for any type of situation. 378 00:53:26.700 --> 00:53:31.470 William Cheng: Okay, so therefore that's why you know the wrong answer is not going to be on the lecture side and the right answer. 379 00:53:31.680 --> 00:53:38.550 William Cheng: May not be directly on regicide maybe you have to think about it or it will think about what I said in class. And this way you can actually figure out that that's the right answer. 380 00:53:38.940 --> 00:53:44.340 William Cheng: Okay, and then also the other ones, the wrong answer, because again you need to understand that, like, just like some people always asked me. 381 00:53:44.730 --> 00:53:57.660 William Cheng: You know, should I memorize the legislature. That's really up to you. Okay. I think you don't have to memorize the lectures that you just have to understand them. Okay. If you understand that if you exercise critical thinking, you should be able to answer every question correctly, right. 382 00:54:00.000 --> 00:54:03.990 William Cheng: All right, so so critical thinking, right, you need to read the question and the answer very, very 383 00:54:04.470 --> 00:54:10.860 William Cheng: Carefully and also very critically for every role answering the multiple choice question right so so you know if your answer is wrong. 384 00:54:11.520 --> 00:54:15.930 William Cheng: Question, you should be able to pinpoint exactly why that's wrong. 385 00:54:16.650 --> 00:54:22.890 William Cheng: Okay, you need to be able to come up with arguments that that statement is wrong because I know exactly why that's wrong right again based on the lecture material. 386 00:54:23.700 --> 00:54:27.990 William Cheng: Okay, so based on your knowledge of this course material and not based on what you can find on the internet. 387 00:54:28.350 --> 00:54:39.330 William Cheng: Okay, so you should be able to form a clear argument why the answer is incorrect. So I your gratitude that you need to learn critical thinking when you go out in the real world, you know, your employer, we expect that you can do critical thinking. 388 00:54:39.660 --> 00:54:43.740 William Cheng: Okay so critical thing is about pointing out exactly why a statement is wrong. 389 00:54:45.240 --> 00:54:54.090 William Cheng: Okay on when they're right there exactly the same as the lecture side. So that's easy. Right. And also, you know, they're not exactly the same as, like, just like you need to be able to form an argument to say why that statement is correct. 390 00:54:54.750 --> 00:54:57.330 William Cheng: Okay, so. So again, that's how you do critical thinking. 391 00:54:57.660 --> 00:55:03.300 William Cheng: Now so many students are not used to thinking about things this way. Okay, so, so, you know, some some some people will just give a 392 00:55:03.480 --> 00:55:08.730 William Cheng: hand waving answer or something like that. So if you want to do run the exam, you must practice how to do critical thinking. 393 00:55:08.970 --> 00:55:14.460 William Cheng: That. So one thing that you can do that. You can actually form a small study group, maybe with your kernel partners will have a study group over here. 394 00:55:15.060 --> 00:55:21.960 William Cheng: So that would be a start over here. You can also, you know, guess post messages across Google group as people to form a study group or whatever. 395 00:55:22.590 --> 00:55:30.390 William Cheng: So, so you study the slides together we can do is that you can actually start a zoom meeting and ask each other questions based on what you saw the lectures lie. So if you see some statement. 396 00:55:30.600 --> 00:55:36.240 William Cheng: In the, in the lecture side over here, you can make up a statement I asked other students to see if they think that what you said is correct or not. 397 00:55:36.720 --> 00:55:42.390 William Cheng: Okay, when they say that you're standing is correct incorrect, the better give you a very precise answer wising correct 398 00:55:42.780 --> 00:55:50.610 William Cheng: Okay, so this way. Everybody get to practice critical thinking, right. So how do you come up with a question. Right. So for example, you know, if the legislature has a statement like this. 399 00:55:50.820 --> 00:55:59.100 William Cheng: Maybe what you can do that. You can take out some important, important words from this day, man. Where you think are important words on that statement. And now the standard will become false 400 00:56:00.360 --> 00:56:02.460 William Cheng: That. So the statement is only true if 401 00:56:03.630 --> 00:56:15.210 William Cheng: It is then is logic wholly true right so if you take out certain word over here. For example, one of the word can actually take out the word user or take out the word Colonel then in that case, you know, the entire segment will be false. 402 00:56:15.660 --> 00:56:25.830 William Cheng: Okay, well, we can actually add extra words to it. Maybe is more to it than that. The same. It might become false. And again, if they become falls. You need to be able to pinpoint exactly why that statement is false. 403 00:56:26.040 --> 00:56:36.300 William Cheng: Okay, so by doing this, you know, do a study group as each other questions like that, then you know you're going to get used to critical thinking, next time when you see a statement, you can actually directly judge right away, whether that statement is true or false. 404 00:56:37.080 --> 00:56:41.940 William Cheng: OK. So again, I think this is a very important your ways to sort of learn how to do critical thinking, okay, 405 00:56:43.470 --> 00:56:51.570 William Cheng: All right, little bit of the exam I logistic over here are the midterm exam is only going to be 40 minutes law, our class starts at 930 to 406 00:56:52.470 --> 00:56:57.750 William Cheng: 1130 so you know I think ever since day one. I sort of show you when 407 00:56:58.350 --> 00:57:07.500 William Cheng: He says he's I'm scheduling. So, therefore, you know, you have to be available during this time, right. So, so we're going to start, you know, not at 930. I'm going to start at 10 O'clock over here for 40 minutes 408 00:57:07.860 --> 00:57:20.460 William Cheng: That the exam that we're going to give up here is considered a take home exam, you're going to be downloading your exam over here to exactly 10 o'clock, and then at exactly 1040 you need to stop, you know, writing on your exam and you need to 409 00:57:21.390 --> 00:57:26.490 William Cheng: You need to send me your exam. The way you send me your exam as soon as you submit your, your warm up. 410 00:57:27.060 --> 00:57:31.050 William Cheng: All your programming assignments. There's a web form you you know you specify your file you 411 00:57:31.740 --> 00:57:40.830 William Cheng: Because you click on browse or you can blow you got to see a ticket. You can do all that kind of stopped right so those procedure. I assume you're very familiar with it, so therefore submission should be pretty straightforward. 412 00:57:41.970 --> 00:57:48.120 William Cheng: Alright. The exam is going to be right. Since you are doing this, take home is going to be open book, open notes. Exactly. 413 00:57:48.870 --> 00:57:57.630 William Cheng: Okay, so I'm also going to require you to sign a pledge to say that you will not cheat. Okay, so this kind of, what does it mean cheating cheating, meaning that you have help from other people. 414 00:57:58.590 --> 00:58:05.160 William Cheng: Okay. So, therefore, you know, there's a sort of a very standard form from victory School of Engineering. I'm going to ask you to sign up for 415 00:58:05.580 --> 00:58:17.400 William Cheng: That so so you need to sign up form. I'm going to give you the procedure of how to do that and you need to sign it and they just send it to me if I don't get assigned pledge from you that you are not eligible to take the exam. 416 00:58:18.210 --> 00:58:29.700 William Cheng: Okay, so I will only send them in their midterm exam to you if I have received assigned pledge for you. Well, so I don't know, some people always wait to the last moment, I said, as soon as you know you know what the form that you need to sign do it as soon as possible. 417 00:58:30.180 --> 00:58:36.150 William Cheng: Okay, so, because in the end, you know, if you don't send me the sign pledge, you will not get the exam. And then we're going to get a big zero 418 00:58:37.440 --> 00:58:41.400 William Cheng: Or is it again. You know my fairness policy are not allowed to treat me 419 00:58:41.970 --> 00:58:52.590 William Cheng: Differently. Right. So again, follow the procedure and the procedure is going to be coming. I'm going to tell you exactly how to do that now. Right. So after 1040 over here, you're going to have three minutes to submit the exam, starting at 1040 420 00:58:53.430 --> 00:58:58.020 William Cheng: Okay, so, so, by the way you are, you know, you're required to start working on 421 00:58:58.410 --> 00:59:07.800 William Cheng: At 1040 right so by signing the pledge over here, you're promising me that at 1040 you will stop writing on your exam. Okay, you're going to spend the next three minutes over here, send me your exam. 422 00:59:08.790 --> 00:59:11.310 William Cheng: If you do things right. You want to going to take you a few seconds. 423 00:59:12.000 --> 00:59:22.830 William Cheng: Okay, but from the last semester. Some people tell me that they have internet problem over here, they submit their exam lead over here. Well, if you sent me exam lead over here. I need you to prove to me that you have internet problem. 424 00:59:24.240 --> 00:59:32.910 William Cheng: Okay, yeah, I mean a lot of people don't have internet problem. So if you don't worry. No problem. Starting at 1043 over here you will lose 5% for each minute late 425 00:59:33.720 --> 00:59:42.360 William Cheng: Okay, it doesn't want to be a 5% real exam over here. So, what you should do is I usually use those three minutes. Don't do anything else. But there's some your exam. And if you do it really quickly is going to be done a few seconds. 426 00:59:42.540 --> 00:59:45.510 William Cheng: That and the. And in that case, you're, you're done with your exam. 427 00:59:46.380 --> 00:59:56.700 William Cheng: Okay, so the web submission form, it's going to be the same as the assignment submission forums will get very straightforward. So you should only take your second. Once you are ready to have your submission pins ready 428 00:59:57.300 --> 01:00:07.530 William Cheng: Okay, so your submission pin doesn't change from one more point to Walmart to etc. So therefore you should again, get your submission pin over here. Keep it in a file. So this way you can easily. You know, fill out the form. Okay. 429 01:00:07.950 --> 01:00:17.730 William Cheng: Oh yeah, some student complaining about poor internet connection over here. So if it takes longer than three minutes for you to submit I need prove that you really have an internet problem. 430 01:00:18.540 --> 01:00:25.470 William Cheng: Okay, so how can I see that you have you no problem. I'm going to require you to record your submission using the zoom recording feature. 431 01:00:26.280 --> 01:00:34.020 William Cheng: Okay, so here's zoom to record your submission activity on your browser, right, you have a browser. So the browser only has one floor. So just like the the 432 01:00:34.260 --> 01:00:39.030 William Cheng: One last submission over here, right in the submission form right above it. There's a clock clock value. 433 01:00:39.540 --> 01:00:43.140 William Cheng: Okay, so definitely you supposed to do is to reload the form and they will show you what the current time is 434 01:00:43.350 --> 01:00:49.980 William Cheng: And then you need to submit a form. If I see a, you know, an internet problem over here, then I will tend to believe you, that you actually have internet problem. 435 01:00:50.910 --> 01:00:55.770 William Cheng: OK. So again, what you need to do is that, you know, so if you are not familiar with. I mean, I assume that you kind of familiar with zoom 436 01:00:56.370 --> 01:01:05.610 William Cheng: So here's the procedure at 10:40am you start doing the following. It's just start working on your exam, right, because you weren't you promise me that you know that you will not work. So we're going to work on the exam. 437 01:01:05.910 --> 01:01:08.220 William Cheng: After 1048 right so you have three minutes at summit. 438 01:01:08.700 --> 01:01:18.690 William Cheng: Point your browser at the midterm submission web page, you're going to see what they learned, what would that look like you start the zoom share the screen with your browser and then you're going to record on your local desk. 439 01:01:19.500 --> 01:01:28.260 William Cheng: Okay, so on the zoom you know screen over here on the right, top corner there's a three dot over here. If you click on one of them was to say that you know record on your computer. 440 01:01:28.710 --> 01:01:33.300 William Cheng: Okay, so you just select that and once you start doing that everything that you do on the web form it will start recording it 441 01:01:34.020 --> 01:01:38.580 William Cheng: So this guy is you should reload your browser to get the current clock right above the submission form over here. 442 01:01:38.730 --> 01:01:45.450 William Cheng: So that would know what time it is. So again, if you have an internet problem over here, you're gonna say they have internet problem. So in this case, you're gonna you're gonna spend the next 443 01:01:45.690 --> 01:01:49.560 William Cheng: Next three minutes. Keep trying to do this over and over, over again until the works. 444 01:01:50.280 --> 01:01:56.790 William Cheng: Okay, so, so if you know loading your, your, your clock over here works over here, you need to enter your login ID and depend 445 01:01:57.030 --> 01:01:59.340 William Cheng: Click on the browser to select your submission for 446 01:01:59.550 --> 01:02:06.900 William Cheng: Your submission file is the text file, right. So that will be the father, you're working on that will contain all. Yes, sir. So only selected the text file over here. 447 01:02:07.080 --> 01:02:16.140 William Cheng: And then you click on upload just that you upload, you know, warm up one that's hard that juicy one or two Jeezy over here. Right. And that will do is it will take you to the next page. And you'll see a ticket. 448 01:02:16.800 --> 01:02:27.780 William Cheng: That's what again at this point if there's an Internet connection problem, you will see the error page that says here's the internet problem over here. So again, he just tried this over and over again for three minutes as proved to me that you have internet problem. 449 01:02:29.190 --> 01:02:36.270 William Cheng: Okay, so. So again, if you, if you, if you're going to claim that you have internet problem. I need to see the proof and the proof is going to be the zoom video 450 01:02:36.630 --> 01:02:44.280 William Cheng: That so you keep doing this until eventually see a ticket over here, they need to scroll down to see the file size. See the pharmacy, the server type string and when 451 01:02:44.460 --> 01:02:49.290 William Cheng: You know, on the on the biggest screen over here to tell you that these are the thing that you're supposed to look at. So again, you need to 452 01:02:49.590 --> 01:02:54.510 William Cheng: Slow down over here. When you scroll down, you will see the server touching and that will be your submission timestamp. 453 01:02:55.140 --> 01:03:02.370 William Cheng: Okay, so why is this either 17 times I'm over here you can stop recording over here. You got another query MP as you don't create an impact for file. 454 01:03:02.730 --> 01:03:11.730 William Cheng: Something cause something that impact for inside your local disk over here. And then if it turns out that your, your, your server time streaming over here is going to be after 10 1043 455 01:03:12.030 --> 01:03:16.230 William Cheng: Then you need to send me your impact for file will be here to prove that you actually have internet problem. 456 01:03:17.010 --> 01:03:23.130 William Cheng: Okay, so if you if your impact four or five is empty. For some reason, or if it turns out that you don't send me the MP4 file, file. 457 01:03:23.340 --> 01:03:39.780 William Cheng: That, in that case what I will do is that for every minute or less starting at 10 four 310 1043 followed by zero seconds over here, you start losing five 5% for every minute late get so that means that from 1040 320 all the way to 458 01:03:42.360 --> 01:03:55.140 William Cheng: Okay, if the timestamp between the is inside this interval, including the beginning point on empire, you will lose 5% okay if it's turned 44 over here that you lose 10% if it's 1045 you will lose you know 50% etc. 459 01:03:56.250 --> 01:04:06.030 William Cheng: OK. So again, please take this very seriously. And again, if you have internet problem, you need to send me the zoom recording. If you don't expect an internet problem. You don't have to record. 460 01:04:07.110 --> 01:04:14.730 William Cheng: Okay, so you can just upload the file. Everything's okay. Over here, right. So, so everything goes go through the first time in the first few seconds. You don't have to do this at all. 461 01:04:15.270 --> 01:04:22.860 William Cheng: Okay, why did you see the ticket, they look at the time, Sam. Over here you know your submission. What made it into the server between before 1043 everything's okay 462 01:04:24.000 --> 01:04:33.360 William Cheng: Okay, only if it's going to go beyond 1043 and you don't want to be down here and then you have to send me your zoom video. So this way. I know the zoom video BETTER BE MORE THAN 10 463 01:04:33.780 --> 01:04:45.960 William Cheng: More than more than three minutes law. Okay, so if you want to send me a five minutes late over here to zoom video over here will show you that you've been trying this for five minutes. Okay, so in that case I will be able to you know grant your credit 464 01:04:47.670 --> 01:04:56.400 William Cheng: Right. So again, please take this very, very seriously. So in order for you to get familiar with this procedure over here, we will have a midterm rehearsal on Thursday. 465 01:04:56.760 --> 01:05:06.090 William Cheng: You know, July 2 at 1pm over here so that this way you can get a practice on there but procedure so you know exactly what you know what 466 01:05:06.330 --> 01:05:14.220 William Cheng: Would you would expect. You also know you know you also get to practice way you should store your pin file. So this way when you try to make a submission submission, you will go super fast. 467 01:05:15.540 --> 01:05:21.480 William Cheng: Alright, so we're gonna we're gonna have a rehearsal over here. If you are not available during this time it's just a rehearsal, you can actually do it at a later time. 468 01:05:22.680 --> 01:05:29.970 William Cheng: Okay, so feel free to the any later time. You can try this procedure. I'll make sure everything's in the right place. So that way when it's time to submit boom. You can get it up. 469 01:05:31.020 --> 01:05:42.240 William Cheng: Okay. You can also, you know, you might also want well. So as it turns out, a if your home, you always get poor internet connection. The other thing that you can do is that you can actually, you know, send your send me your submission through your phone. 470 01:05:43.620 --> 01:05:51.330 William Cheng: Okay, so that you know that Katie will be sending things to an email. We send through things to email the way he now works is that we can take days to get to me. 471 01:05:51.900 --> 01:05:54.630 William Cheng: Okay, so, sending through things. So email is actually very, very risky. 472 01:05:54.870 --> 01:06:00.660 William Cheng: Okay, so it's best not to do that. So when you try this procedure and they just couldn't get it to work. You know, see if you notice I mentioned problem. 473 01:06:00.840 --> 01:06:09.660 William Cheng: Either you keep doing this and send me the zoom video or you can try to do an email submission, because typically your emails going into, you know, not the UFC network, but going into 474 01:06:10.170 --> 01:06:15.210 William Cheng: You know, the, the, the cellular network. So in that case, I'm actually in magical through 475 01:06:16.020 --> 01:06:24.720 William Cheng: OK. So again, you need to prepare for the worst case if you know that a home, you typically once in a while you were home, you're often going to get internet connection connectivity problem. 476 01:06:25.650 --> 01:06:37.440 William Cheng: OK. So again, by going through the rehearsal, you should know what to expect. And if you have issues. You should contact me as soon as possible. Don't wait until the exam date. Okay, and let me know your problem as soon as possible. Okay. 477 01:06:39.210 --> 01:06:43.980 William Cheng: All right, the exam covered over here again I just mentioned that. So I need not not to go mission in 478 01:06:44.940 --> 01:06:53.010 William Cheng: No time. So follow me there are some general rules about the mission that you should know. So read the description, very, very carefully again exercise critical question. 479 01:06:53.940 --> 01:06:59.250 William Cheng: So so critical thinking and you may not receive any credit if you're as if he asked the wrong question. Right. Some people 480 01:06:59.490 --> 01:07:07.080 William Cheng: Argue the areas of the wrong question is still any credit. It doesn't work that way. If I allow you to do that I need to allow everybody to do that right so clearly that's not possible that 481 01:07:07.620 --> 01:07:12.930 William Cheng: If the question has multiple parts. Make sure your answer every part and clearly label which answer for which part 482 01:07:13.200 --> 01:07:23.670 William Cheng: Okay, my question is going to say, A, B, and C or one, two, and three. So in this case, when you label your answer you knew the answer. A, B, or C one, two or three right so they will match the question. Exactly. Okay. If 483 01:07:23.910 --> 01:07:27.960 William Cheng: My answer has multiple par and you just give an answer, you're going to get no credit 484 01:07:28.590 --> 01:07:32.670 William Cheng: Okay, so you got to make sure that is very, very clear which question or yo which part of the 485 01:07:33.120 --> 01:07:40.770 William Cheng: Question that you're answering for that we will get partial credit if it's applicable and there's no guarantee that you will get any partial credit 486 01:07:41.610 --> 01:07:47.790 William Cheng: Okay, so, so, so we're gonna we're going to do the reasonable thing. But if your answer is totally wrong. Don't expect partial credit 487 01:07:48.090 --> 01:07:54.000 William Cheng: That. And also please do not draw a picture to answer question right, unless the question asked you to draw a picture. 488 01:07:54.390 --> 01:08:03.390 William Cheng: Okay, so picture would not be considered for grading unless they are clearly explain words. And also, you know, for your submission, you're going to submit a text file. So there's really no way to draw a picture and somebody actually use 489 01:08:03.690 --> 01:08:09.810 William Cheng: These character graphics or they don't do that. Okay, answer your question in words, then 490 01:08:11.040 --> 01:08:17.070 William Cheng: And then after we next type question right if the question does not mention the word we need to explicitly 491 01:08:17.310 --> 01:08:26.310 William Cheng: Then we are not asking a question about the weeknights programming assignment. Right. Some people because there are keyboard, you know, the winning is I'm all they can think about our weeks to a specific style. 492 01:08:26.910 --> 01:08:35.640 William Cheng: So in that case, they will give a really specific answer. So again, if I asked you a sort of a high level question. And if you give me a week specific answer, you're going to get very little partial credit for 493 01:08:36.240 --> 01:08:44.460 William Cheng: That alright. Finally, please ignore minor spelling and grammatical mistake. They do not make an answer invalid or incorrect. Right. So I mentioned this already. Yeah. 494 01:08:46.470 --> 01:08:57.240 William Cheng: Alright. Finally, I do an exam. If you have a question about the exam question you can send me email or to clarify these are these questions, but please understand that email can take days to reach me 495 01:08:57.510 --> 01:09:05.760 William Cheng: Okay, so therefore, please don't count on me to reply to your question immediately that will be not possible. Okay. Sometimes I will get you a question. You've been hours later, so therefore it will be too late. 496 01:09:06.090 --> 01:09:14.820 William Cheng: Okay, so it says what do you should do is out again read your question very carefully, you know, and again, think about your answer very carefully and exercise critical thinking and give me 497 01:09:16.020 --> 01:09:17.190 William Cheng: Give me the best answer that you have 498 01:09:18.420 --> 01:09:26.790 William Cheng: All right. And also, if I get your question, I will reply, a poll. I will make a reply by posting to the class Google group because I will not answer a question, just for you. 499 01:09:27.510 --> 01:09:33.390 William Cheng: Okay, so. So in this case you should also have your email open during the exam, right. It's open notes open book exam so 500 01:09:33.750 --> 01:09:45.540 William Cheng: You can have your email open that. So in this case, if I post something a little possible, you should be able to get a hopefully you'll get it right away. But again, a post in the classroom will grow our emails and email can actually take days to reach you know 501 01:09:47.070 --> 01:09:57.570 William Cheng: Please don't ask for. Hence, you know. So if you ask for a non clever Katie type question, I will not be responsible for the answer that you think that I might. I might have. Get in the car in the classical group now. 502 01:09:58.020 --> 01:10:02.850 William Cheng: And also I will not ask a question regarding multiple choice question because they give the answers away. 503 01:10:03.300 --> 01:10:07.290 William Cheng: Okay. Some people will ask me, you know, for this month. What's your question, answer a over here, say it this way. 504 01:10:07.530 --> 01:10:16.080 William Cheng: Did you miss a word there. I mean, of course, I miss a word or intentionally. So therefore, I would not be able to comment on question like that, so any questions about multiple choice. I will not be able to answer it. 505 01:10:16.590 --> 01:10:29.070 William Cheng: Okay, the guy if he asked me, which involve multiple choice question I'm going to just tell you to say read a question I read the answer very, very careful. The and select only the correct answer, and not select any of the incorrect. So that will be the only thing I will say that 506 01:10:30.420 --> 01:10:40.110 William Cheng: All right, so I'm done with a second power over here and now the next thing over the other than the third part of today's lecture I'm going to go to chapter six and talk about stuff that's after the midterm. Okay.