diff --git a/en_US.ISO8859-1/captions/2006/mckusick-kernelinternals/mckusick-kernelinternals-1.sbv b/en_US.ISO8859-1/captions/2006/mckusick-kernelinternals/mckusick-kernelinternals-1.sbv index 7f564d1d33..8d3b93ab6d 100644 --- a/en_US.ISO8859-1/captions/2006/mckusick-kernelinternals/mckusick-kernelinternals-1.sbv +++ b/en_US.ISO8859-1/captions/2006/mckusick-kernelinternals/mckusick-kernelinternals-1.sbv @@ -1,4302 +1,4300 @@ 0:00:09.469,0:00:11.309 Hello my name is Marshall Kirk McKusick 0:00:11.309,0:00:15.389 and I've been around as long as dinosaurs and mainframes have ruled the world 0:00:15.389,0:00:18.429 which is to say the sixties and seventies 0:00:18.429,0:00:22.460 -however by 1970s a new breed of mammals had began to show up on -the scene, +however by 1970s a new breed of mammals had begun to show up +on the scene 0:00:22.460,0:00:24.240 known as mini computers 0:00:24.240,0:00:28.230 although they were just toys in the 1970s they would soon grow 0:00:28.230,0:00:31.689 and take over most of the computing market 0:00:31.689,0:00:33.150 In 1970 0:00:33.150,0:00:37.910 at AT&T Bell laboratories two researchers Ken Thompson and Dennis Ritchie began developing the 0:00:37.910,0:00:39.900 UNIX operating system 0:00:39.900,0:00:42.040 Ken Thompson who had been an alumnus at Berkeley 0:00:42.040,0:00:46.100 -came back on a sabbotical in 1975 bringing UNIX +came back on a sabbatical in 1975 bringing UNIX with him 0:00:46.100,0:00:47.539 -In the he was there +In the year that he was there 0:00:47.539,0:00:51.330 he managed to get a number of graduate students interested in UNIX 0:00:51.330,0:00:53.940 and by the time he left in 1976 0:00:53.940,0:00:56.829 Bill Joy has taken over in running the UNIX system 0:00:56.829,0:01:00.470 and in fact continuing to develop software for it. 0:01:00.470,0:01:04.339 -Bill began packaging up the software that have +Bill began packaging up the software that had been developed under Berkeley UNIX and 0:01:04.339,0:01:05.779 and distributing it 0:01:05.779,0:01:08.040 -as the Berkeley Software Distribution +as the Berkeley Software Distributions 0:01:08.040,0:01:12.310 whose name was quickly shortened to simply BSD 0:01:12.310,0:01:16.330 BSD continued to be distributed with -yearly distribution for almost fifteen +yearly distributions for almost fifteen 0:01:16.330,0:01:17.490 years 0:01:17.490,0:01:21.920 initially under Bill Joy and later under others including yours truly. 0:01:21.920,0:01:24.860 By the late 1980s interest had began to grow 0:01:24.860,0:01:27.400 in freely redistributable software 0:01:27.400,0:01:30.170 so a number of us at Berkeley began separating out 0:01:30.170,0:01:32.649 the AT&T proprietary bits of BSD 0:01:32.649,0:01:35.710 from those parts that were freely redistributable. 0:01:35.710,0:01:40.590 By the time of the final distribution at BSD in 1992 0:01:40.590,0:01:43.620 the entire distribution was freely redistributable. 0:01:43.620,0:01:45.909 I live in a capsule history here 0:01:45.909,0:01:48.009 but if you're interested in the entire story 0:01:48.009,0:01:50.789 I have this three-and-an-half hour epic 0:01:50.789,0:01:54.590 which is available from my website www.mckusick.com 0:01:54.590,0:01:58.200 that gives the entire history of Berkeley. 0:01:58.200,0:02:00.239 Following the final distribution from Berkeley 0:02:00.239,0:02:01.450 two groups sprung up 0:02:01.450,0:02:03.600 to continue supporting BSD 0:02:03.600,0:02:08.080 -the first of this is the NetBSD whose primary +the first of this was the NetBSD whose primary goal was to support 0:02:08.080,0:02:10.459 as many different architectures as possible 0:02:10.459,0:02:14.769 everything from your microwave oven all way upto your cray XMP 0:02:14.769,0:02:19.409 In fact today NetBSD supports nearly sixty architectures. 0:02:19.409,0:02:22.419 The other group that sprang up was FreeBSD. 0:02:22.419,0:02:28.239 Their goal was to bring up BSD and support -as wide set of devices as possible on the +as wide a set of devices as possible on the 0:02:28.239,0:02:29.719 PC architecture. 0:02:29.719,0:02:36.549 They also had a goal of trying to make the -the system as easy to install as possible to + system as easy to install as possible to 0:02:36.549,0:02:39.309 attract by a wide group of developers 0:02:39.309,0:02:42.319 -I chose to primarily work with the FreeBSD +I chose to work primarily with the FreeBSD group 0:02:42.319,0:02:43.740 both doing software 0:02:43.740,0:02:46.140 -and also together with George Neville +and also together with George Neville Neil 0:02:46.140,0:02:51.069 writing this book ""The Design and Implementation of the FreeBSD Operating System"". 0:02:51.069,0:02:52.060 Together with this book 0:02:52.060,0:02:53.959 I developed a course 0:02:53.959,0:02:56.500 which runs for twelve chapters 0:02:56.500,0:02:58.179 and thirty hours. 0:02:58.179,0:02:59.749 The purpose of this video 0:02:59.749,0:03:01.089 is to give you a taste 0:03:01.089,0:03:02.819 of that course. 0:03:02.819,0:03:07.249 What follows are excerpts from the first lecture of the course 0:03:07.249,0:03:11.139 which of course you can also get from my website www.mckusick.com. 0:03:11.139,0:03:13.069 0:03:13.069,0:03:17.739 Enjoy. 0:03:17.739,0:03:22.239 This class is nominally about FreeBSD because well 0:03:22.239,0:03:26.379 that's what I know best and that's what the textbook is organized around 0:03:26.379,0:03:29.979 -but the fact that the matter is back it's really +but the fact of the matter is that it's really 0:03:29.979,0:03:32.339 a class about your UNIX and that 0:03:32.339,0:03:36.539 really covers sort of the broad range of things in the open source arena as its FreeBSD 0:03:36.539,0:03:37.689 in Linux 0:03:37.689,0:03:38.899 which of course 0:03:38.899,0:03:41.159 you use a lot out 0:03:41.159,0:03:41.550 and 0:03:41.550,0:03:44.349 it also covers a commercial systems 0:03:44.349,0:03:46.950 %uh Solaris, HP-UX, 0:03:46.950,0:03:49.279 AIX and so on. 0:03:49.279,0:03:52.419 I am going to tend more towards the open side 0:03:52.419,0:03:56.389 open source side of things.So it's really going to be more FreeBSD in Linux than it's 0:03:56.389,0:03:57.579 going to be 0:03:57.579,0:04:00.849 Solaris and HP-UX and so on. 0:04:00.849,0:04:06.959 For the most part at the level of this course we're dealing with the interfaces to the system 0:04:06.959,0:04:07.329 and 0:04:07.329,0:04:11.599 the fact that the matter is a those interfaces are highly standardized at this point 0:04:11.599,0:04:12.060 and 0:04:12.060,0:04:15.280 whether it's FreeBSD or Linux or Solaris or whatever 0:04:15.280,0:04:19.460 the Socket system call has to do the same thing, it has to have the same arguments 0:04:19.460,0:04:20.150 in that, 0:04:20.150,0:04:23.909 it has to have the same effect 0:04:23.909,0:04:27.319 -and so until you get down to the really niddy +and so until you get down to the really nitty details 0:04:27.319,0:04:29.600 of how they actually go about implementing that 0:04:29.600,0:04:31.960 the differences are relatively minor. 0:04:31.960,0:04:35.830 So I would say that sixty to seventy percent of the material that I'm covering 0:04:35.830,0:04:40.779 is just as true for FreeBSD as it would be for Linux 0:04:40.779,0:04:42.580 or for Solaris 0:04:42.580,0:04:44.659 %uh AIX is a little bit 0:04:44.659,0:04:45.629 sort of off in the weeds 0:04:45.629,0:04:48.709 %uh as is HP-UX 0:04:48.709,0:04:51.099 but luckily we don't have to worry too much about that. 0:04:51.099,0:04:54.569 Okay so 0:04:54.569,0:04:59.279 -the other thing is I'm going to assume that +the other thing is that I'm going to assume that all of you have used the system. I get 0:04:59.279,0:05:00.910 really sort of worried when people 0:05:00.910,0:05:04.249 you know raise the hands and ""Hey, what's a Shell?"" 0:05:04.249,0:05:07.990 or I don't -put a lot of code up but a small piece of code and someone said ""Why +put a lot of code up but a one piece of code and someone said ""Why 0:05:07.990,0:05:11.819 are there two pipe symbols in the middle of that that If statement?"". 0:05:11.819,0:05:15.740 No we're not programming the Shell we're programming in C. 0:05:15.740,0:05:19.970 So hopefully you can tell the difference between Shell scripts and C code. 0:05:19.970,0:05:21.990 -okay but I am but am gonna assume +so okay but I am but am gonna assume 0:05:21.990,0:05:24.610 you haven't really looked inside the system. 0:05:24.610,0:05:28.289 So I gonna start everything to at a very high level. 0:05:28.289,0:05:32.969 The problem is I have already discovered you come from a lot of different sort of 0:05:32.969,0:05:33.819 backgrounds 0:05:33.819,0:05:35.180 and 0:05:35.180,0:05:36.280 levels of knowledge 0:05:36.280,0:05:37.900 and so 0:05:37.900,0:05:42.620 -the way that I find works best the sort of +the way that I find works best to sort of be useful to everybody is that three pass 0:05:42.620,0:05:43.860 algorithm 0:05:43.860,0:05:49.060 so what I will do is start the first pass a very broad brush high level 0:05:49.060,0:05:50.569 description of what's going on 0:05:50.569,0:05:54.719 and then I will go back and i'll go through the same material again but at a lower level of 0:05:54.719,0:05:55.300 detail 0:05:55.300,0:05:59.939 -then i finally go back and go through a very neatly +then i finally go back and go through a very nittily low-level of detail 0:05:59.939,0:06:04.649 -and the fact that is if you are learning new stuff +and the fact of this is if you are learning new stuff as I'm doing the high-level thing 0:06:04.649,0:06:08.649 you are gonna be utterly washed by the time I get to -low level nearly details +low level niggly details 0:06:08.649,0:06:10.699 but since I'm going to do it topic by topic 0:06:10.699,0:06:14.190 when I get to the end of one of those nearly -low level details +low level niggly details 0:06:14.190,0:06:17.900 i'll give you a clue as i will say ""Brain reset, I'm starting a new topic"" so even if 0:06:17.900,0:06:19.330 you're completely lost 0:06:19.330,0:06:23.530 -you can now start listening again plus am gonna get +you can now start listening again plus I'm gonna get the broad brush up again. 0:06:23.530,0:06:27.059 okay and for those of you that know a lot of this stuff already 0:06:27.059,0:06:31.770 you'll probably find the broad brush rather boring 0:06:31.770,0:06:35.759 -but by the time i get down nearly low level +but by the time we get down to nearly low level details I think you'll actually 0:06:35.759,0:06:37.860 pick up some things that you will find 0:06:37.860,0:06:39.710 useful and interesting. 0:06:39.710,0:06:43.759 So in this way hopefully everybody will get some 0:06:43.759,0:06:47.699 useful percentage of material out of the course. 0:06:47.699,0:06:49.599 I am gonna start out by just 0:06:49.599,0:06:53.089 walking through and giving you the 0:06:53.089,0:06:56.919 -outline of what we're going to try and do +outline of what we're going to try and do here here 0:06:56.919,0:07:01.169 As i said we're going to go roughly 0:07:01.169,0:07:03.270 -about two-and-an-half hours of lecture +just about two-and-an-half hours of lecture 0:07:03.270,0:07:04.729 about two hours forty minutes 0:07:04.729,0:07:06.499 per week 0:07:06.499,0:07:07.619 and 0:07:07.619,0:07:11.770 so we will start off this week with an introduction. 0:07:11.770,0:07:13.860 This is as I said we're going to start from the top 0:07:13.860,0:07:15.749 -and just start working our way down +and then just start working our way down 0:07:15.749,0:07:19.350 so the general thing I'm going to do is to talk about the interface 0:07:19.350,0:07:21.439 %uh which is something that you 0:07:21.439,0:07:25.319 are presumably fairly familiar with since you've worked with that system 0:07:25.319,0:07:27.249 and then 0:07:27.249,0:07:29.739 -sort of layout terminology +you have to sort of layout terminology 0:07:29.739,0:07:32.080 although we use normal english words 0:07:32.080,0:07:34.419 they have 0:07:34.419,0:07:38.580 sometimes rather bizarre meanings compared to their common usage 0:07:38.580,0:07:39.220 and 0:07:39.220,0:07:42.330 -I will just sort of lay out the terminology +so I will just sort of lay out the terminology lay out the 0:07:42.330,0:07:45.750 the way we talk about how the system is structured 0:07:45.750,0:07:50.780 and this week we will also talk about the basic services ""What is it that the kernel is 0:07:50.780,0:07:52.929 providing for us?"" 0:07:52.929,0:07:54.060 and then of course 0:07:54.060,0:07:58.499 we'll proceed to dive down in and and see how that is done 0:07:58.499,0:07:59.970 so here in 0:07:59.970,0:08:01.400 -Week 2 +Week number 2 0:08:01.400,0:08:05.450 -%uh we're gonna look at the system from the +we're gonna look at the system from the perspective of 0:08:05.450,0:08:07.039 something that 0:08:07.039,0:08:08.720 manages processes. 0:08:08.720,0:08:12.170 -One way of looking at the kernel it's really +One way of looking at the kernel is it's really just a 0:08:12.170,0:08:16.440 the resource manager and the resource that -is managing are things going to do with processes +its managing are things going to do with processes 0:08:16.440,0:08:19.460 So we'll look at a process, what the structure of it is 0:08:19.460,0:08:20.649 -%uh and +and 0:08:20.649,0:08:23.559 talk about the different ways that they can be structured. 0:08:23.559,0:08:28.379 Process can for example be an address space and can have one thread running in it can have 0:08:28.379,0:08:29.749 multiple threads running in it. 0:08:29.749,0:08:34.620 -we'll talk about the different ways +so we'll talk about the different ways that we think a process is. 0:08:34.620,0:08:38.480 We will look at the management of those processes 0:08:38.480,0:08:39.239 we've got 0:08:39.239,0:08:42.020 to lay out the bits and pieces that need to be managed 0:08:42.020,0:08:44.660 -%uh and then talk about +and then talk about 0:08:44.660,0:08:47.190 how we do that. 0:08:47.190,0:08:51.740 we'll talk about jails.. this is something that you currently find only in FreeBSD 0:08:51.740,0:08:55.060 hasn't made it into 0:08:55.060,0:08:56.320 Linux yet although 0:08:56.320,0:09:01.630 -%uh the concept is %uh being actively worked +the concept is being actively worked on so my guess is that you'll see that 0:09:01.630,0:09:03.500 -%uh fairly soon. +fairly soon. 0:09:03.500,0:09:06.360 -%uh will also then talk about scheduling +we'll also then talk about scheduling 0:09:06.360,0:09:10.579 which is in essence how we decide what gets -to run, when it gets to run, how long it takes +to run, when it gets to run, how long it gets 0:09:10.579,0:09:13.500 to run, etc. 0:09:13.500,0:09:14.330 okay 0:09:14.330,0:09:19.020 The week after that we will go into virtual memory. 0:09:19.020,0:09:23.800 Signals aren't really part of virtual memory but they didn't fit into next week's 0:09:23.800,0:09:26.400 -material so I just would drop that at the +material so I just would dropped that at the beginning 0:09:26.400,0:09:29.850 but the bulk of Week 3 is going to be 0:09:29.850,0:09:32.019 the management of Virtual Memory. So we've got 0:09:32.019,0:09:35.119 a bunch of physical memory, a bunch of processes that are 0:09:35.119,0:09:37.940 trying to use their address spaces 0:09:37.940,0:09:39.590 and we will talk about 0:09:39.590,0:09:41.410 -essentially how you will make all that work +essentially how you will make that all work 0:09:41.410,0:09:43.510 It's called a virtual memory because it's 0:09:43.510,0:09:47.420 sort of a cheat. We promise you the world and then we deliver you 0:09:47.420,0:09:51.480 as small number of pages as we think we can get away with. 0:09:51.480,0:09:56.420 Okay. So the first three weeks then essentially get us through 0:09:56.420,0:09:58.340 looking at the world as if it was all 0:09:58.340,0:10:00.560 -all about processes +all about processes. 0:10:00.560,0:10:03.880 -and in Week 4 we change gears. we say +Then in Week 4 we change gears. we say okay well you know 0:10:03.880,0:10:07.570 -the kernel isn't just about processes. You can sort of look at it orthogonally -and you can +the kernel isn't just all about processes. You can sort of +look at it orthogonally and you can 0:10:07.570,0:10:10.000 say it's really just a giant I/O switch 0:10:10.000,0:10:12.910 it's just like a traffic cop that's just managing these 0:10:12.910,0:10:14.860 I/O streams 0:10:14.860,0:10:15.450 and 0:10:15.450,0:10:18.610 so let's look at it from that perspective. 0:10:18.610,0:10:19.310 And 0:10:19.310,0:10:24.740 -%uh we'll start with special files, again this -where the interface when you talk about UNIX +we'll start with special files, again this +sort of the interface when you talk about UNIX 0:10:24.740,0:10:25.880 systems, when you talk about 0:10:25.880,0:10:27.950 what's normally /dev 0:10:27.950,0:10:34.170 interface that gets you access to the various I/O streams that are available 0:10:34.170,0:10:37.220 and we'll look at how that's organized and the structure of it 0:10:37.220,0:10:41.840 -%uh which is to be fairly simple but in the +which used to be fairly simple but in the last decade has gotten 0:10:41.840,0:10:43.670 incredibly complicated. 0:10:43.670,0:10:48.540 -We will also talk about sudo terminals in +We will also talk about pseudo terminals in job control 0:10:48.540,0:10:53.330 this is about as interesting as watching the grass grow but unfortunately it's 0:10:53.330,0:10:55.490 a major component of the system 0:10:55.490,0:10:59.520 and especially people that deal with system administration have to know far more about 0:10:59.520,0:11:06.520 this than they probably ever thought they wanted to. 0:11:06.900,0:11:11.430 Okay we will then continue in Week 5 with the kernel I/O structure, 0:11:11.430,0:11:16.090 -%uh We will start with multiplexing of I/O. The -kernel has done this +We will start with multiplexing of I/O. The +kernel of course has done this 0:11:16.090,0:11:17.360 always 0:11:17.360,0:11:22.110 -but we will really talking more about how do +but we're really talking more about how do we export I/O multiplexing to 0:11:22.110,0:11:25.970 user applications. 0:11:25.970,0:11:29.250 We will then move into auto configuration strategy 0:11:29.250,0:11:31.370 Auto configuration 0:11:31.370,0:11:32.770 is what happens 0:11:32.770,0:11:36.619 -and typically or historically I guess you +typically or historically I guess you could say as the system boots. 0:11:36.619,0:11:39.500 so all that stuff that comes out about 0:11:39.500,0:11:40.810 what 0:11:40.810,0:11:43.550 hardwares are on the machine and how it's all interconnected 0:11:43.550,0:11:47.350 all of that is tied up in auto configuration 0:11:47.350,0:11:50.040 and that used to happen just once it boots 0:11:50.040,0:11:52.000 but in modern systems today 0:11:52.000,0:11:55.839 it's an ongoing process. It happens at boot but it also happens 0:11:55.839,0:12:00.550 anytime you plug a new I/O device, a PCMCIA card, 0:12:00.550,0:12:03.680 -you remove a disk or you put in a new disk. +or you remove a disk or you put in a new disk. 0:12:03.680,0:12:07.010 -Any sort of activity that changes the the I/O +or any sort of activity that changes the I/O 0:12:07.010,0:12:08.360 structure of the machine 0:12:08.360,0:12:10.870 -auto configuration has to fired back up +auto configuration has to get fired back up 0:12:10.870,0:12:13.050 and figure out what's disappeared 0:12:13.050,0:12:18.330 and cleanup and figure out what new has arrived -to conongiure it in. +to configure it in. 0:12:18.330,0:12:19.320 and then we'll talk 0:12:19.320,0:12:23.870 a little bit about the configuration of the device driver 0:12:23.870,0:12:27.390 -this actually gets into an area of that +this actually gets into an area that 0:12:27.390,0:12:28.660 is 0:12:28.660,0:12:33.440 one well let me just give it as a bit of advice to the class esspecially those of 0:12:33.440,0:12:36.780 you who work in system administration. 0:12:36.780,0:12:42.010 -You'd really want to be careful that +You really want to be careful that you don't learn too much about device drivers 0:12:42.010,0:12:44.670 because there is really these three things that 0:12:44.670,0:12:48.580 it's not good to learn about and if you do learn about it it's really good to keep it 0:12:48.580,0:12:49.740 to yourself 0:12:49.740,0:12:51.949 because if you become an expert or 0:12:51.949,0:12:54.960 viewed as an expert in any of these areas 0:12:54.960,0:12:59.370 -you will become the designated stocky for -that and your psyche you'll never get to do +you will become the designated stuccy for +that and your site you'll never get to do 0:12:59.370,0:13:01.760 anything 0:13:01.760,0:13:02.610 but that 0:13:02.610,0:13:07.360 -The three things that I highly +so The three things that I highly recommend not learning very much about are 0:13:07.360,0:13:09.060 device drivers, 0:13:09.060,0:13:12.320 send mail configuration files 0:13:12.320,0:13:13.970 or anything having to do 0:13:13.970,0:13:19.350 with LDAP or anything in that general domain 0:13:19.350,0:13:22.660 -%uh because as I say +because as I say 0:13:22.660,0:13:24.900 that will become your life's work 0:13:24.900,0:13:25.920 and 0:13:25.920,0:13:32.920 there's other things that you might find more interesting. ""Do you have a question?"" 0:13:33.870,0:13:36.659 -so one of my students empathized with my point +so one of my students empathizes with my point 0:13:36.659,0:13:39.640 I believe you said you worked on that mail system 0:13:39.640,0:13:43.120 -%uh so you you might know something about -Sum mail configuration files but you don't +so you you might know something about +Sendmail configuration files but you don't 0:13:43.120,0:13:47.850 have to answer that 0:13:47.850,0:13:52.100 -so we're going to talk about what a device -driver does and really just the entry +okay so we're going to talk about what a device +driver does and really just sort of the entry 0:13:52.100,0:13:53.170 points to it 0:13:53.170,0:13:57.180 but we're not going to talk about how you write such a thing, how you debug such a thing 0:13:57.180,0:14:01.490 or much of anything about it. I actually used to teach an entire class believe it or not 0:14:01.490,0:14:02.720 -about the device drivers +about device drivers 0:14:02.720,0:14:05.849 -%uh but then I realized a year i waste +but then I realized the error of my ways and I have since 0:14:05.849,0:14:12.580 -i gone through and made a point of forgetting + gone through and made a point of forgetting every slide in that talk. 0:14:12.580,0:14:16.860 -so then we will move on to Filesystem +okay so then we will move on to File system 0:14:16.860,0:14:21.540 -and as always will start at the high level +and as always we'll start at the high level talk about the interface what is it that is 0:14:21.540,0:14:23.020 exported out of the system 0:14:23.020,0:14:27.840 -%uh and then we will start diving down in sea and +and then we will start diving down in the C and how do we go about implementing that 0:14:27.840,0:14:29.010 -%uh so +so 0:14:29.010,0:14:31.010 -we'll start with that +we'll start with the 0:14:31.010,0:14:32.560 so called 0:14:32.560,0:14:33.680 Block I/O system 0:14:33.680,0:14:36.140 it's historically been called buffer cache 0:14:36.140,0:14:38.590 -and it's still recalled that periodically +and you still hear it called that periodically 0:14:38.590,0:14:42.720 -and the fact that the matter is that there isn't really -about buffer cache anymore,thers is just one big +and the fact of the matter is that there isn't really +about buffer cache anymore, there is just one big 0:14:42.720,0:14:44.620 cache in it.Its the VM cache 0:14:44.620,0:14:47.810 and the Filesystem has a view into it and 0:14:47.810,0:14:50.829 the processes have a view into it but at the end of the day 0:14:50.829,0:14:54.660 you really don't want the same information on two different 0:14:54.660,0:14:56.030 pages of memory 0:14:56.030,0:14:59.390 because that just leads to trouble. 0:14:59.390,0:15:03.390 -But Filesystems think that they have buffers and so -there's been a year where we make +But Filesystems think they have buffers and so +there's this manouver where we make 0:15:03.390,0:15:06.149 these things that look like what historically were buffers 0:15:06.149,0:15:08.830 -that really just happened just really map into VM system +that really just map into VM system 0:15:08.830,0:15:11.720 but they're still managed in the way that they have been 0:15:11.720,0:15:15.020 managed historically 0:15:15.020,0:15:20.670 -We will then get down into Filesystem implementation +okay We will then get down into Filesystem implementation the local file system if you will 0:15:20.670,0:15:23.400 and into also 0:15:23.400,0:15:25.730 soft updates and snapshots. 0:15:25.730,0:15:26.440 -on this + this 0:15:26.440,0:15:31.100 for the time being is something that you see only in FreeBSD 0:15:31.100,0:15:35.310 the alternative to soft updates is journalling which is %uh more commonly used 0:15:35.310,0:15:39.630 for example what is used by ext3 0:15:39.630,0:15:41.179 -so i'll go through soft updates and +and so i'll go through soft updates and 0:15:41.179,0:15:45.260 a lot of the issues in soft updates are the same issues that you have to deal with journalling 0:15:45.260,0:15:48.370 -what is it that we're protecting and how we +what is it that we're protecting and how do we go about doing that 0:15:48.370,0:15:51.150 -and the differences is in the detail. +and the difference is in the detail. 0:15:51.150,0:15:54.630 There is actually a paper in the back to your notes if this is something that interests 0:15:54.630,0:15:55.240 you 0:15:55.240,0:15:59.930 -%uh it's a comparison of journalling versus +it's a comparison of journalling versus soft updates that was done 0:15:59.930,0:16:02.120 about five or eight years ago. 0:16:02.120,0:16:08.460 and not to spoil the punch line but the answers they both work about are the same 0:16:08.460,0:16:12.500 -Okay the snapshots again is something that +Okay snapshots again is something that if 0:16:12.500,0:16:15.920 you've worked with things like the network appilance box you're probably quite 0:16:15.920,0:16:19.640 aware of what snapshots are and how they do or don't work for you 0:16:19.640,0:16:21.959 -this is this the same functionality +this is the same functionality 0:16:21.959,0:16:27.380 -%uh in the Filesystem implemented in a +in the Filesystem implemented in a somewhat different way 0:16:27.380,0:16:28.449 -%uh so this +okay so this 0:16:28.449,0:16:31.940 -that Week 6 is really going to be the local +Week 6 is really going to be the local file system 0:16:31.940,0:16:34.750 -the disk connected to the machine you work. +the disk connected to the machine +that we are dealing with. 0:16:34.750,0:16:39.140 Week 7 then we get into multiple Filesystem support so how do we abstract out that 0:16:39.140,0:16:41.190 Filesystem layer 0:16:41.190,0:16:46.430 and support Multiple Filesystems at the same time so for example in FreeBSD 0:16:46.430,0:16:50.199 you can of course run with their traditional fast Filesystem 0:16:50.199,0:16:54.540 but if you happen to like the Linux Filesystem better or you have to share a disk 0:16:54.540,0:16:55.690 with a Linux machine 0:16:55.690,0:16:58.310 you can run the ext2 or ext3 0:16:58.310,0:17:01.020 -%uh and it will perfectly happily do that +and it will perfectly happily do that 0:17:01.020,0:17:01.620 so 0:17:01.620,0:17:05.589 we will have to look then at how do we provide interface so that we can plug in all these different 0:17:05.589,0:17:09.260 Filesystems that we want to support 0:17:09.260,0:17:12.250 another area of which there's been a great 0:17:12.250,0:17:15.309 -deal of growth at least in coding complexity +deal of growth at least in code complexity 0:17:15.309,0:17:17.840 is so-called Volume Management 0:17:17.840,0:17:19.370 -%uh so in the +so in the 0:17:19.370,0:17:24.480 good old days a Filesystem lived on a disk or piece of disk and that was that 0:17:24.480,0:17:26.130 -but this day and age +but in this day and age 0:17:26.130,0:17:31.150 that won't do any more so we aggregate disks together by striping them or RAID 0:17:31.150,0:17:31.980 arraying them 0:17:31.980,0:17:33.380 -and we need such really things +or various other things 0:17:33.380,0:17:39.210 and we need a whole layer in the system just to manage those disks 0:17:39.210,0:17:44.280 we'll then get to the as an example of an alternative Filesystem we're going to talk about the 0:17:44.280,0:17:46.530 Network Filesystem or NFS 0:17:46.530,0:17:48.500 but that's not because this is 0:17:48.500,0:17:51.090 the world's best remote file system 0:17:51.090,0:17:55.240 -or the cleanest design or any of the thing +or the cleanest design or any of the properties you might hope that 0:17:55.240,0:17:57.049 -such a class is this one would have +such a class as this one would have 0:17:57.049,0:17:58.600 but it's ubiquitous 0:17:58.600,0:18:00.210 very widely used 0:18:00.210,0:18:01.350 and 0:18:01.350,0:18:06.850 -we're going to talk about that one +so we're going to talk about that one 0:18:06.850,0:18:07.740 -we'll +okay we'll 0:18:07.740,0:18:10.970 -then once again switch gears on Week 8 +then once again switch gears in Week 8 0:18:10.970,0:18:17.120 and turn our attention to of Networking and Interprocess communication 0:18:17.120,0:18:18.200 and 0:18:18.200,0:18:23.210 again we'll start from the very top so we'll go through, we'll go with concepts, the terminology 0:18:23.210,0:18:24.450 that gets used 0:18:24.450,0:18:30.230 -and what's difference between domain +and what's the difference between domain based addressing and an address domain you know 0:18:30.230,0:18:30.910 we'll go through 0:18:30.910,0:18:34.910 -well what the basic IPC services are, + what the basic IPC services are, 0:18:34.910,0:18:39.080 -essentially what all the system calls that -has anything to do with networking +essentially what are all the system calls that +have anything to do with networking 0:18:39.080,0:18:40.590 and 0:18:40.590,0:18:43.720 just sort of describe what each of them are and I'm going to go through 0:18:43.720,0:18:45.830 a somewhat contrived example 0:18:45.830,0:18:49.840 -it makes use of every one of those interfaces +that makes use of every one of those interfaces 0:18:49.840,0:18:52.860 -and just to show how they all conected +and just to sort of show how they all connect together 0:18:52.860,0:18:54.169 and for those of you that work 0:18:54.169,0:18:57.400 in networking or had done any kind of network programming 0:18:57.400,0:19:00.480 -if you're looking for a week to miss and this +if you're looking for a week to miss and the Week 8 is the one to miss that's 'cause that's 0:19:00.480,0:19:02.780 the sort of most basic 0:19:02.780,0:19:04.210 lecture that I'm going to give 0:19:04.210,0:19:07.910 If you are not sure whether or not you need to go through that, there is 0:19:07.910,0:19:09.540 one of the papers in the back 0:19:09.540,0:19:12.620 it is an introduction to Interprocess communication 0:19:12.620,0:19:18.279 -%uh read that paper if you say yeah yeah yeah +read that paper if you say yeah yeah yeah yeah yeah you are done with Week 8. 0:19:18.279,0:19:20.590 on the other hand if you dont come to Week 8 0:19:20.590,0:19:22.790 and then in Week 9 I say 0:19:22.790,0:19:26.860 I call on you and say alright what is it 0:19:26.860,0:19:30.560 that listen system call does and you can't tell me 0:19:30.560,0:19:32.610 you're gonna get a demerit 0:19:32.610,0:19:34.340 okay 0:19:34.340,0:19:37.770 then in Week 9 we will get into the actual 0:19:37.770,0:19:41.419 networking implementation itself, we go through system layers as we did 0:19:41.419,0:19:43.310 in all the other areas 0:19:43.310,0:19:44.130 and 0:19:44.130,0:19:48.330 we will spend a significant portion of that class talking about routing 0:19:48.330,0:19:50.230 -%uh routing +routing 0:19:50.230,0:19:53.610 for those of you that haven't had the pleasure of dealing with it 0:19:53.610,0:19:55.540 -is a black heart +is a black art 0:19:55.540,0:19:58.050 or at least a dark science 0:19:58.050,0:19:59.170 and 0:19:59.170,0:19:59.930 so 0:19:59.930,0:20:02.490 we'll talk about it 0:20:02.490,0:20:06.270 -from the perspective first of all to what +from the perspective first of all of what do we do locally within the machine 0:20:06.270,0:20:10.090 and then what are some of the bigger strategies that we can use for doing routing 0:20:10.090,0:20:11.910 -%uh enterprise +enterprise 0:20:11.910,0:20:14.840 wide routing or 0:20:14.840,0:20:20.190 -area wide routing some like throughout the -state of California or throughout US whatever +area wide routing something like throughout the +state of California or throughout the US whatever 0:20:20.190,0:20:25.379 this again like device drivers is really just sort of a nickel 0:20:25.379,0:20:26.480 -%uh throught the dark - -0:20:26.480,0:20:27.800 +tour through the 0:20:27.800,0:20:31.820 -what what the choices are what that the basic +what the choices are what that the basic strategies are that are used 0:20:31.820,0:20:33.989 If you're thinking you're going to walk out of here 0:20:33.989,0:20:36.110 knowing how to set up a routing well sorry 0:20:36.110,0:20:38.430 we are not going to get that far 0:20:38.430,0:20:41.559 but you should at least have a pretty good idea of what the issues are 0:20:41.559,0:20:44.430 and what the general solutions are 0:20:44.430,0:20:48.950 -then finally in Week 10 well not finally +okay then finally in Week 10 well not finally but next few weeks and 0:20:48.950,0:20:52.380 we will go through the Internet Protocols 0:20:52.380,0:20:54.320 primarily TCP/IP 0:20:54.320,0:20:56.560 and this is 0:20:56.560,0:20:58.809 what are the algorithms that are used 0:20:58.809,0:21:01.030 and I'm putting a particular emphasis 0:21:01.030,0:21:03.050 for this particular class 0:21:03.050,0:21:05.080 on 0:21:05.080,0:21:07.730 changes that have been made in the protocols 0:21:07.730,0:21:14.310 -to deal with a lot of attacks that -we've been seeing SYN attacks and +to deal with a lot of the sort of attacks that +we've been seeing the SYN attacks and 0:21:14.310,0:21:16.880 that sort of thing 0:21:16.880,0:21:19.440 rather than just a straight 0:21:19.440,0:21:22.440 iteration of what the the actual protocols are 0:21:22.440,0:21:24.940 i'll talk primarily about IPv4 0:21:24.940,0:21:31.940 -%uh but I will also try and talk a bit about +but I will also try and talk a bit about IPv6 as well 0:21:33.510,0:21:35.850 -so the first ten weeks are +all right so the first ten weeks are 0:21:35.850,0:21:38.100 -sort of kernel course +sort of the kernel course 0:21:38.100,0:21:40.800 -now back with two weeks on at the end +now we attack two weeks at the end 0:21:40.800,0:21:42.010 to talk about 0:21:42.010,0:21:43.990 -through the bigger picture of +sort of the bigger picture of 0:21:43.990,0:21:48.240 System Tuning,Crash dump analysis that level of thing 0:21:48.240,0:21:52.940 -The idea is really to consolidate what +The idea is to really consolidate what we figured out or talked about in the first 0:21:52.940,0:21:54.710 ten weeks and 0:21:54.710,0:21:58.760 -how that applies to tools that are available +how that applies to tools that we have available to us to 0:21:58.760,0:22:00.760 look at what the system is doing, 0:22:00.760,0:22:02.649 -to analyze what the system is doing + analyze what the system is doing 0:22:02.649,0:22:03.650 and hopefully 0:22:03.650,0:22:04.720 -improves +improve 0:22:04.720,0:22:07.130 the performance of what the system is doing 0:22:07.130,0:22:07.750 and 0:22:07.750,0:22:12.169 -for the most part the kind of tuning I'm +for the most part the kind of tuning that I'm talking about is not 0:22:12.169,0:22:14.740 going in and hack hack hacking your kernel 0:22:14.740,0:22:16.510 because the fact that the matter is 0:22:16.510,0:22:18.600 -you can't do that anyway +most of the time you can't do that anyway 0:22:18.600,0:22:22.340 -%uh so it's more looking at it from the perspective +so it's more looking at it from the perspective of saying 0:22:22.340,0:22:26.390 is this system running badly because it doesn't have enough memory on it? 0:22:26.390,0:22:29.470 or is it running badly because there isn't enough I/O capacity? 0:22:29.470,0:22:33.549 -or is it running badly because the it's got +or is it running badly because it's got enough I/O capacity but 0:22:33.549,0:22:35.940 certain drives are being overloaded 0:22:35.940,0:22:37.309 or is it 0:22:37.309,0:22:42.220 being overrun because we're simply trying to do too much on this machine?,etc. 0:22:42.220,0:22:45.440 so that's the sort of level of thing that we're looking at it 0:22:45.440,0:22:47.080 but tied into 0:22:47.080,0:22:52.130 lot of concepts that we talked before so we can talk about active virtual memory 0:22:52.130,0:22:53.710 and what that means 0:22:53.710,0:22:55.120 and 0:22:55.120,0:22:58.750 essentially measure what it is and hopefully -then you will understand the context of what +then you will understand in the context of what 0:22:58.750,0:23:00.690 we talked about in the VM section 0:23:00.690,0:23:03.990 what that really means 0:23:03.990,0:23:07.460 -the Crash dump analysis is is one of these +the Crash dump analysis is one of these topics that 0:23:07.460,0:23:08.730 you are gonna love or hate 0:23:08.730,0:23:12.530 -%uh you actually have to deal with crashed +you actually have to deal with crashed dumps 0:23:12.530,0:23:13.679 its people find it invaluable 0:23:13.679,0:23:15.580 and if you don't have to deal with Crash dumps 0:23:15.580,0:23:18.790 it's an incredible mass of boring detail 0:23:18.790,0:23:23.240 the only good part of it is that that's the -whole session is only about an hour or long +whole session is only about an hour long 0:23:23.240,0:23:25.529 If it interests you, listen closely 0:23:25.529,0:23:28.950 and if it bores you, well, its only an hour long 0:23:28.950,0:23:32.880 -okay up lastly we'll talk a little bit about +okay lastly we'll talk a little bit about security issues 0:23:32.880,0:23:36.250 -again this is really more of the tools that +again this is really more to the tools that are available 0:23:36.250,0:23:40.750 to deal with security staff as opposed to a complete tutorial on 0:23:40.750,0:23:45.120 how to implement security so those of you that deal with security 0:23:45.120,0:23:48.400 -it's just gonna to be sort of security one on +this is just gonna to be sort of security one oh one 0:23:48.400,0:23:50.029 -%uh for those of you +for those of you 0:23:50.029,0:23:51.500 that have but 0:23:51.500,0:23:54.399 you'll have to deal with it but haven't really thought about it 0:23:54.399,0:23:58.549 -%uh it'll probably scare you to death and -you wonder have to keep the machines from +it'll probably scare you to death and +you wonder how to keep the machines from 0:23:58.549,0:24:02.840 being hijacked everyday 0:24:02.840,0:24:08.030 -Okay that's in essence what we're going +Okay so that's in essence what we're going to try and do here 0:24:08.030,0:24:15.030 anybody have any comments, questions, thoughts. -Alright, no, well. +No? All right well. 0:24:16.130,0:24:17.840 Let's get started 0:24:17.840,0:24:22.180 we will be begin on page fifteen with an overview of the kernel. 0:24:22.180,0:24:26.040 Hopefully nobody's lost yet. 0:24:26.040,0:24:29.310 -What's a kernel? Alright. +What's a kernel? All right. 0:24:29.310,0:24:31.370 so starting at the very top 0:24:31.370,0:24:33.070 the big broad brush 0:24:33.070,0:24:35.140 what we have is 0:24:35.140,0:24:38.330 a UNIX virtual machine and 0:24:38.330,0:24:41.660 -and virtual machines are actually something + virtual machines are actually something that has been around 0:24:41.660,0:24:44.539 as a concept since the sixties 0:24:44.539,0:24:48.919 -the diffrence is really just sort of the level + difference is really just sort of the level of the interface that people have dealt with 0:24:48.919,0:24:51.360 when they talk about Virtual Machines 0:24:51.360,0:24:53.610 in the 1960s 0:24:53.610,0:24:56.770 computers were these enormous things you would have 0:24:56.770,0:24:58.870 -your computer room would be something that be +your computer room would be something that'd be 0:24:58.870,0:25:01.909 three times the size of this conference room if you had 0:25:01.909,0:25:03.230 a computer 0:25:03.230,0:25:05.530 -the computer itself was this +the computer itself was 0:25:05.530,0:25:07.840 tall as a refrigerator freezer 0:25:07.840,0:25:08.950 imagine 0:25:08.950,0:25:13.909 five or eight or ten of these units side by side that itself made up the computer 0:25:13.909,0:25:16.080 -that would be one +that would be one big 0:25:16.080,0:25:20.030 for the core processor and the one which should be the floating point unit and several 0:25:20.030,0:25:24.080 -of them that would be the memory the core -literally +of them that would be the memory the core momory +literally the core memory 0:25:24.080,0:25:29.110 -%uh and then they'd be other rows of these -disk drives about the size of a washing +and then they'd be other rows of these +disk drives which were about the size of the washing 0:25:29.110,0:25:29.660 machine 0:25:29.660,0:25:34.169 -%then behind that since you couldn't store -everything on disk so +and then behind that since you couldn't store +everything on disks so 0:25:34.169,0:25:36.300 -that you had rows of tape drives +then you had rows of tape drives 0:25:36.300,0:25:37.880 and then you had this little 0:25:37.880,0:25:39.610 set of sort of 0:25:39.610,0:25:43.330 munchkins that would run around and and tend -to the machine and they mount tapes and take +to the machine and they'd mount tapes and take 0:25:43.330,0:25:46.710 off tapes and mount disc packs and remove disc packs because 0:25:46.710,0:25:49.760 the drives themselves were very expensive and so 0:25:49.760,0:25:53.110 you wouldn't just as today we have a 0:25:53.110,0:25:56.090 one spindle that was dedicated just to one set of platters 0:25:56.090,0:25:57.130 you could take out a 0:25:57.130,0:25:59.460 set of platters and put in another 0:25:59.460,0:26:02.540 -hundred megabytes of platters and these are +hundred megabytes set of platters and these are platters that are 0:26:02.540,0:26:05.280 this big around and it's like six or eight of them and 0:26:05.280,0:26:09.140 -a giant head assemblies they comes rumbling in and + giant head assemblies they comes rumbling in and out 0:26:09.140,0:26:12.440 anyway one of these giant giant machines 0:26:12.440,0:26:17.380 that costs many millions of dollars would run at about ten 0:26:17.380,0:26:21.120 million instructions per second, 10 mips 0:26:21.120,0:26:21.630 and 10 mips 0:26:21.630,0:26:28.330 -that's was more computing power than anybody + was more computing power than anybody could possibly imagine using in a single application 0:26:28.330,0:26:28.880 just 0:26:28.880,0:26:31.050 -by contrast this this +by contrast you know this 0:26:31.050,0:26:34.070 four-year-old laptop here is probably on the order of 0:26:34.070,0:26:36.440 one or two hundred mips 0:26:36.440,0:26:37.140 but anyway 0:26:37.140,0:26:40.760 people couldn't really view what we would do with a lot of computing power 0:26:40.760,0:26:44.640 and the other thing was that you didn't have -a notion of sort of operating system that had +a notion of sort of an operating system that had 0:26:44.640,0:26:45.890 applications running on it 0:26:45.890,0:26:46.760 because 0:26:46.760,0:26:50.160 everybody wanted to write straight to the raw hardware 0:26:50.160,0:26:51.750 and so 0:26:51.750,0:26:55.900 -IBM who was a big manufacturer +what IBM who was a big manufacturer of machines in those days 0:26:55.900,0:26:59.060 did what they came up with this thing called the VM 0:26:59.060,0:27:00.770 and this was a little 0:27:00.770,0:27:02.549 you'd call an operating system really 0:27:02.549,0:27:05.130 -but what it did is a cloned +but what it did is it cloned 0:27:05.130,0:27:09.270 -independent copies of the machine worked just -like the original machines you could boot +independent copies of the machine that worked just +like the original machines so you could boot 0:27:09.270,0:27:11.769 -something that thought it was an operating +something that you thought it was an operating system 0:27:11.769,0:27:13.380 on top of VM 0:27:13.380,0:27:16.750 -so you take one least ten that machines and +so you take one least ten mip machines and it would clone 0:27:16.750,0:27:20.050 six identical one mip copies 0:27:20.050,0:27:22.030 -%uh and then you could boot +and then you could boot 0:27:22.030,0:27:24.700 whatever you wanted on each one of those machines so 0:27:24.700,0:27:29.510 -if you were doing database that you do your -database because database cannot run on the raw hardware +if you were doing database stuff you would boot your +database because database cannot ran on the raw hardware 0:27:29.510,0:27:32.920 or if you're doing payroll who would boot up the payroll program 0:27:32.920,0:27:37.950 -%uh or if you actually tried to service the +or if you actually tried to service users you could boot a time sharing batch thing 0:27:37.950,0:27:40.790 that would read card images and print stuff out 0:27:40.790,0:27:44.460 or they even had TSO the Time Sharing Option where you could interactively sit 0:27:44.460,0:27:45.559 -and type send +and type and send 0:27:45.559,0:27:47.560 stuffs in and get answers back 0:27:47.560,0:27:48.570 -%uh and + and 0:27:48.570,0:27:51.429 -%uh also you could boot TSO so whatever set +also you could boot TSO so whatever set of 0:27:51.429,0:27:52.219 -%um + 0:27:52.219,0:27:55.339 things you need you could boot them and they ran independently as if they were running on their 0:27:55.339,0:27:56.470 own machine 0:27:56.470,0:28:03.150 but all the VM did was it give you an exact raw copy of the hardware 0:28:03.150,0:28:04.529 so when UNIX came along 0:28:04.529,0:28:07.350 -they sort of like the notion of +they sort of liked the notion of 0:28:07.350,0:28:11.509 providing the concept of independent things that you could operate in 0:28:11.509,0:28:13.610 but they wanted it at a higher level 0:28:13.610,0:28:15.610 -so you're looking merely to do that +so you're looking really to do it 0:28:15.610,0:28:17.480 instead of at the raw hardware level 0:28:17.480,0:28:19.679 -to do it at a process well +to do it at a process level 0:28:19.679,0:28:23.799 and the idea that then was that the interface you would program to would be what we think of as 0:28:23.799,0:28:26.090 a System call interface today 0:28:26.090,0:28:27.849 and the idea then was that 0:28:27.849,0:28:30.740 you would be given a process or set of processes 0:28:30.740,0:28:34.990 -and those were independent your process +and those were independent. your process couldn't affect 0:28:34.990,0:28:38.830 -the address space of another process reach -over and mess around with the addresses, +the address space of another processor. You couldn't reach +over and mess around with their addresses, 0:28:38.830,0:28:41.030 you couldn't mess around with their I/O channels 0:28:41.030,0:28:43.179 -%uh you could slow them down by +you could slow them down by 0:28:43.179,0:28:44.299 being a pig but 0:28:44.299,0:28:47.980 that was about the only way that you could affect other processes 0:28:47.980,0:28:48.480 and 0:28:48.480,0:28:49.830 -%uh so +so 0:28:49.830,0:28:52.669 what the interfaces that they had there 0:28:52.669,0:28:58.660 -with one that had these characteristics -he had a a paged virtual address space +was one that had these characteristics + had a a paged virtual address space 0:28:58.660,0:29:02.980 so you din't have to know as in the old days how much physical memory is on the machine and make your application 0:29:02.980,0:29:04.740 fit into that amount of memory 0:29:04.740,0:29:07.950 you just had what looked like a large 0:29:07.950,0:29:11.710 uniform address space even if the underlying hardware had segments or some other 0:29:11.710,0:29:13.580 hardware brain damage 0:29:13.580,0:29:17.390 -it look to you like he just had a big uniform +it looked to you like he just had a big uniform address space and 0:29:17.390,0:29:21.070 -the size of the address space was independent -of the amount of memory that was on the machine +the size of your address space was independent +of the amount of memory that was on your machine 0:29:21.070,0:29:23.900 -your address space could be bigger than amount of +your address space couldn't be bigger than amount of physical memory 0:29:23.900,0:29:26.499 -cause we got to move pages around underneath +cause we sort of move pages around underneath 0:29:26.499,0:29:29.320 whatever part address space was actually active 0:29:29.320,0:29:34.260 -that is obviously do this if you if -you are trying to run 1 gigabyte of +and there's obviously limits to this if +you are trying to run a 1 gigabyte of 0:29:34.260,0:29:35.630 application on top of 0:29:35.630,0:29:37.240 ten megabytes of memory 0:29:37.240,0:29:40.880 it's probably going to bring new meaning to same day service 0:29:40.880,0:29:45.519 but if you're willing to wait long enough it will eventually move the pages around and you will 0:29:45.519,0:29:49.740 progress through getting your application run 0:29:49.740,0:29:53.890 -anothe thing was dealing with software +another thing was dealing with software interrupts 0:29:53.890,0:29:55.789 -%uh in the old days +in the old days 0:29:55.789,0:29:58.749 you had to understand how the hardware worked 0:29:58.749,0:30:03.900 in order to deal with exceptional conditions -so for example to did a divide by zero +so for example if you did a divide by zero 0:30:03.900,0:30:08.170 -the the hardware would have jumped to some +the hardware would jump through some vector location or 0:30:08.170,0:30:08.630 something 0:30:08.630,0:30:12.799 -and you had no khow how that worked and make +and you had know how that worked and make sure that you had your program 0:30:12.799,0:30:16.510 -use just a little bit of assembly language which +usually some little bit of assembly language set up to deal with that 0:30:16.510,0:30:19.870 and UNIX said let's let's get away from the hardware here 0:30:19.870,0:30:22.080 and so they did this thing called signals 0:30:22.080,0:30:25.700 -the answer is, the finest of the signals is that +and so they just define a set of the signals is that if you do divide by zero 0:30:25.700,0:30:29.529 -%uh you simply register a routine you +you simply register a routine you want to have called you don't have to know 0:30:29.529,0:30:31.220 how the hardware figured it out 0:30:31.220,0:30:36.740 you just know that that routine is going to get called and you can deal with it at that point 0:30:36.740,0:30:40.960 well we got set of timers and counters to keep track of what we're doing, this is really more 0:30:40.960,0:30:43.490 for counting than anything else but 0:30:43.490,0:30:46.970 applications may want to have access to that. 0:30:46.970,0:30:51.720 we have a set of identifiers that we're going to use for things like accounting, 0:30:51.720,0:30:54.830 protection and scheduling and so on 0:30:54.830,0:30:55.820 and one of the 0:30:55.820,0:31:00.320 -the early philosophies of UNIX was that to try +the early philosophies of UNIX was to try and keep it simple. 0:31:00.320,0:31:02.630 operating systems have gotten very baroque 0:31:02.630,0:31:04.490 in particular the thing that 0:31:04.490,0:31:07.350 pre dated UNIX was a thing called Multix 0:31:07.350,0:31:12.820 -%uh Multix was was a joint project between +Multix was was a joint project between Honeywell, a big computer manufacturer of the 0:31:12.820,0:31:15.740 -time at +time 0:31:15.740,0:31:17.129 AT&T bell laboratories 0:31:17.129,0:31:19.750 the big industrial labratory at that time 0:31:19.750,0:31:21.380 and MIT 0:31:21.380,0:31:23.430 a big university then and 0:31:23.430,0:31:24.690 still today 0:31:24.690,0:31:29.259 -%uh and that those three organizations got +and those three organizations got together to try and build this 0:31:29.259,0:31:31.400 time sharing operating system 0:31:31.400,0:31:32.280 and it 0:31:32.280,0:31:33.770 it just got bigger and 0:31:33.770,0:31:37.160 more grandiose and more complex and never finished 0:31:37.160,0:31:38.979 -but as soon as that's what we see +because as soon as they sort of see 0:31:38.979,0:31:42.709 -although we know how to do that but also we could -do this other thing too and so then the teared it +oh we know how to do that but we could +do this other thing too and so then they would tear it 0:31:42.709,0:31:43.429 apart and 0:31:43.429,0:31:46.440 they never really got to something that 0:31:46.440,0:31:48.210 could be put into production 0:31:48.210,0:31:49.919 and so the 0:31:49.919,0:31:50.570 AT&T 0:31:50.570,0:31:54.340 Bell laboratories decided to pull out of that project 0:31:54.340,0:31:55.940 and 0:31:55.940,0:32:00.000 the two of the people that had been working on that project, Ken Thompson and Dennis Richie 0:32:00.000,0:32:04.390 -%uh were sort of bound because they were now +were sort of bummed because they were now back to typing cards and putting them through 0:32:04.390,0:32:05.259 -card reader and +card readers and 0:32:05.259,0:32:07.960 -they are just used to the idea that you could +they had gotten used to the idea that you could actually 0:32:07.960,0:32:11.559 -sit at an ASSR teletype and interact +sit at an ASSR33 teletype and interact with your computer 0:32:11.559,0:32:13.440 and so 0:32:13.440,0:32:18.230 -they found an old %uh PDP-8 soon off in -the quarter that have been abandoned +they found an old %uh PDP-8 sitting off in +the corner that had been abandoned 0:32:18.230,0:32:22.120 and started working on this little tiny operating system which they called UNIX 0:32:22.120,0:32:26.549 -%uh which eventually moved to the PDP-11 and +which eventually moved to the PDP-11 and became what we have today 0:32:26.549,0:32:28.050 but because it was 0:32:28.050,0:32:32.120 they were coming first of all from Multix where everything had been done and 0:32:32.120,0:32:34.110 in great grandiose detail 0:32:34.110,0:32:37.549 -and because they're fundamentally just two -the of them working on it and they wanted to get something +and because they're fundamentally were two + of them working on it and they wanted to get something 0:32:37.549,0:32:38.370 done and 0:32:38.370,0:32:40.130 within a year or so 0:32:40.130,0:32:41.529 one of their philosophies was 0:32:41.529,0:32:44.099 -let's find out one way of doing things +let's find the one way of doing things 0:32:44.099,0:32:48.180 let's not have eight ways from Sunday let's just get the one way 0:32:48.180,0:32:53.860 -and and that's what we will provide. So what is +and that's what we will provide. So what is the sort of core set of things that we need. 0:32:53.860,0:32:58.620 well first thing is when it comes to identifiers, let's not have you know 0:32:58.620,0:33:00.430 eighty thousand different identifiers 0:33:00.430,0:33:03.140 so they came up with process identifiers, 0:33:03.140,0:33:09.620 user identifier and at that time a single group identifier and later expanded 0:33:09.620,0:33:14.200 -and they used that sort of identifies for everything -so its used for counting, used for main +and they used that sort of identifiers for everything +so its used for counting, used for making 0:33:14.200,0:33:17.410 protection decisions, used for scheduling decisions 0:33:17.410,0:33:19.470 and 0:33:19.470,0:33:24.279 again it was the simplicity of thing which was what was driving their decision 0:33:24.279,0:33:28.840 -but they're really sort of true key idea +but they're really sort of two key ideas that they had 0:33:28.840,0:33:30.880 -that really made a difference that +that really made the difference that 0:33:30.880,0:33:32.539 -that's were set them up side +that's what set them up side 0:33:32.539,0:33:34.749 -from what everybody else done before them +from what everybody else had done before them 0:33:34.749,0:33:35.450 and which 0:33:35.450,0:33:39.740 in retrospect is something that has been pervasive more or less ever since 0:33:39.740,0:33:41.869 the first of these was the notion 0:33:41.869,0:33:44.840 -that we have a unique descriptive space +that we have a unique descriptor space 0:33:44.840,0:33:46.289 -%uh that is +that is 0:33:46.289,0:33:51.250 given a descriptor it can reference any I/O device 0:33:51.250,0:33:53.650 -or even any kind of I/O channel +so or even any kind of I/O channel 0:33:53.650,0:33:58.270 so you can have a descriptor for terminal -or descriptor for file or descriptive for +or descriptor for a file or descriptive for 0:33:58.270,0:34:02.240 -a disk or descriptor for pipe or descriptor +a disk or descriptor for a pipe or descriptor for a socket 0:34:02.240,0:34:03.500 and 0:34:03.500,0:34:04.790 you don't need to know 0:34:04.790,0:34:07.940 what it references in order to be able to read -and write on that thing +and write that thing 0:34:07.940,0:34:11.290 so if i hand you a descriptor -can read from that the descriptor or you can write +you can read from that the descriptor or you can write 0:34:11.290,0:34:13.259 to that descriptor 0:34:13.259,0:34:15.189 and 0:34:15.189,0:34:17.359 the correct thing will happen 0:34:17.359,0:34:19.089 and you'd say well 0:34:19.089,0:34:23.629 -that's obvious I mean how else could you -possibly think about doing it +that's so obvious I mean how else could you +possibly think of doing it? 0:34:23.629,0:34:25.179 -predating UNIX +well predating UNIX 0:34:25.179,0:34:28.059 everything was done with 0:34:28.059,0:34:29.379 a little subsystem 0:34:29.379,0:34:33.419 that would open a file, read a file, write a file, close a file 0:34:33.419,0:34:37.429 and there was another set of system calls which -would open a terminal,read a terminal, write terminal +would open a terminal,read a terminal, write terminal, 0:34:37.429,0:34:38.089 -,close terminal +close terminal 0:34:38.089,0:34:39.210 and yet another one 0:34:39.210,0:34:42.409 which was create a pipe,read a pipe, write a pipe and so on. 0:34:42.409,0:34:47.699 -so if you are just dropped at a stupid -program like CAD +so if you are just a drop dead stupid +program like say CAD 0:34:47.699,0:34:51.579 you would have to have code in there and say was my input a terminal which in case I need to 0:34:51.579,0:34:53.159 use the read terminal 0:34:53.159,0:34:57.419 or is it a file which in case i need to use read file or is it a pipe in which in case 0:34:57.419,0:34:59.189 i need to use read pipe 0:34:59.189,0:35:01.860 and so the program itself had to have all this 0:35:01.860,0:35:02.859 coding in it 0:35:02.859,0:35:04.409 whereas when they went to 0:35:04.409,0:35:07.159 the uniform descriptor space 0:35:07.159,0:35:09.630 -CAD doesn't know and doesn't need to know +CAD doesn't know it doesn't need to know it just says 0:35:09.630,0:35:10.819 read my input, 0:35:10.819,0:35:13.979 write the output 0:35:13.979,0:35:17.059 -it works and we add a new type of descriptor +and it works and we add a new type of descriptor 0:35:17.059,0:35:17.600 and 0:35:17.600,0:35:21.700 CAD just continues to work just as it always did. 0:35:21.700,0:35:24.199 So this proved to be a very powerful construct 0:35:24.199,0:35:27.019 and pretty much every operating system after UNIX 0:35:27.019,0:35:28.659 -did that and there's +did that there's 0:35:28.659,0:35:30.210 one exception of %uh 0:35:30.210,0:35:32.549 large company in the Pacific North-West 0:35:32.549,0:35:35.830 that still has not quite uniform descriptor space 0:35:35.830,0:35:38.380 but %uh that's part of their legacy that really 0:35:38.380,0:35:39.900 they're working on that. 0:35:39.900,0:35:42.009 Longhorn will be here. 0:35:42.009,0:35:43.939 and anyway 0:35:43.939,0:35:46.190 -this set of facilities +this set of facilities then 0:35:46.190,0:35:50.150 makes up the UNIX virtual machine 0:35:50.150,0:35:51.559 and 0:35:51.559,0:35:55.559 -in sometimes we still see virtual machines +in some sense we still see virtual machines being used today in fact we're seeing sort 0:35:55.559,0:35:56.749 of a reversion 0:35:56.749,0:36:01.429 -%uh back to some of the ideas stop in things +back to some of the IBM stuff in things like the VMware 0:36:01.429,0:36:03.079 which is 0:36:03.079,0:36:07.029 essentially allow you to go back to booting native operating systems again so sort of 0:36:07.029,0:36:08.280 interesting to watch 0:36:08.280,0:36:09.060 -that's the sort of +that the sort of 0:36:09.060,0:36:12.919 -%uh %uh pendulum of back going back and forth +pendulum of back going back and forth of what's the correct layer 0:36:12.919,0:36:14.609 for for doing 0:36:14.609,0:36:18.890 -%uh virtual machines +virtual machines 0:36:18.890,0:36:22.499 -Okay. so far so good. +Okay? so far so good? 0:36:22.499,0:36:24.719 -all right i said there was +all right so i said that there were 0:36:24.719,0:36:27.160 two key ideas that UNIX had 0:36:27.160,0:36:30.279 -the first thing is uniform descriptor +the first of these being the uniform descriptor space 0:36:30.279,0:36:35.819 the second one which was really critical was this notion of processes as a commodity 0:36:35.819,0:36:37.309 item 0:36:37.309,0:36:40.220 -so here on Page 17 I tried to lay +so here on Page 17 I've tried to lay it out 0:36:40.220,0:36:41.090 the 0:36:41.090,0:36:44.159 that the components that make up a process 0:36:44.159,0:36:45.759 -%uh and +and 0:36:45.759,0:36:50.359 what do I really mean when I say a process as a commodity item 0:36:50.359,0:36:53.650 -leading up to +okay leading up to 0:36:53.650,0:36:54.689 UNIX 0:36:54.689,0:36:56.800 the systems that pre-dated it, 0:36:56.800,0:36:59.200 processes were these very large 0:36:59.200,0:37:02.169 -heavyweight expensive thing +heavyweight expensive things 0:37:02.169,0:37:02.779 and 0:37:02.779,0:37:04.539 if you look at 0:37:04.539,0:37:08.629 MVS which was the operating system that ran on IBM for doing multiple processing 0:37:08.629,0:37:10.509 and 0:37:10.509,0:37:13.799 the system administrator would decide at boot time 0:37:13.799,0:37:17.019 what degree of multiprocessing they wish to support 0:37:17.019,0:37:18.140 so they'd say well 0:37:18.140,0:37:20.739 -well, let upto six things happen at once +well, we'll let upto six things happen at once 0:37:20.739,0:37:22.490 and so as part of booting up 0:37:22.490,0:37:24.419 they would create six 0:37:24.419,0:37:25.349 processes 0:37:25.349,0:37:30.059 and now you as a user if you wanted to do something let's say you wanted to 0:37:30.059,0:37:32.009 -compile and ran a program +compile and run a program 0:37:32.009,0:37:34.960 -%uh you would be given a process +you would be given a process 0:37:34.960,0:37:36.019 -and it's up to you +and it was up to you 0:37:36.019,0:37:39.369 to figure out how to stage what you needed done 0:37:39.369,0:37:39.819 and 0:37:39.819,0:37:43.930 -%uh that this was often fairly complex +that this was often fairly complex 0:37:43.930,0:37:47.880 and so you would have to write out all the steps that you wanted 0:37:47.880,0:37:50.300 in this wonderful thing called JCL 0:37:50.300,0:37:52.259 -Job Control Language and +Job Control Language. 0:37:52.259,0:37:56.650 Job Control Language was send mail configuration file of the sixties 0:37:56.650,0:38:00.679 -other where people who sold job that the company +there where people whose sole job at the company was how to put this stuff together 'cause 0:38:00.679,0:38:04.189 -like to do is get what one extra space or -missing comma +all you had to do is get one extra space or +a missing comma 0:38:04.189,0:38:05.000 -something in their +something in there 0:38:05.000,0:38:08.630 -and I hope it would just blow up it would +and the whole thing would just blow up. it would just sort of spit the card deck back at 0:38:08.630,0:38:09.799 you and say well 0:38:09.799,0:38:13.500 somewhere in there is a mistake that's sort of -the general area of this card +in the general area of this card 0:38:13.500,0:38:15.549 and I can't deal with it. Fix it. 0:38:15.549,0:38:16.489 and of course 0:38:16.489,0:38:20.550 in those days it wasn't just a matter of hitting -carriage when you know make cariage return you have to +carriage when you know make carriage return you have to 0:38:20.550,0:38:25.239 get your deck pull out the card, and type the new one, put it back in and re-submit it 0:38:25.239,0:38:28.729 As heaven forbid you couldnt touch that card reader you know, it had to be done by 0:38:28.729,0:38:29.970 an operator 0:38:29.970,0:38:32.869 so the card deck will read through it would disappear and 0:38:32.869,0:38:36.800 you know if you're lucky a few minutes later if you were not lucky a few hours later 0:38:36.800,0:38:37.849 you would get 0:38:37.849,0:38:39.570 -a print print out +a print out 0:38:39.570,0:38:43.419 -which was what it happened and then you could +which was what had happened and then you could look at it and you know 0:38:43.419,0:38:47.209 I put a comma in the wrong place I guess I get to do it all again 0:38:47.209,0:38:49.930 so 0:38:49.930,0:38:54.940 -if you would need to do something -like compiling and running a program +the thing you would need to do there for compiling and running a program 0:38:54.940,0:38:59.579 was you'd have to break into these steps. well I need to run the the preprocessor 0:38:59.579,0:39:04.670 -and so us clean out whatever gump that was left +and so clean out whatever gump that was left over on that process from the previous user 0:39:04.670,0:39:06.240 put the preprocessor in there 0:39:06.240,0:39:10.530 -%uh and then read from this file here let's -say gotta put it somewhere so creative +and then read from this file here let's +say I gotta put it somewhere so creative 0:39:10.530,0:39:12.510 scratch file over on this disk and 0:39:12.510,0:39:17.299 it was excruciating detail like how many cylinders and how many tracks and this and that 0:39:17.299,0:39:19.139 blocks blah blah blah 0:39:19.139,0:39:23.119 and don't forget any of those parameters 'cause it'll spit it out if you do 0:39:23.119,0:39:26.890 and so then it would run the first step in that if its successful then you'd have sitting 0:39:26.890,0:39:28.899 in this scratch file that you had created 0:39:28.899,0:39:33.100 the output of the preprocessor and then you'd load the first pass of the compiler 0:39:33.100,0:39:36.930 -and lets now read from that scratch file +and you say now read from that scratch file and create this other scratch file over here and 0:39:36.930,0:39:39.450 when thats successful and we need to delete that one 0:39:39.450,0:39:43.830 and then load the second pass, put that back into another scratch file and then we run this 0:39:43.830,0:39:45.950 -assembler, optimizer then the +assembler, and the optimizer then the 0:39:45.950,0:39:47.750 loader this and that 0:39:47.750,0:39:49.410 finally run the program 0:39:49.410,0:39:50.900 -and %uh if all goes well +and if all goes well 0:39:50.900,0:39:57.029 you know at step sixteen out comes the answer 0:39:57.029,0:39:58.129 -fourty two. so UNIX +forty two. so UNIX 0:39:58.129,0:40:00.819 said, look this is silly 0:40:00.819,0:40:02.880 a lot of this is just 0:40:02.880,0:40:04.310 bookkeeping 0:40:04.310,0:40:07.249 and computers do bookkeeping really well 0:40:07.249,0:40:12.179 and you'll recall yeah but it's going to take all these cycles it's like 0:40:12.179,0:40:16.309 computers are supposed to be labor-saving -devices right so +devices right? so 0:40:16.309,0:40:20.150 they came up with this notion that they would create processes on the fly as needed 0:40:20.150,0:40:21.159 you had 0:40:21.159,0:40:25.549 you've had a preprocessor in two steps of the compiler and then 0:40:25.549,0:40:27.109 optimizer and then a loader 0:40:27.109,0:40:29.410 we just create Boom seven processes 0:40:29.410,0:40:31.920 and we connect them together with pipes 0:40:31.920,0:40:35.180 and so we take the input and you know run through in 0:40:35.180,0:40:38.270 through the pipes and you know out the end you get the the 0:40:38.270,0:40:39.629 executable 0:40:39.629,0:40:40.030 and 0:40:40.030,0:40:42.880 -we simply create each of these processes +we will simply create each of these processes 0:40:42.880,0:40:44.650 and 0:40:44.650,0:40:46.549 so you as a user just 0:40:46.549,0:40:49.479 -type you know the C compiler just +type you know the C compiler and it just 0:40:49.479,0:40:52.429 fork these things pipe them together got the result 0:40:52.429,0:40:53.640 and 0:40:53.640,0:40:57.509 then once it was done with this processes is just threw them away so any time you'd create a 0:40:57.509,0:41:00.479 -new process and it came to you christine clean +new process and it came to you pristine clean 0:41:00.479,0:41:04.239 and you needed a bunch of things it did put everything in intermediate files 0:41:04.239,0:41:07.549 -the fact that matter is in the early days +the fact of the matter is in the early days 0:41:07.549,0:41:08.129 those computers 0:41:08.129,0:41:11.910 didn't really have enough memory to support all that stuff at once so 0:41:11.910,0:41:15.809 behind you those pipes were actually implemented as files 0:41:15.809,0:41:19.319 -you didn't have atleast to remember to create +but you didn't have atleast to remember to create them and delete them 0:41:19.319,0:41:20.200 and deal with them 0:41:20.200,0:41:24.020 -as far as you're concerned it just look stuff flowing through pipes -and of course today it +as far as you were concerned it just look stuff +flowing through pipes and of course today it 0:41:24.020,0:41:24.490 just 0:41:24.490,0:41:27.989 does flow through pipes in memory 0:41:27.989,0:41:29.439 okay so 0:41:29.439,0:41:33.689 this notion then that that we're just gonna create processes on the fly is needed and 0:41:33.689,0:41:35.559 connect them together as needed 0:41:35.559,0:41:38.039 -and that was a novel concept +it was a novel concept 0:41:38.039,0:41:43.599 and it wasn't that somehow mysteriously figured out how to create processes cheaply 0:41:43.599,0:41:44.839 cause they hadn't 0:41:44.839,0:41:46.180 they were still 0:41:46.180,0:41:49.959 really expensive to create 0:41:49.959,0:41:52.210 but that extra effort 0:41:52.210,0:41:53.029 was 0:41:53.029,0:41:56.089 worth it because it was saving a lot of programming time 0:41:56.089,0:41:59.809 so my favorite example is you run ls 0:41:59.809,0:42:01.810 so we have to create a process 0:42:01.810,0:42:04.259 load the ls binary into it 0:42:04.259,0:42:06.180 -and it prints a line or two on your screen +it prints a line or two on your screen 0:42:06.180,0:42:10.609 and we tear the entire thing down and return all its resources back to the system 0:42:10.609,0:42:14.979 more than ninety percent of the cost of running ls is creating and destroying the process 0:42:14.979,0:42:19.239 a tiny fraction of it is actually running ls 0:42:19.239,0:42:24.259 -it goes so fast, who cares right +but it goes so fast, who cares right 0:42:24.259,0:42:25.749 -the point is that +so the point is that 0:42:25.749,0:42:30.039 -%uh that concept of just creating things as +that concept of just creating things as needed 0:42:30.039,0:42:31.780 again was very powerful 0:42:31.780,0:42:35.709 and is one that is just pervasive today 0:42:35.709,0:42:38.639 okay so what is a process actually made up of 0:42:38.639,0:42:43.179 -%uh it gets some amount of CPU time or at -least we do really hope that it gets some +it gets some amount of CPU time or at +least we do dearly hope that it gets some 0:42:43.179,0:42:46.050 amount of CPU time, the lack of getting CPU time 0:42:46.050,0:42:46.670 that makes it 0:42:46.670,0:42:47.979 -a pure so sluggish +a computer so sluggish 0:42:47.979,0:42:49.409 of course 0:42:49.409,0:42:51.920 others really boils down to scheduling 0:42:51.920,0:42:54.249 and we're going to talk about scheduling 0:42:54.249,0:42:56.279 probably more than you care to 0:42:56.279,0:42:59.219 in a couple weeks time 0:42:59.219,0:43:01.619 we have the asynchronous events 0:43:01.619,0:43:04.569 -%uh these are the external events that +these are the external events that 0:43:04.569,0:43:05.659 are coming in 0:43:05.659,0:43:07.679 -%uh so +so 0:43:07.679,0:43:10.169 they may be either things that 0:43:10.169,0:43:14.339 -we're coming in from the outside world like +were coming in from the outside world like start, stop and quit 0:43:14.339,0:43:15.279 -%uh oh +oh 0:43:15.279,0:43:18.170 -out-of-band arrival notification that kind +out-of-band data arrival notification that kind of thing 0:43:18.170,0:43:22.339 or it may in fact be things that the program is bringing down upon itself 0:43:22.339,0:43:25.590 -on such as a segment fault,a divide by zero +such as a segment fault,a divide by zero 0:43:25.590,0:43:26.910 and some other 0:43:26.910,0:43:31.959 what would normally be viewed as incorrect operation 0:43:31.959,0:43:35.849 -and so will talk about that when we talk about +and so we'll talk about that when we talk about signals 0:43:35.849,0:43:37.039 every program 0:43:37.039,0:43:38.899 -get some amount of memory +gets some amount of memory 0:43:38.899,0:43:42.659 it gets an initial amount when it starts up injured generally allocates more as it 0:43:42.659,0:43:45.229 goes along 0:43:45.229,0:43:49.429 -of course we will deal with up her extensively +this of course we will deal with very extensively will spend an entire week on it 0:43:49.429,0:43:54.249 when we talk about how virtual memory is implemented 0:43:54.249,0:43:54.609 and 0:43:54.609,0:43:57.429 -%uh then we get I/O descriptors +then we get I/O descriptors 0:43:57.429,0:44:02.259 I used to say that every program had to have at least one I/O descriptor since 0:44:02.259,0:44:04.910 it absolutely had no input 0:44:04.910,0:44:06.329 absolutely no output 0:44:06.329,0:44:09.049 then it was sort of pointless 0:44:09.049,0:44:12.900 of course I had to have one of my students -come up and point out to me there is a +come up and point out to me there is an a 0:44:12.900,0:44:13.849 class of programs 0:44:13.849,0:44:16.469 which don't need I/O descriptors 0:44:16.469,0:44:17.440 and that is 0:44:17.440,0:44:19.549 these things called benchmarks 0:44:19.549,0:44:23.249 -the just compute something all we really care +it just compute something all we really care about is how long it takes them to compute 0:44:23.249,0:44:24.959 we dont actually care what the answer is 0:44:24.959,0:44:26.019 In theory we dont 0:44:26.019,0:44:29.779 -I personally felt like my benchmark stop with +I personally like my benchmark stop with something so I can see it there 0:44:29.779,0:44:31.489 doing computing the right thing 0:44:31.489,0:44:33.169 but in theory 0:44:33.169,0:44:35.919 that wouldn't be necessary 0:44:35.919,0:44:38.650 outside of that class of programs 0:44:38.650,0:44:42.670 everything needs some sort of descriptors and of course we'll talk about descriptors 0:44:42.670,0:44:43.659 quite extensively 0:44:43.659,0:44:47.349 -%uh as we go through the I/O subsystem +as we go through the I/O subsystem 0:44:47.349,0:44:50.969 okay so the executive summary is that processes are 0:44:50.969,0:44:54.969 the fundamental service that is provided by UNIX 0:44:54.969,0:44:58.430 and 0:44:58.430,0:45:02.849 what we're going to spend essentially the next two and a half weeks working on 0:45:02.849,0:45:04.769 is 0:45:04.769,0:45:07.079 what what makes up processes 0:45:07.079,0:45:10.180 we'll go into much more detail about each of these four points 0:45:10.180,0:45:11.769 and 0:45:11.769,0:45:13.630 then how do we actually go about 0:45:13.630,0:45:14.390 providing that 0:45:14.390,0:45:16.639 bit of service 0:45:16.639,0:45:17.900 -the next thing that I +the next thing that I'm 0:45:17.900,0:45:22.210 going to do now is this go through and lay out some of the terminology that 0:45:22.210,0:45:23.239 -we have we when +we have when 0:45:23.239,0:45:25.130 we're talking about processes 0:45:25.130,0:45:29.229 so this is sort of the big picture here were on page eighteen 0:45:29.229,0:45:30.669 and 0:45:30.669,0:45:33.669 you can see we have sort of three bits that make up 0:45:33.669,0:45:36.640 the system 0:45:36.640,0:45:39.029 -the currently running user process +we have the currently running user process 0:45:39.029,0:45:41.180 and then what we call the top half of the kernel 0:45:41.180,0:45:43.699 and the bottom half of the kernel 0:45:43.699,0:45:47.049 now this would be a picture for a uniprocessor 0:45:47.049,0:45:49.299 so one CPU 0:45:49.299,0:45:51.209 if we had a multiprocessor 0:45:51.209,0:45:54.009 %uh then we would have 0:45:54.009,0:45:57.130 one instance of the kernel 0:45:57.130,0:45:59.529 but multiple instances of the user process 0:45:59.529,0:46:02.879 but for any given CPU on a multiprocessor 0:46:02.879,0:46:05.709 it is running exactly one process 0:46:05.709,0:46:09.309 -so you may think they were running for four-five +so you may think they we're running for four-five processes all at once 0:46:09.309,0:46:14.319 but the fact of the matter is that any instant in time there's only one process which is 0:46:14.319,0:46:16.299 actually running 0:46:16.299,0:46:18.609 and 0:46:18.609,0:46:21.429 -that is the one that we have within the system +that is the one that we have loaded in the system 0:46:21.429,0:46:25.199 now we give the illusion that were running lots of things because we switch between them 0:46:25.199,0:46:26.100 rather quickly 0:46:26.100,0:46:29.269 so it looks like things are happening in all windows at once 0:46:29.269,0:46:31.430 but in reality 0:46:31.430,0:46:33.619 that's not really happening 0:46:33.619,0:46:36.440 -okay there is a set of properties that I want to +okay so there is a set of properties that I want to look at 0:46:36.440,0:46:40.899 that had to do with each one of these parts here 0:46:40.899,0:46:44.359 -but that just to look at it from the +but just to sort of look at it from the big picture perspective 0:46:44.359,0:46:45.970 what you see here 0:46:45.970,0:46:47.180 is 0:46:47.180,0:46:51.549 there is boundary between the user process and the top half of the kernel 0:46:51.549,0:46:54.949 which is really just like a glorified sovereignty call 0:46:54.949,0:46:59.539 it's a lot like calling into a library routine like calling strcat, strcpy or something 0:46:59.539,0:47:00.319 like that 0:47:00.319,0:47:03.679 -%uh when you do a system call +when you do a system call 0:47:03.679,0:47:05.650 we take that same set of parameters 0:47:05.650,0:47:08.009 now this is sort of 0:47:08.009,0:47:09.780 brick Wall here if you will 0:47:09.780,0:47:11.380 that is protecting 0:47:11.380,0:47:13.680 -the the top half of the kernel +the top half of the kernel 0:47:13.680,0:47:15.299 from the application 0:47:15.299,0:47:18.899 -I'm more go into some detail about how that +I'll go more into some detail about how that actually gets implemented 0:47:18.899,0:47:22.729 -but in a sense you can think of it -is is there sort of this whaling Wall with little +but in essense you can think of it +is is there sort of this whaling Wall and these little 0:47:22.729,0:47:24.990 -chinks there you can sort of push a request +chinks there and you can sort of push a request through 0:47:24.990,0:47:28.230 -and somebody other sites where polls that -looks at it and decide whether they're going +and somebody other sides sort of pulls that +looks at it and decides whether they're going 0:47:28.230,0:47:28.690 to 0:47:28.690,0:47:30.769 -dained to provide service to you +dain to provide service to you 0:47:30.769,0:47:34.229 -and if they do then they will send it back +and if they do then they sort of send it back 0:47:34.229,0:47:37.649 well like a library where you can just sort of reach in and walk around if you want to 0:47:37.649,0:47:38.290 you 0:47:38.290,0:47:40.950 good programming practices you don't do that but 0:47:40.950,0:47:43.049 you could 0:47:43.049,0:47:44.579 all right so 0:47:44.579,0:47:49.089 the the top half of the kernel is really looks a lot like 0:47:49.089,0:47:50.509 a big library 0:47:50.509,0:47:53.509 -%uh it just happens to be a library of +%uh it just happens to be a library routines 0:47:53.509,0:47:57.599 that deal with things where processes need to interact with each other 0:47:57.599,0:48:01.399 in fact for many people they don't understand for what's the difference between the C 0:48:01.399,0:48:03.259 library and the top half of the kernel 0:48:03.259,0:48:08.020 -%uh if it's something that you're doing that +if it's something that you're doing that no other process needs to know about 0:48:08.020,0:48:09.799 then it can be in the C library 0:48:09.799,0:48:13.829 so if you call strcat to concatenate two strings together 0:48:13.829,0:48:17.599 nobody else needs to know you're doing that you don't need to coordinate with anybody 0:48:17.599,0:48:19.000 else that you're doing that 0:48:19.000,0:48:20.160 it's just happening 0:48:20.160,0:48:21.979 so that goes in the C library. 0:48:21.979,0:48:24.489 on the other hand if you're reading or writing the file 0:48:24.489,0:48:28.029 there may be other processes that are also reading and writing that file 0:48:28.029,0:48:29.910 and therefore that 0:48:29.910,0:48:31.579 has to be done by the kernel 0:48:31.579,0:48:33.120 because they can coordinate 0:48:33.120,0:48:37.189 -on the daemon processes that are trying to access +all the different processes that are trying to access that file. 0:48:37.189,0:48:40.529 -so the top of the kernel is pretty straightforward +so the top half of the kernel is pretty straightforward code 0:48:40.529,0:48:45.539 it looks a lot like any other library that you would write if you look at top half kernel 0:48:45.539,0:48:49.640 code you know you see all read,come in it's got these parameters we Mark around we 0:48:49.640,0:48:53.719 get some data that we put it in the buffer and we return back 0:48:53.719,0:48:57.470 -in fact writing code for the top half of +and in fact writing code for the top half of the kernel is 0:48:57.470,0:48:59.729 not all that difficult to do 0:48:59.729,0:49:00.989 -%uh it's +it's 0:49:00.989,0:49:01.959 you have 0:49:01.959,0:49:05.939 -for many the same properties that you would +for many of the same properties that you would when you're writing user level application 0:49:05.939,0:49:07.529 code 0:49:07.529,0:49:11.779 the bottom half of the kernel is where things start to get nasty 0:49:11.779,0:49:14.820 -thus the bottom half of the kernel is the part +because the bottom half of the kernel is the part of the system 0:49:14.820,0:49:18.769 that deals with all of the asynchronous events in the system 0:49:18.769,0:49:22.179 -%uh is things like device drivers, +is things like device drivers, 0:49:22.179,0:49:23.779 timers 0:49:23.779,0:49:25.010 that level of thing 0:49:25.010,0:49:28.029 that are driven by hardware events 0:49:28.029,0:49:28.659 so 0:49:28.659,0:49:31.459 for example a packet arrives on the network 0:49:31.459,0:49:33.670 -that causes and interrupt a command +that causes an interrupt to come and 0:49:33.670,0:49:36.729 that will be handled by the bottom half of the kernel 0:49:36.729,0:49:38.829 and historically 0:49:38.829,0:49:43.079 when an interrupt came in it preempted whatever else was going on 0:49:43.079,0:49:45.400 -and it ran until it's finished and then return +and it ran until it finished and then it returned 0:49:45.400,0:49:46.539 and it could not 0:49:46.539,0:49:49.439 go to sleep to wait for resources or other things 0:49:49.439,0:49:51.339 %uh in current systems 0:49:51.339,0:49:54.549 -you can actually go to sleep in a interrupt driver -and wait for +you can actually go to sleep in the interrupt driver +and waiting for 0:49:54.549,0:49:56.739 some other activity to complete 0:49:56.739,0:49:58.259 it is however 0:49:58.259,0:50:00.799 not a good idea to do that 0:50:00.799,0:50:01.909 because 0:50:01.909,0:50:06.739 -the usual case of most of device drivers is they +the usual case of most device drivers is they can finish whatever they're doing in an interrupt 0:50:06.739,0:50:08.579 without ever blocking 0:50:08.579,0:50:09.580 and so 0:50:09.580,0:50:13.649 -when an interrupt comes in and we assume that you're +when an interrupt comes in we assume that you're not going to sleep 0:50:13.649,0:50:14.710 and if you actually 0:50:14.710,0:50:17.219 then go to sleep.oh man 0:50:17.219,0:50:20.469 you didnt tell us you're going to do this we -have to go off into a whole lot of other work +have to go off to do a whole lot of other work 0:50:20.469,0:50:23.029 that we had originally planned on doing 0:50:23.029,0:50:25.460 so if you go to sleep in a device driver 0:50:25.460,0:50:28.209 -you are taking a very serious performance +you are taking a very serious performance hit 0:50:28.209,0:50:31.019 so it's highly recommended that you don't do that 0:50:31.019,0:50:33.130 but if you have to you can 0:50:33.130,0:50:35.809 on it's because of this historic behavior or 0:50:35.809,0:50:39.899 of not being able to sleep in the bottom half of the kernel 0:50:39.899,0:50:42.119 -certain properties that have +that you have certain properties that have 0:50:42.119,0:50:44.769 -%uh taken over in device drivers +taken over in device drivers 0:50:44.769,0:50:45.940 and that is 0:50:45.940,0:50:50.369 that a device driver should be handed all the resources it needs to get his job done 0:50:50.369,0:50:54.490 you don't give a disk device driver Go read this 0:50:54.490,0:50:56.549 and put it somewhere 0:50:56.549,0:50:57.580 you have to say 0:50:57.580,0:50:59.410 Go read this particular block 0:50:59.410,0:51:02.650 here is a chunk of memory that I want that -my data to put in + data to put in 0:51:02.650,0:51:03.959 and 0:51:03.959,0:51:06.169 -no to find it when it's done +notify me when it's done 0:51:06.169,0:51:06.970 because 0:51:06.970,0:51:10.660 things like allocating memory are classic places where you end up having to go to sleep 0:51:10.660,0:51:12.939 to wait for stuff to happen 0:51:12.939,0:51:14.449 and 0:51:14.449,0:51:16.390 historically you couldn't do that 0:51:16.390,0:51:18.640 even currently don't want to have to do that 0:51:18.640,0:51:23.400 so device drivers generally have all resources pre allocated 0:51:23.400,0:51:25.169 and then they can just go 0:51:25.169,0:51:27.279 the one place where this doesn't work 0:51:27.279,0:51:29.029 is the network 0:51:29.029,0:51:30.929 and in particular 0:51:30.929,0:51:34.630 you don't know when somebody's going to send packets to you 0:51:34.630,0:51:37.040 -you say well you're looking you're open connections +you say well you're looking to open connections 0:51:37.040,0:51:39.360 but if you're doing something like IP forwarding 0:51:39.360,0:51:40.969 there's no 0:51:40.969,0:51:45.039 top half state it's dealing with this packets they're just coming in on one interface being 0:51:45.039,0:51:46.719 sent out on another interface 0:51:46.719,0:51:50.630 they never pass through any part of the top half of the kernel 0:51:50.630,0:51:53.529 and so in the case of network device drivers 0:51:53.529,0:51:56.149 they need to allocate memory 0:51:56.149,0:51:56.640 and 0:51:56.640,0:51:58.829 -it memory gets into short supply +if memory gets into short supply 0:51:58.829,0:52:01.689 and they try to allocate memory and it's not available 0:52:01.689,0:52:05.049 they historically coudnt wait for memory to be available 0:52:05.049,0:52:08.380 and even in practice today don't wait 0:52:08.380,0:52:09.580 for memory to become available 0:52:09.580,0:52:12.469 they simply drop the packet on the floor 0:52:12.469,0:52:18.109 it's like well I didn't have any place to put it sorry oops 0:52:18.109,0:52:20.940 -now that doesn't called incorrect behavior +now that doesn't cause incorrect behavior 0:52:20.940,0:52:24.369 -because a higher level protocols what we transmit +because the higher level protocols will retransmit 0:52:24.369,0:52:29.140 but it does cause great performance problems -because we transmissions means that connections +because retransmission means that connections 0:52:29.140,0:52:29.879 stall 0:52:29.879,0:52:31.110 they have to back up 0:52:31.110,0:52:33.010 they have to resend data 0:52:33.010,0:52:33.739 and so on 0:52:33.739,0:52:38.739 so you really want to avoid dropping packets if you can possibly help it 0:52:38.739,0:52:42.029 and consequently 0:52:42.029,0:52:43.420 we tend to 0:52:43.420,0:52:46.499 pre allocate a certain amount of memory for the network drivers 0:52:46.499,0:52:48.299 -%uh and +and 0:52:48.299,0:52:52.169 we try very hard to make sure that we're not going to run out of memory but 0:52:52.169,0:52:54.869 if packets come fast enough and we can't deal with them 0:52:54.869,0:52:57.940 -as quickly as they are arriving over short period +as quickly as they are arriving then over short period of time 0:52:57.940,0:53:03.489 we get to the point where we simply have to start dropping packets 0:53:03.489,0:53:07.649 -this is a part of kernel that you do not wish to +okay this is a part of kernel that you do not wish to write code for 0:53:07.649,0:53:10.919 -because it is extremely difficult +because it is extremely difficult to debug 0:53:10.919,0:53:12.759 you get these bugs where 0:53:12.759,0:53:18.779 the only time it happens is on the third Tuesday when there's a full moon 0:53:18.779,0:53:19.300 and 0:53:19.300,0:53:24.199 we have a disk interrupt followed by %uh a terminal character coming in 0:53:24.199,0:53:28.289 and the network packet arriving of size fifteen twenty two 0:53:28.289,0:53:30.109 and when all those things happened 0:53:30.109,0:53:32.719 the system panics 0:53:32.719,0:53:37.380 -and of course there's like the panic +and of course there's like it panics cause you're following some bad pointer 0:53:37.380,0:53:40.969 something that should have been there but was freed some time in the distant past 0:53:40.969,0:53:42.930 we are not sure when 0:53:42.930,0:53:44.049 and 0:53:44.049,0:53:47.400 try to debug things like that is extremely difficult 0:53:47.400,0:53:48.509 -mean you can +and you can 0:53:48.509,0:53:52.120 think well I think I found the problem but it's not reproduceable 0:53:52.120,0:53:55.530 you know you have to wait for the next third Tuesday with a full moon and blah blah blah 0:53:55.530,0:53:56.950 to happen 0:53:56.950,0:53:57.469 and 0:53:57.469,0:54:01.449 you know so you sort of statistically -gets that you fix that you know I was getting +guess that you fix that you know I was getting 0:54:01.449,0:54:03.510 this bug once every three days 0:54:03.510,0:54:06.099 and now it's gone for two weeks without happening 0:54:06.099,0:54:07.239 did you fix that? 0:54:07.239,0:54:08.969 or if you've been lucky 0:54:08.969,0:54:10.459 and and it's 0:54:10.459,0:54:14.349 -that that coupled with the fact that you're +that coupled with the fact that you're dealing with hardware 0:54:14.349,0:54:18.049 -and hardware really works the way it's documented +and hardware rarely works the way it's documented to work 0:54:18.049,0:54:21.770 and so you know they're doing everything that it says you're supposed to do 0:54:21.770,0:54:26.260 it still doesn't work because you didn't set the fiddle bit over on that other place over 0:54:26.260,0:54:26.660 there 0:54:26.660,0:54:30.479 that's not documented anywhere but if it's not said it doesn't work 0:54:30.479,0:54:33.769 occasionally 0:54:33.769,0:54:36.110 -this is another reason that you really want +so this is another reason that you really want of avoid 0:54:36.110,0:54:40.459 dealing with this part of the system if you can possibly help 0:54:40.459,0:54:44.369 -but lets go through and and look at some -of the properties here starting up with at +okay but lets go through and and look at some +of the properties here starting up at 0:54:44.369,0:54:45.789 the user process 0:54:45.789,0:54:47.980 -%uh we're running with +we're running with 0:54:47.980,0:54:51.449 preemptive scheduling 0:54:51.449,0:54:53.409 now there's several caveats here 0:54:53.409,0:54:55.239 preemptive scheduling is the default 0:54:55.239,0:54:56.970 so called shared scheduler 0:54:56.970,0:55:01.360 that is what you normally use there are other schedulers like the real time scheduler 0:55:01.360,0:55:02.869 where what I'm saying isnt that true 0:55:02.869,0:55:05.709 -%uh will talk about some of the schedulers was +we'll talk about some of the schedulers was later 0:55:05.709,0:55:09.930 but the usual scheduler that you're running on under UNIX is a shared scheduler 0:55:09.930,0:55:13.229 -and under the shared scheduler the user applications +and under the shared scheduler user applications 0:55:13.229,0:55:15.159 run with pre emptive scheduling 0:55:15.159,0:55:17.449 and pre emptive scheduling means that 0:55:17.449,0:55:20.019 you run at the whim of the system 0:55:20.019,0:55:21.420 -if they want you to run +if it wants you to run 0:55:21.420,0:55:22.140 you run 0:55:22.140,0:55:25.490 -once you start running you have no guarantee +once you to start running you have no guarantee of how long you're going to run 0:55:25.490,0:55:29.370 it might like to run for three instructions and then decide it doesn't like you many more 0:55:29.370,0:55:31.150 it wants to run something else 0:55:31.150,0:55:35.920 -while you might get to run for several seconds +or you might get to run for several seconds and in a row with the with no intervening 0:55:35.920,0:55:37.469 -things interrupting +things interrupting you 0:55:37.469,0:55:39.719 you just don't know 0:55:39.719,0:55:40.969 and 0:55:40.969,0:55:42.839 really all you know is 0:55:42.839,0:55:43.569 that 0:55:43.569,0:55:48.239 -%uh they claim that they're using statistics +they claim that they're using statistics and that and that the statistics are fair 0:55:48.239,0:55:55.059 and so on average you're going to get a reasonable amount of time but thats 0:55:55.059,0:55:57.129 up to the system you don't control that 0:55:57.129,0:55:58.439 the real point here 0:55:58.439,0:56:01.940 is that you don't have any way of creating a critical section 0:56:01.940,0:56:04.950 -you can say okay I don't want to be interrupted +you can't say okay I don't want to be interrupted 0:56:04.950,0:56:07.429 during this particular sequence of things 0:56:07.429,0:56:09.809 so you have to program 0:56:09.809,0:56:13.469 assuming that you may be interrupted at any point 0:56:13.469,0:56:14.979 okay 0:56:14.979,0:56:18.909 the next thing is that when you're running -in user process +in a user process 0:56:18.909,0:56:20.719 you are running in 0:56:20.719,0:56:24.150 with the processor in what's called unprivileged mode 0:56:24.150,0:56:28.109 one of the requirements for running any kind of a UNIX system 0:56:28.109,0:56:31.759 is that you have to have a processor that support privileged and unprivileged 0:56:31.759,0:56:33.709 two different modes of operation 0:56:33.709,0:56:37.049 -in privilege mode which is what the kernel +in privileged mode which is what the kernel runs in 0:56:37.049,0:56:38.950 the entire repertoire 0:56:38.950,0:56:40.869 of the hardware is available 0:56:40.869,0:56:45.339 -by this I mean you can set all the register -as you can fiddle with the memory management +by this I mean you can set all the registers +you can fiddle with the memory management 0:56:45.339,0:56:47.460 unit you can initiate I/O 0:56:47.460,0:56:50.519 -you can access any register anywhere +you can access any memory anywhere 0:56:50.519,0:56:51.919 etc 0:56:51.919,0:56:56.540 when you're running in unprivileged -mode which is what user process run in and +mode which is what user processes run in and 0:56:56.540,0:57:00.709 this a large subset of the instructions which you cannot execute 0:57:00.709,0:57:03.480 you cannot initiate I/O on 0:57:03.480,0:57:04.209 devices 0:57:04.209,0:57:06.770 you cannot change the memory mapping 0:57:06.770,0:57:10.209 you cannot access memory that's not part of your address space 0:57:10.209,0:57:13.299 -%uh you cannot execute certain instructions +you cannot execute certain instructions like halt 0:57:13.299,0:57:15.589 -%uh and +and 0:57:15.589,0:57:19.039 so in general you are protected 0:57:19.039,0:57:21.789 from manipulating anything that's outside of your address space 0:57:21.789,0:57:23.759 this of course is desirable because 0:57:23.759,0:57:27.059 -%uh when you're running in this unprevileged +when you're running in this unprevileged mode 0:57:27.059,0:57:28.300 you're protected 0:57:28.300,0:57:31.910 from other processes manipulating you and they're protected from you manipulating 0:57:31.910,0:57:33.079 them 0:57:33.079,0:57:36.430 for those of you that have had that misfortune to have to use 0:57:36.430,0:57:39.339 early versions of windows up to about ninety eight 0:57:39.339,0:57:42.470 they always ran with the processor running in privileged mode 0:57:42.470,0:57:44.009 even in applications 0:57:44.009,0:57:46.459 and so either maliciously or accidentally 0:57:46.459,0:57:50.000 you could stop on other people address space or you could stop on the kernel 0:57:50.000,0:57:53.020 and a lot of the blue screen of death was people just 0:57:53.020,0:57:56.319 following wild pointers and trashing different parts of the system 0:57:56.319,0:57:58.819 taking everything down 0:57:58.819,0:58:00.020 it also makes it 0:58:00.020,0:58:02.320 far easier to 0:58:02.320,0:58:05.459 implement things like viruses and worms and other things because 0:58:05.459,0:58:09.619 -user application can we rewrite the boot +a user application can we rewrite the boot block on the disk they can just the write down 0:58:09.619,0:58:13.109 and manipulate the registers that allow them to do whatever they want 0:58:13.109,0:58:16.730 whereas when you're running in unprivileged mode you cant write those kinds of 0:58:16.730,0:58:20.179 of things 0:58:20.179,0:58:24.119 -modern versions of Windows from about +so modern versions of Windows anything from about 2000 on 0:58:24.119,0:58:26.630 now run with privileged and unprevileged mode 0:58:26.630,0:58:28.649 but UNIX has always required that 0:58:28.649,0:58:30.219 and so when you're running an 0:58:30.219,0:58:31.319 -the user process + user process 0:58:31.319,0:58:33.389 you cannot block i mean 0:58:33.389,0:58:37.969 you cannot execute the instructions which cause a context switching to occur 0:58:37.969,0:58:40.349 you can't pick what's going to run next 0:58:40.349,0:58:43.140 you can't make that thing run next all you can do 0:58:43.140,0:58:45.189 is go to the operating system and say 0:58:45.189,0:58:49.269 hey I've got nothing to do. pick somebody else to run 0:58:49.269,0:58:53.449 -the operating system is the think they can +and the operating system is the think they can then execute the instructions which cause 0:58:53.449,0:58:57.609 a different process to be loaded 0:58:57.609,0:58:59.049 and run 0:58:59.049,0:59:03.400 alright.finally while you're in a user application you're running on a user stack 0:59:03.400,0:59:06.410 -that's part of the user address space +that's part of the user's address space 0:59:06.410,0:59:07.889 so 0:59:07.889,0:59:10.819 part of creating a process gives you a runtime stack 0:59:10.819,0:59:14.369 as part of a virtual address space and so it can be 0:59:14.369,0:59:18.199 more or less up to the limits of the hardware as big as you want it to be 0:59:18.199,0:59:19.949 so if you are running on thirty two-bit processor 0:59:19.949,0:59:22.819 -you're stack can get 2 gigabytes +you're stack can get the 2 gigabytes 0:59:22.819,0:59:23.319 and 0:59:23.319,0:59:26.839 -%uh the what this means is that anytime you +the what this means is that anytime you allocate local variables 0:59:26.839,0:59:28.529 you don't have to worry about Oh 0:59:28.529,0:59:30.609 is that gonna overrun my stack? 0:59:30.609,0:59:31.610 so if you need 0:59:31.610,0:59:35.519 a hundred thousand double precision floating point numbers 0:59:35.519,0:59:37.189 you can just as a local variable allocate 0:59:37.189,0:59:40.269 an array of size a hundred-thousand type double 0:59:40.269,0:59:44.029 and it just decrements your stack pointer by hundred hundred thousand bytes 0:59:44.029,0:59:45.009 -a way to go +away you go 0:59:45.009,0:59:47.299 it's just virtual address space 0:59:47.299,0:59:49.020 as you'll see when we get into the kernel 0:59:49.020,0:59:50.210 that ceases to be the case diff --git a/en_US.ISO8859-1/captions/2008/asiabsdcon/olander-pcbsd.sbv b/en_US.ISO8859-1/captions/2008/asiabsdcon/olander-pcbsd.sbv index 95df19c09b..69a7751eb8 100644 --- a/en_US.ISO8859-1/captions/2008/asiabsdcon/olander-pcbsd.sbv +++ b/en_US.ISO8859-1/captions/2008/asiabsdcon/olander-pcbsd.sbv @@ -1,1732 +1,1726 @@ 0:00:05.120,0:00:08.599 -Our first talk is entitled +>> SATO: First is entitled as PC-BSD uh 0:00:08.599,0:00:12.079 FreeBSD on the desktop by Matt Orlander 0:00:12.079,0:00:16.409 -from iXSystems +from iXSystems, so we - please 0:00:16.409,0:00:17.300 >> MATT: Thank you. Good morning 0:00:17.300,0:00:23.349 -I'd like to thank Sato San and George -and the rest of the Asia BSDCon organizers -for inviting us out +I'd like to thank Sato-San and George and the rest +of the AsiaBSDCon organizers for inviting us out 0:00:23.349,0:00:27.099 -we have a little FreeBSD table +We have a little FreeBSD table 0:00:27.099,0:00:29.189 and have brought some goodies like 0:00:29.189,0:00:30.380 little beasties 0:00:30.380,0:00:33.010 you can put in your pocket and walk around Tokyo 0:00:33.010,0:00:34.110 and scare people with 0:00:34.110,0:00:38.339 -%uh, any BSD committers, come on up, and we have +Uh, any BSD committers, come on up, and we have T-shirts for you 0:00:38.339,0:00:41.490 and it'll cost - for free - just to say thank you 0:00:41.490,0:00:42.729 -%uh this is +Uh, this is 0:00:42.729,0:00:44.640 FreeBSD on the Desktop 0:00:44.640,0:00:49.050 I'm lucky enough to have - 0:00:49.050,0:00:53.330 Chris Moore, the founder of the PC-BSD project here 0:00:53.330,0:00:56.970 so really, I don't know why I'm giving this talk Chris 0:00:56.970,0:00:59.060 -well, my name is Matt Orlander +well, my name is Matt Olander 0:00:59.060,0:01:02.940 -I've been working with the BSD since -1998 +I've been working with BSD since 1998 0:01:02.940,0:01:04.970 when I - uh - 0:01:04.970,0:01:10.370 I installed a BSD OS installation at a little server company in San Jose California 0:01:10.370,0:01:13.310 called Telenet System Solutions 0:01:13.310,0:01:14.280 later on, I ended up 0:01:14.280,0:01:16.090 working full time there 0:01:16.090,0:01:19.320 and that they eventually got acquired by BSDi 0:01:19.320,0:01:23.770 and so I went on to continue working there 0:01:23.770,0:01:27.549 BSDi sold their software assets to WindRiver 0:01:27.549,0:01:32.540 and the hardware company lived on with a group of employees that bought it out 0:01:32.540,0:01:35.420 and eventually changed our name back to iXsystems 0:01:35.420,0:01:39.450 and now we are very involved trying to support the FreeBSD project 0:01:39.450,0:01:41.950 as well as the other BSDs 0:01:41.950,0:01:44.229 -I'm on the BSD marketing team +I'm on the FreeBSD marketing team 0:01:44.229,0:01:47.250 some would say that I don't do enough for that 0:01:47.250,0:01:50.700 and of course I do some PC-BSD project management as well 0:01:50.700,0:01:56.120 -so people ask us a lot of times -why did we do PC-BSD +so people ask us a lot of times why did we do PC-BSD Chris can give you 0:01:56.120,0:01:57.649 a really good answer about 0:01:57.649,0:01:59.909 how he wanted to convert his Mom 0:01:59.909,0:02:04.360 and he tried actually to do this on Linux at first and Linux is such 0:02:04.360,0:02:10.439 a fragmented mass, it was much easier for him to turn to BSD and focus on one 0:02:10.439,0:02:11.949 core project 0:02:11.949,0:02:15.549 %uh the other reason I usually give is because I 0:02:15.549,0:02:17.769 chicks dig BSD 0:02:17.769,0:02:20.369 as you can see 0:02:20.369,0:02:23.779 that's PC-BSD babe - I don't know if you can read it 0:02:23.779,0:02:27.819 but her site is pcbsdbabe.com and she was a girl 0:02:27.819,0:02:32.839 that installed PC-BSD on one of the early releases and loved it so much that she 0:02:32.839,0:02:34.359 she started a blog 0:02:34.359,0:02:36.899 it is pretty entertaining 0:02:36.899,0:02:40.079 I won't pull it up here 0:02:40.079,0:02:44.560 what is the PC-BSD - I meant to delete that, I swear 0:02:44.560,0:02:48.159 PC-BSD it is FreeBSD, but it's not a fork 0:02:48.159,0:02:51.450 all we do is take the default FreeBSD operating system 0:02:51.450,0:02:54.489 and add a graphical installer 0:02:54.489,0:02:59.079 you know, it's integrated with KDE and Fluxbox right out of the box 0:02:59.079,0:03:03.040 and of course we've got some tools that Chris and his team have written 0:03:03.040,0:03:07.159 to make some of the typical system configuration 0:03:07.159,0:03:09.729 utilities a bit easier to use through a GUI 0:03:09.729,0:03:12.979 and I'll be showing you some of those 0:03:12.979,0:03:15.570 the big claim to fame for PC-BSD 0:03:15.570,0:03:19.319 is a different package management system called PBI 0:03:19.319,0:03:22.260 and this is a graphical method of installing 0:03:22.260,0:03:25.840 say, like a FreeBSD port or more like a package 0:03:25.840,0:03:28.759 in a binary format using a front-end GUI 0:03:28.759,0:03:31.949 it contains all the dependencies of the package 0:03:31.949,0:03:33.519 in one directory 0:03:33.519,0:03:37.699 %uh so that we can save the package through upgrades and 0:03:37.699,0:03:40.139 %uh make it very easy for other users 0:03:40.139,0:03:41.099 to install 0:03:41.099,0:03:43.150 we're working very hard 0:03:43.150,0:03:48.059 to integrate this more closely with FreeBSD's methodology of ports and packages 0:03:48.059,0:03:49.390 and so far 0:03:49.390,0:03:53.680 Chris and his team have setup an auto-building PBI server 0:03:53.680,0:03:56.759 it's semi-auto, right? 0:03:56.759,0:03:58.079 >> CHRIS: it's pretty auto >> MATT: pretty automatic now 0:03:58.079,0:04:01.529 it takes a little manual configuration of a port 0:04:01.529,0:04:06.370 and then it tears through the port and generates the PC-BSD binary 0:04:06.370,0:04:07.640 and so now 0:04:07.640,0:04:11.619 whenever the port - how many are in their so far now Chris? 0:04:11.619,0:04:13.219 >> CHRIS: about a hundred ->> MATT: okay, so that's awesome +>> MATT: okay, great. so that's awesome 0:04:13.219,0:04:16.989 so I mean you know it's only hundred but really for desktop use 0:04:16.989,0:04:20.419 %uh how many times you know how many applications are going to be useful 0:04:20.419,0:04:22.210 for your average desktop user 0:04:22.210,0:04:23.919 %uh power users, you know, %uh 0:04:23.919,0:04:30.050 -can just drop in and install a port -or a package so it's not a big deal +they are familiar with freebsd can just drop in and +install a port or a package so it's not a big deal 0:04:30.050,0:04:31.860 so Chris and his team have 0:04:31.860,0:04:33.259 setup scripts that tear through 0:04:33.259,0:04:35.480 %uh a hundred or so ports so far 0:04:35.480,0:04:40.819 and that whenever a port is updated -it will automatically generate the PC-BSD binary +it will automatically generate the new PC-BSD binary 0:04:40.819,0:04:44.100 and then it'll notify all of the PC-BSD users 0:04:44.100,0:04:47.129 with an annoying pop-up window 0:04:47.129,0:04:48.219 that updates are available 0:04:48.219,0:04:52.889 but of course you can turn that off 0:04:52.889,0:04:55.150 -so the goal here is to make it +so you know the goal here is to make it 0:04:55.150,0:04:57.290 %uh easier for people to use 0:04:57.290,0:04:59.870 FreeBSD that are new to it especially 0:04:59.870,0:05:03.280 I think the jury that the PC-BSD community 0:05:03.280,0:05:05.969 as I look at forums and talk to people 0:05:05.969,0:05:07.249 is Windows users 0:05:07.249,0:05:11.869 -so we're getting a lot of Windows users -coming on over and I think now we're -getting a lot of Linux users coming over +so we're getting a lot of Windows users coming on over and +I think now we're getting a lot of Linux users coming over 0:05:11.869,0:05:14.040 you know, they like Linux, but 0:05:14.040,0:05:16.939 they've tried twenty different flavors 0:05:16.939,0:05:18.439 they start to realize that 0:05:18.439,0:05:22.849 something's wrong 0:05:22.849,0:05:25.739 so we're now that at PC-BSD 1.5 0:05:25.739,0:05:28.289 which includes Xorg 7.3 0:05:28.289,0:05:34.909 3.5.8, actually, you're already bumped up to -like a 1.5.1, right? -[mumbles] +like a 1.5.1, right? [mumbles] 0:05:34.909,0:05:39.249 as soon as you get back, he's been working on that at the hotel 0:05:39.249,0:05:40.860 we have a new system updater tool 0:05:40.860,0:05:43.709 that updates your PC-BSD system 0:05:43.709,0:05:44.400 on the fly 0:05:44.400,0:05:47.610 how does that work Chris? So you get notified there's an update and 0:05:47.610,0:05:52.229 I got a call from my office in fact yesterday that they had done that 0:05:52.229,0:05:56.699 the KMail call that I had to look into 0:05:56.699,0:06:03.699 but it just notifies you and you can just -download an ISO or download a patch +download an ISO or you can just download a patch >> CHRIS: it notifies, downloads and applies the patch to your system >> MATT: brilliant >> CHRIS: on the fly 0:06:06.479,0:06:08.319 >> MATT: and of course now we have a WiFi tool 0:06:08.319,0:06:09.620 which is really cool 0:06:09.620,0:06:13.569 it'll scan and you just double click on that -network +networking 0:06:13.569,0:06:16.080 and enter your WPA or WEP key and 0:06:16.080,0:06:19.489 it'll remember these 0:06:19.489,0:06:20.990 -%uh we've got +Uh we've got 0:06:20.990,0:06:22.900 improvements to the PBI removal tool 0:06:22.900,0:06:27.249 -who is similar to the add / remove programs +which is similar to the add / remove programs from Windows 0:06:27.249,0:06:28.699 so I'll show you that 0:06:28.699,0:06:31.899 -%uh the new sound detection program +Uh the new sound detection program 0:06:31.899,0:06:36.339 and we now finally have an amd64 build 0:06:36.339,0:06:40.580 as of PC-BSD 1.5 0:06:40.580,0:06:45.259 so actually that you can follow along in the your slides 0:06:45.259,0:06:52.259 I'm going to drop out of this and show you the actual installation 0:06:56.500,0:07:03.190 it's like a cooking show 0:07:03.190,0:07:06.349 okay so here's our first screen after a very typical looking - 0:07:06.349,0:07:08.430 FreeBSD bootstrap 0:07:08.430,0:07:11.970 and we have different languages and of course keyboard layouts 0:07:11.970,0:07:15.190 and we do have Japanese and I believe that Chris already installed 0:07:15.190,0:07:16.730 the Japanese version, is that right 0:07:16.730,0:07:19.189 so you have it running upstairs on the laptop? 0:07:19.189,0:07:21.199 oh right here? awesome 0:07:21.199,0:07:25.249 I would have done that but then I wouldn't have been able to read anything 0:07:25.249,0:07:28.009 -we default to allowing submitting +we default to allow submitting 0:07:28.009,0:07:31.370 usage statistics to FreeBSD stats 0:07:31.370,0:07:33.250 and the reason we do that 0:07:33.250,0:07:36.530 is so that when I go to talk to companies like Adobe 0:07:36.530,0:07:41.589 to persuade them to give us a native Flash 9 0:07:41.589,0:07:45.629 which Kirk has already appeared out there 0:07:45.629,0:07:51.019 this gives me a place I can point them to start to persuade for the business case 0:07:51.019,0:07:53.060 -for them supporting +of them supporting 0:07:53.060,0:07:54.370 BSD natively 0:07:54.370,0:07:59.419 and I think really close to seeing that this year 0:07:59.419,0:08:01.710 I think Desktop BSD are 0:08:01.710,0:08:05.169 I guess you can call them our competitor although we don't really compete 0:08:05.169,0:08:07.330 we collaborate a bit 0:08:07.330,0:08:12.179 they just now started defaulting to allowing these statistics and I saw a big jump in their 0:08:12.179,0:08:15.659 BSD stats 0:08:15.659,0:08:19.860 here is the license agreement, and all we have here is the BSD license, some of the Intel firmware licenses, 0:08:19.860,0:08:26.860 and then, that's about it 0:08:28.249,0:08:33.390 -I'm going to go ahead and agree +Anyway, I'm going to go ahead and agree 0:08:33.390,0:08:37.300 here's where I can do a fresh install or update my existing system 0:08:37.300,0:08:40.250 the update basically 0:08:40.250,0:08:42.379 %uh Chris, how does the update work? It TARs up 0:08:42.379,0:08:44.780 the user's home directory? 0:08:44.780,0:08:49.000 [mumbles] 0:08:49.000,0:08:56.000 and we've done it many times at work so far and it works pretty darn well 0:09:11.250,0:09:17.850 so there you see, I didn't enter that correctly, I was just testing that 0:09:17.850,0:09:19.290 so now the passwords match up 0:09:19.290,0:09:21.020 I go ahead and enter 0:09:21.020,0:09:28.020 a default user 0:09:36.120,0:09:38.680 you can choose your shells here 0:09:38.680,0:09:42.180 and Chris has added Bash as a default here as well, because 0:09:42.180,0:09:48.150 -well, the Linux users seem to prefer Bash +well, a lot of Linux users seem to prefer Bash 0:09:48.150,0:09:50.980 here's where I can toggle auto-login, the Windows people 0:09:50.980,0:09:56.740 they're used to it 0:09:56.740,0:09:57.819 here's your partitioning 0:09:57.819,0:10:02.950 Chris has changed the partitioning a little bit we used to have something where you actually could go in 0:10:02.950,0:10:06.210 and really tweak the partitioning and people were 0:10:06.210,0:10:08.190 -things and so right now +breaking things and so right now 0:10:08.190,0:10:10.120 it is kind of turned off for now 0:10:10.120,0:10:12.580 oh you can still do that, ok 0:10:12.580,0:10:15.740 what about what about adding 0:10:15.740,0:10:17.610 a partitioning tool something that 0:10:17.610,0:10:19.080 >> CHRIS: we've talked about it 0:10:19.080,0:10:21.770 >> MATT: it's dangerous, it's really dangerous 0:10:21.770,0:10:25.220 I'm going to go ahead, since I'm actually on a Mac, 0:10:25.220,0:10:26.699 I'm going to use the entire disk 0:10:26.699,0:10:29.550 I could customize and go setup my own 0:10:29.550,0:10:32.060 partitioning scheme 0:10:32.060,0:10:35.820 Chris, when are you going to bring back the server edition? 0:10:35.820,0:10:40.180 when we have enough tools to throw at it? >> CHRIS: we don't have enough tools 0:10:40.180,0:10:41.099 >> MATT: what it was 0:10:41.099,0:10:42.990 we had a server edition 0:10:42.990,0:10:44.900 and we removed it as it wasn't really doing much yet 0:10:44.900,0:10:49.150 and basically it dropped you into a default Fluxbox install 0:10:49.150,0:10:50.830 with minimal tools 0:10:50.830,0:10:52.360 so you could tweak it 0:10:52.360,0:10:54.469 once we bring that back, we'll have %uh 0:10:54.469,0:10:55.230 we'll have, based on iXsystems 0:10:55.230,0:11:00.100 based on the company's, the sponsors that come out here 0:11:00.100,0:11:04.300 we'll throw together some default partitionings that we see a lot of 0:11:04.300,0:11:06.620 as we %uh, as we ship out servers 0:11:06.620,0:11:08.169 and then have them in there as an option 0:11:08.169,0:11:13.210 like a LAMP server, a mail server, a DNS or what have you 0:11:13.210,0:11:14.390 this is cool 0:11:14.390,0:11:18.460 so now I can go ahead and choose add-ons 0:11:18.460,0:11:20.910 and add them on to the system 0:11:20.910,0:11:23.260 it's a short list right now 0:11:23.260,0:11:25.890 but you've got some cool stuff 0:11:25.890,0:11:27.299 I grabbed the source in ports we have %uh 0:11:27.299,0:11:29.260 Opera 0:11:29.260,0:11:32.689 they agreed within in forty eight hours when I asked them 0:11:32.689,0:11:34.180 that we could ship with 0:11:34.180,0:11:37.080 their Opera binary they said absolutely no problem 0:11:37.080,0:11:39.890 and Adobe agreed that we could ship with Flash 0:11:39.890,0:11:40.889 so we do 0:11:40.889,0:11:43.040 if you select any of these 0:11:43.040,0:11:50.040 %uh I'd have to insert the second disc so I'll go ahead and skip it 0:11:50.160,0:11:51.120 and then, there you go 0:11:51.120,0:11:57.120 very secure 0:11:57.120,0:12:04.120 so we'll let this cook 0:12:12.990,0:12:15.300 so now like the cooking show 0:12:15.300,0:12:19.020 I put it in the oven but I already have one finished 0:12:19.020,0:12:22.060 and so here's a finished PC-BSD installation 0:12:22.060,0:12:26.530 this is very close to what you would see by default although I've already gone and installed a few things 0:12:26.530,0:12:27.899 noticeably 0:12:27.899,0:12:32.040 on the right this is a very %uh this is very very cool when I show %uh 0:12:32.040,0:12:35.860 Windows web developers in particular love this 0:12:35.860,0:12:39.220 we can install what we call PAMP 0:12:39.220,0:12:40.860 I'm trying to come up with a better name 0:12:40.860,0:12:43.180 but for now it's PAMP 0:12:43.180,0:12:46.880 and that would of course by the Apache, MySQL and PHP stack 0:12:46.880,0:12:48.089 what's interesting is 0:12:48.089,0:12:52.590 the guy, I don't know who wrote this for us someone did this for us 0:12:52.590,0:12:54.290 you did it? 0:12:54.290,0:12:56.140 I do know the guy who did it 0:12:56.140,0:12:58.750 %uh I thought someone else did it originally? 0:12:58.750,0:13:01.580 did you update it? yeah? okay, great 0:13:01.580,0:13:02.310 this was great 0:13:02.310,0:13:05.199 I just took a class at UC Santa Cruz 0:13:05.199,0:13:09.190 I showed the teacher this and she had me show the entire class 0:13:09.190,0:13:11.130 once I had showed her 0:13:11.130,0:13:12.449 -literally two clicks +in literally two clicks 0:13:12.449,0:13:15.980 we install %uh Apache, PHP, MySQL 0:13:15.980,0:13:18.060 and then we get some nice little icons 0:13:18.060,0:13:20.960 %uh to start and to stop 0:13:20.960,0:13:22.580 we can %uh 0:13:22.580,0:13:24.199 just instantly switch 0:13:24.199,0:13:26.440 the PHP versions 0:13:26.440,0:13:28.300 -with the %uh web devs really like +with the %uh you know web devs really like 0:13:28.300,0:13:30.660 for testing 0:13:30.660,0:13:32.790 you get a little drop down to switch the version 0:13:32.790,0:13:35.710 especially, I noticed that even in this class 0:13:35.710,0:13:40.449 these guys are you know CSS wizards 0:13:40.449,0:13:43.050 and xHTML wizards and they've never seen a command line 0:13:43.050,0:13:43.959 and so 0:13:43.959,0:13:49.069 everyone was looking at you know this is my Mac that I use for testing but I have a PC-BSD laptop 0:13:49.069,0:13:50.280 as well 0:13:50.280,0:13:52.040 for work this is my personal Mac 0:13:52.040,0:13:55.009 but for work I use my PC-BSD laptop 0:13:55.009,0:13:56.940 and so I had that at the class 0:13:56.940,0:14:00.110 and I was able to share and everyone was like what the hell are you doing? 0:14:00.110,0:14:02.190 and so I gave them a quick demo 0:14:02.190,0:14:02.950 and %uh 0:14:02.950,0:14:05.370 you see here we can put a little icon 0:14:05.370,0:14:06.299 down in the tray 0:14:06.299,0:14:09.770 that lets us easily start and stop and monitor the services 0:14:09.770,0:14:13.420 %uh for someone that's not familiar with how these work 0:14:13.420,0:14:14.989 we can even go in and edit 0:14:14.989,0:14:16.229 -the HTTPD.conf +the httpd.conf 0:14:16.229,0:14:22.300 -or the PHP.ini +or the php.ini 0:14:22.300,0:14:26.970 and so this is just one of the one hundred packages that we have building 0:14:26.970,0:14:29.050 and this is a really cool one 0:14:29.050,0:14:31.460 and then they can open the web root 0:14:31.460,0:14:35.040 or open their personal web root or toggle the web sites around 0:14:35.040,0:14:37.549 so a pretty clever tool for manipulating 0:14:37.549,0:14:39.160 -Apache, MySQL or PHP +Apache, MySQL and PHP 0:14:39.160,0:14:41.220 via the GUI 0:14:41.220,0:14:44.060 and it installs that %uh that 0:14:44.060,0:14:48.230 MySQL GUI admin tool that I've never used 0:14:48.230,0:14:49.660 yeah yeah they love that stuff 0:14:49.660,0:14:52.110 everyone in the class knew what that was 0:14:52.110,0:14:54.410 and I was like, what? 0:14:54.410,0:14:56.940 now let me show you the big deal 0:14:56.940,0:14:58.279 this is a PBI 0:14:58.279,0:15:00.320 that I downloaded 0:15:00.320,0:15:04.690 off of PBIDir.com 0:15:04.690,0:15:06.960 -so this is the this is the GIM +so this is the this is the GIMP 0:15:06.960,0:15:09.090 and I'm going to install it 0:15:09.090,0:15:11.330 on a very fresh installation 0:15:11.330,0:15:14.120 the icon you get in the upper left hand corner 0:15:14.120,0:15:16.090 says Get PBIs and %uh 0:15:16.090,0:15:19.880 and it just opens up a Konqueror window directly to the website 0:15:19.880,0:15:22.210 I've been talking to Chris about maybe in the future 0:15:22.210,0:15:23.089 having the %uh 0:15:23.089,0:15:26.820 maybe grabbing the Desktop BSD's port tool 0:15:26.820,0:15:28.170 having that on a tab 0:15:28.170,0:15:31.410 and then having a PBI add / remove 0:15:31.410,0:15:37.360 on the other tab so that you can just browse all the programs that you can install via a port, package or PBI 0:15:37.360,0:15:40.410 on one single interface 0:15:40.410,0:15:43.720 so I'm going to install the GIMP 0:15:43.720,0:15:50.720 I'm going to agree to that nasty license 0:15:59.090,0:16:01.530 I love these graphics that Kinsalez does 0:16:01.530,0:16:08.530 ok and finished 0:16:15.030,0:16:16.560 and there you go 0:16:16.560,0:16:18.460 we got the GIMP on there 0:16:18.460,0:16:21.310 and it created of course a menu icon 0:16:21.310,0:16:23.480 in here as well 0:16:23.480,0:16:25.180 under the GIMP 0:16:25.180,0:16:31.910 so now I could easily upgrade this in fact when the PBI gets updated it will notify me 0:16:31.910,0:16:36.590 that hey there's a new GIMP do you want to download and install it right now? and you just click yes and it 0:16:36.590,0:16:38.540 downloads and installs and keeps %uh 0:16:38.540,0:16:42.780 your GIMP preferences or whatever the application preferences that you already have in there 0:16:42.780,0:16:47.130 and then since we're targeting mostly you know, easy to use 0:16:47.130,0:16:49.480 desktop operating systems specifically 0:16:49.480,0:16:52.869 for Windows users so we have a lot of familiar tools for them 0:16:52.869,0:16:57.050 if you go into the Start menu and look at the settings, and here's my software 0:16:57.050,0:17:00.880 there's the add / remove that I was telling you about 0:17:00.880,0:17:02.790 and so I'll go in and 0:17:02.790,0:17:09.790 we will remove it 0:17:10.190,0:17:12.959 so here's all the software I have installed 0:17:12.959,0:17:14.640 you can see the GIMP there 0:17:14.640,0:17:17.630 and really since the GIMP 0:17:17.630,0:17:21.090 is really just installed in our 0:17:21.090,0:17:26.370 own little directory structure here 0:17:26.370,0:17:27.610 so you can see 0:17:27.610,0:17:28.809 the GIMP and 0:17:28.809,0:17:30.009 all its libs 0:17:30.009,0:17:37.009 are hiding in here 0:17:37.820,0:17:39.530 that's the %uh, I don't know if you can see that 0:17:39.530,0:17:42.890 but it's the automatic directory structure that's created 0:17:42.890,0:17:49.890 from the scripts that we use on the auto-building server 0:17:50.270,0:17:52.570 and so I go ahead and click remove 0:17:52.570,0:17:56.970 and of course all this is really doing is an rm -rf on there 0:17:56.970,0:17:58.940 and bam - gone and there's a little script 0:17:58.940,0:18:05.940 that pulls the icons out of there and notifies you that it is gone 0:18:10.330,0:18:15.470 and we've got a services manager 0:18:15.470,0:18:18.760 this is actually PC-BSD 1.4 0:18:18.760,0:18:22.460 but we've got 1.5 running upstairs 0:18:22.460,0:18:27.850 that didn't have any PBIs to show on 1.5 0:18:27.850,0:18:29.690 and so here, of course, 0:18:29.690,0:18:36.400 anyone who has used Windows you can see this looks very similar to whatever that Windows tool is called 0:18:36.400,0:18:38.540 so we can start / stop services 0:18:38.540,0:18:40.290 that are enabled in the start-up 0:18:40.290,0:18:41.350 and so you know 0:18:41.350,0:18:45.770 it’s not like this can replace a system administrator but it sure %uh 0:18:45.770,0:18:49.580 well I know that everyone at our office runs this of course 0:18:49.580,0:18:52.440 and most of our family members now are running it 0:18:52.440,0:18:54.980 and I was down at 0:18:54.980,0:18:56.580 the Luxor in Las Vegas 0:18:56.580,0:18:59.090 and I was wearing my FreeBSD shirt 0:18:59.090,0:19:00.870 and I'm sitting at the pub 0:19:00.870,0:19:01.760 and this guy goes 0:19:01.760,0:19:03.930 you've heard of FreeBSD? 0:19:03.930,0:19:05.120 and I go 'yeah, dude' 0:19:05.120,0:19:07.710 he goes have you heard of PC-BSD? 0:19:07.710,0:19:09.669 and I thought it was really cool that 0:19:09.669,0:19:15.010 this random bartender down in Vegas is telling me about PC-BSD. I go 'yeah, I've heard of that'. 0:19:15.010,0:19:19.020 he goes 'we're running that at home, dude, it's cool' 0:19:19.020,0:19:26.020 so I went into the room and got some swag for him and he was so happy 0:19:29.350,0:19:33.530 we've got our own users tool we've got a WiFi tool 0:19:33.530,0:19:35.170 %uh 0:19:35.170,0:19:39.540 -we did we do our own user management tool +Why don't we do our own user management tool over the KDE one? 0:19:39.540,0:19:42.090 >> CHRIS: it was the only sensible option 0:19:42.090,0:19:42.910 >> MATT: yeah 0:19:42.910,0:19:47.410 you know we're trying to get closer involved with the KDE guys 0:19:47.410,0:19:50.300 so that they test a little more on FreeBSD 0:19:50.300,0:19:53.010 because we've discovered some of their stuff just doesn't compile 0:19:53.010,0:19:54.630 or work properly 0:19:54.630,0:19:57.760 and we have to create BSD-specific tools for them 0:19:57.760,0:20:02.080 it would be nicer if we had a little more collaboration there 0:20:02.080,0:20:04.810 there's your online update manager where I can go 0:20:04.810,0:20:06.620 and manually check for updates 0:20:06.620,0:20:10.090 and install them 0:20:10.090,0:20:13.910 and I've got my %uh 0:20:13.910,0:20:15.409 my network settings 0:20:15.409,0:20:19.799 which pulls up the WiFi tool which is really easy to use. I don't think it'll pull up 0:20:19.799,0:20:21.039 because my Mac 0:20:21.039,0:20:23.170 doesn't translate it 0:20:23.170,0:20:26.750 but it's pretty darn easy to use 0:20:26.750,0:20:30.190 actually, this is the old one huh? 0:20:30.190,0:20:37.190 we've got the new one upstairs it's even better 0:20:42.230,0:20:49.230 almost done 0:20:58.450,0:21:01.760 ah yes, so we didn't see this yet this is the X window configurator 0:21:01.760,0:21:05.690 and so this is really cool if you've got a supported 3D graphics card 0:21:05.690,0:21:06.970 you can go ahead 0:21:06.970,0:21:08.280 and select it here 0:21:08.280,0:21:11.220 and be running Beryl right at startup 0:21:11.220,0:21:13.160 so when we do trade shows 0:21:13.160,0:21:15.280 which is part of what I do 0:21:15.280,0:21:17.100 to evangelize FreeBSD 0:21:17.100,0:21:20.000 we bring along a 32 inch LCD 0:21:20.000,0:21:25.850 and we throw PC-BSD up there with Beryl running in it, and boy people just go nuts over it 0:21:25.850,0:21:27.160 over those windows 0:21:27.160,0:21:29.070 you know, those squares, Beryl stuff 0:21:29.070,0:21:32.380 I'm over it already, but 0:21:32.380,0:21:34.090 and there's the boot screen 0:21:34.090,0:21:36.940 and the update manager I've already covered the update 0:21:36.940,0:21:39.600 there's looking for a new PBI update 0:21:39.600,0:21:43.530 this was the test you were running for the FireFox one before you rolled it out 0:21:43.530,0:21:47.420 so I was testing it and grabbing screenshots 0:21:47.420,0:21:51.660 and then it installed it and then it told me it was finished 0:21:51.660,0:21:53.500 sure enough it fired right up and worked like a charm 0:21:53.500,0:21:55.040 so, very cool 0:21:55.040,0:21:57.460 we just did this 0:21:57.460,0:22:00.530 in fact 0:22:00.530,0:22:03.010 the GIMP and we removed it 0:22:03.010,0:22:06.370 so, how can you help? 0:22:06.370,0:22:07.580 well you could grab a CD 0:22:07.580,0:22:10.190 today and install PC-BSD 0:22:10.190,0:22:14.240 and certainly one of the biggest contributions any user can do 0:22:14.240,0:22:15.980 is reporting bugs back to us 0:22:15.980,0:22:17.580 I noticed, I don't know, last month 0:22:17.580,0:22:23.810 I think people had reported just a really small list of bugs, but you troll the forums and they're complaining in there 0:22:23.810,0:22:26.900 so you go on and say, please report the bug where we will see it 0:22:26.900,0:22:28.429 because we can't be 0:22:28.429,0:22:31.810 trolling ten thousand posts every day 0:22:31.810,0:22:35.540 that would be one way you could help documentation and translations 0:22:35.540,0:22:37.370 it would be nice if 0:22:37.370,0:22:37.980 %uh 0:22:37.980,0:22:41.490 I don't know, who did our Japanese translation? 0:22:41.490,0:22:42.239 we don't even know 0:22:42.239,0:22:47.320 it would be cool if a Japanese native speaker could take a look at it and say 'hey, there are some errors here' 0:22:47.320,0:22:48.010 %uh 0:22:48.010,0:22:49.050 maybe it was a 0:22:49.050,0:22:54.030 %uh a British or an American guy who speaks Japanese and maybe he made some mistakes 0:22:54.030,0:22:57.700 -%uh some CDs out, download them, tell your friends +%uh pass some CDs out, download them, tell your friends 0:22:57.700,0:22:58.999 get your Mom on it 0:22:58.999,0:23:01.890 and prepare for all the phone calls 0:23:01.890,0:23:03.320 and of course evangelize 0:23:03.320,0:23:08.299 if you can do C, Qt, or Shell programming we can always use help there 0:23:08.299,0:23:10.340 and you can just email the folk 0:23:10.340,0:23:12.169 or go to the forums 0:23:12.169,0:23:15.059 or the PC-BSD web site and see how to contact us 0:23:15.059,0:23:19.530 and there we have a core team list there very similar to FreeBSD 0:23:19.530,0:23:24.540 so you can email the core team of PC-BSD and everyone will see that 0:23:24.540,0:23:27.460 alright, so that's PC-BSD in a nutshell 0:23:27.460,0:23:36.000 does anyone have any questions 'cause we have Chris in the room 0:23:36.000,0:23:35.450 yes? 0:23:35.450,0:23:39.750 >> AUDIENCE MEMBER: like, so %uh [unclear] 0:23:39.750,0:23:43.890 most of the computer is like a desktop you know, it's an old computer 0:23:43.890,0:23:48.890 so, %uh, does this system have a driver for the, like, the sound card 0:23:48.890,0:23:54.090 >> MATT: well this is FreeBSD 6.3 so yeah, absolutely, FreeBSD 0:23:54.090,0:23:56.070 supports the older hardware really really well 0:23:56.070,0:23:59.559 from my experience 0:23:59.559,0:24:02.190 any other questions? 0:24:02.190,0:24:06.299 we have the FreeBSD table upstairs 0:24:06.299,0:24:12.640 -so stop on by before I drink too much sake! +so stop on by before I drink too much sake! 0:24:12.640,0:24:17.770 what's the latest on BSD stats? I mean, there's always a certain percentage of people 0:24:17.770,0:24:19.250 that turn off the reporting 0:24:19.250,0:24:22.260 for some weird reason 0:24:22.260,0:24:24.650 last month we had ten thousand installs 0:24:24.650,0:24:26.859 so you know - how many of those keep? 0:24:26.859,0:24:30.859 it's really hard to say, right Yes? 0:24:30.859,0:24:36.120 >> AUDIENCE MEMBER: Matt, two questions I'm from China 0:24:36.120,0:24:40.220 does FreeBSD or PC-BSD support Chinese? 0:24:40.220,0:24:42.750 >> CHRIS: we've had people translate into Chinese, yes 0:24:42.750,0:24:55.360 >> AUDIENCE MEMBER: we are interested in this project -because we've have seen that some consumers +because we have some Linux consumers we've tried to persuade them to use PC-BSD instead 0:24:55.360,0:24:59.320 >> MATT: this, this is great, we'd love to help you out especially convincing Linux consumers 0:24:59.320,0:25:02.130 ->> AUDIENCE MEMBER: can we, can we join this team? +>> AUDIENCE MEMBER: can we join this team? 0:25:02.130,0:25:03.990 >> MATT: yes absolutely 0:25:03.990,0:25:05.199 we would love to have you 0:25:05.199,0:25:15.670 >> AUDIENCE MEMBER: finally, can -PC-BSD have an alternative login like KDM? +PC-BSD have an graphic login interface like KDM? 0:25:15.670,0:25:21.490 >> MATT: yeah, it already does, it already does so on the install, you just uncheck auto-login 0:25:21.490,0:25:23.440 and then it'll pull up with a customized KDM 0:25:23.440,0:25:30.130 >> AUDIENCE MEMBER: final question, -so does PC-BSD one disk? +Is PC-BSD one disc? 0:25:30.130,0:25:33.600 >> MATT: yeah, I just install off -of this one disk +of this one disc 0:25:33.600,0:25:36.820 -the second disk contains some optional +the second disc contains some optional 0:25:36.820,0:25:41.400 yes, some optional components as well as some language translations 0:25:41.400,0:25:43.860 but yeah, if you want to change the language 0:25:43.860,0:25:47.190 -during the install you would need the second disk +during the install you would need the second disc 0:25:47.190,0:25:49.160 >> AUDIENCE MEMBER: can we contact you after the conference? 0:25:49.160,0:25:50.550 >> MATT: absolutely and I would love it 0:25:50.550,0:25:55.650 we just had a school, an entire school district in France switch over to PC-BSD so %uh 0:25:55.650,0:25:58.900 we're doing a case study 0:25:58.900,0:25:59.539 so we can throw that up on the FreeBSD site 0:25:59.539,0:26:06.100 they were ecstatic 0:26:06.100,0:26:08.830 yeah, they were absolutely ecstatic and were all like, how can we help? 0:26:08.830,0:26:13.160 so all the servers in the city in France were already on FreeBSD 0:26:13.160,0:26:17.400 so when the school district contacted them to talk about 0:26:17.400,0:26:20.980 upgrading their Windows installs they said why don't we do a test run 0:26:20.980,0:26:25.960 with the PC-BSD and see how you guys like it and they said that the teachers and students loved it 0:26:25.960,0:26:27.250 so they rolled it out 0:26:27.250,0:26:29.400 and they rolled it out without having any issues 0:26:29.400,0:26:34.179 %uh we asked them, you know, I sent them a bunch of questions and they responded you know, what kind of issues did you have 0:26:34.179,0:26:36.160 how did you solve them? 0:26:36.160,0:26:37.799 how do you do upgrades 0:26:37.799,0:26:39.980 and so on and so on 0:26:39.980,0:26:46.980 the iXsystems marketing girl is -synthesing that into a case study that +synthesizing that into a case study that we'll release shortly 0:26:48.480,0:26:50.750 absolutely 0:26:50.750,0:26:51.809 yes, Jason? 0:26:51.809,0:26:56.760 >> JASON: are there things like, %uh remote home directories 0:26:56.760,0:26:01.980 to take your school example are so students login to one PC and 0:26:01.980,0:26:03.120 they have the same home directory? 0:26:03.120,0:26:05.080 >> AUDIENCE MEMBER: like Terminal Server? 0:26:05.080,0:26:10.150 >> JASON: well, not necessarily a Terminal Server but more, I don't know, let's go down the Windows path 0:26:10.150,0:26:16.320 what do they call it? they call it a Domain server where you can bounce your home directories 0:26:16.320,0:26:17.010 >> AUDIENCE MEMBER: because it's all just FreeBSD 0:26:17.10,0:27:22.290 under the hood so you could >> MATT: yeah, we don't have any graphical tools right now for that 0:27:22.290,0:27:23.860 but any FreeBSD sys admin 0:27:23.860,0:27:25.770 could make it sit up and beg 0:27:25.770,0:27:27.570 what we are working on 0:27:27.570,0:27:30.320 right now some cool PXE stuff 0:27:30.320,0:27:32.500 so you'll be able to 0:27:32.500,0:27:34.360 boot off of a live CD 0:27:34.360,0:27:36.630 and then install tons of machines 0:27:36.630,0:27:41.549 from that one installation so that's pretty cool 0:27:41.549,0:27:43.950 any other questions 0:27:43.950,0:27:46.780 >> AUDIENCE MEMBER: when are you planning the next PC-BSD release? 0:27:46.780,0:27:57.070 >> CHRIS: 1.6 we're aiming for the end of the summer to base the first one off FreeBSD 7 0:27:57.070,0:28:03.680 ideally, we'd like to use ZFS as well 0:28:03.680,0:28:06.460 ->> MATT: KDE4 has a few bucks +>> MATT: KDE4 has a few bugs 0:28:06.460,0:28:10.780 so I think we should probably wait for 4.1 0:28:10.780,0:28:17.780 I've been reporting tons of them 0:28:22.010,0:28:24.510 [unclear question] 0:28:24.510,0:28:27.950 yes and PC-BSD 1.6 will %uh 0:28:27.950,0:28:29.450 include support for ZFS 0:28:29.450,0:28:32.020 with the front-end to it 0:28:32.020,0:28:33.130 and I don't want to put you on the spot 0:28:33.130,0:28:35.530 and %uh jails 0:28:35.530,0:28:39.700 I don't want to put you on the spot that'd be cruel 0:28:39.700,0:28:42.300 okay well, come see us at the -table thank you very much" +table thank you very much