Giving a Presentation in Linux

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Hi guys,

background: I'm taking an Operating System class in which we get to add functionality to a barebones operating system called Nachos. I volunteered to give a presentation on Linux and its kernel, as well as other things that relate to the class. I'm doing this for extra credit and for expanding my knowledge in Linux. My knowledge in Linux so far has been 3 years of using Debian and compiling as well as troubleshooting. The topics that we have covered in the class so far are:
  • Concurrency
  • Processes
  • Threads
  • Scheduling Algorithms
  • Synchronization
  • Deadlocks
  • Memory Management
  • Virtual Memory

Questions:
1) I would like to show kernel compile as well as aspects related to topics above. What docs could I read to find more Linux specific information on these topics?

2) I would like to show some code from the Linux kernel that relates to some of the topics covered in class. I've read a book in C. How would I go about being able to talk about some code? Meaning how can I familiarize myself with the code? Are there any guides to understanding it ? Which part of the Linux kernel code is easiest to understand? Where should I start?

3) Besides talking about the Linux kernel, and showing how some of the code in the Linux kernel code works, what else can I show?

4) What other links do you know that can help me prepare for this presentation?

5) Are there any other topics that you think I should talk about in this presentation?

Thanks a lot for your help in advance,
pitupepito
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
jeez. The Linux kernel is probably going to be one of the more complex peices of software you/I'll ever realy see. It's a big multitasking, multithreaded, pre-emtive monster (except maybe Mozilla) 44+ megs (bzip2 compression) of gcc-centric pure C code with a bit of assembly thrown in.

picard:/usr/src# du -sh kernel-source-2.6.8
217M kernel-source-2.6.8

:)

check out
http://www.kernelnewbies.org/
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Thanks a lot for tha link drag. It is sooo useful. Yep, due to the hugeness of most operating systems we are working with Nachos:
http://www.cs.washington.edu/homes/tom/nachos/

We look at the fundamental algorithms that operating systems use. Drag, which topic of the above (in my first thread) do you find the most interesting or easiest to give a talk in? The talk is about 40 to 45 minutes long.

Thanks a lot in advance,
pitupepito
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I donno.

I've always found memory management interesting. Over Linux's lifetime it's had several memory managment scemes, each with their own plusses and minuses.

Also I find the scedualling of tasks in the OS interesting. For the most part of Linux it's been kept as simple as possible, with Linux 2.6 you have had significant improvements in scalabiltiy. Previously you've always had 0(n) scedualing performance, but with 2.6 you have 0(1) scedualing performance.. Meaning that previously as the demands have increased (the amount of CPU's, the amount of proccesses) the worse Linux performed.

It was bad enough that above 4 cpus you'd hit a brick wall were at 8 cpus you'd have half the cpus running at full load just trying to keep things scedualed properly.

Then there is NUMA support.. Meaning that in systems like the newer Opterons were memory was different distances from different cpus the OS can handle the memory in such a way that it cuts down on one cpu trying to read memory from a far/slow memory bank and use local memory.

Previous linuxes couldn't do this and thus would only work well on SMP-setups. Now with Linux 2.6 it has no increase in overhead the amount of CPU's or proccesses/threads you pile on.

HP has proven that the vanilla kernel can automaticly detect and configure itself for a changing NUMA setup and worked with no degregation of performance on systems with 64 cpus.

Then you have pre-emptive-ness. Meaning that now the kernel can stop any proccess or pause anything going on to improve responsivemess. Previously you had locks were no matter what happenned you'd have to wait for certain parts of the kernel to proccess before you could interrrupt it. Now you can get close to realtime performance with a vanilla kernel.. meaning that you can have a set amount of latency. Important for embedded applications and audio workstations, among other things.

Also you can pick different scedualling scemes.. Different ones have different tuning effects.

Do you want best response for a user? that setup may be good for the desktop will be bad for a server. You don't want a http requiest to suddenly get interrrupted by another one. When doing backups to tape or CDROMS its very important to have a constant rate of information being moved, and you don't realy want that to be interrrupted because somebody did a 'ls' and cause a file corruption. There is a large amount of leway that goes on and a adminsitrator should be aware of it. http://www.aplawrence.com/Blog/B1028.html

They even went as far as to create a custom language for generating C code for non-kernel-hackers to be able to develop efficient scedualing scemes for specific applications. http://www.emn.fr/x-info/bossa/
Scedualing can be some pretty high-end computer science stuff and the type of guy that may be a good kernel hacker, may not be that great at designing overal systems. http://www.emn.fr/x-info/bossa/

You could go on about what a kernel does, and what ways it affects the performance of a system and stuff like that. There is a lot of documentation on various differences between 2.4 and 2.6
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Thanks a lot for your help drag. This gives me an excellent starting point. I now have more of a guide on what other people find interesting. I also have some nice links and lots of information.

Thanks again,
pitupepito
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
A good place to learn about the Linux kernel is in physical books. A while back I read Understanding the Linux Kernel (O'Reilly book) which covers 2.4 and am now reading Linux Kernel Development by Robert Love, at the very least you can head down to Barnes and Noble's and flip through it to find where something's at because the hardest part can be finding out in which files something is handled and it's even worse if something is arch specific and thus implemented in each arch directory.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Nothinman, I agree with you I like books too, but since the presentation is on Monday, I needed something quicker :( .

Nothinman, what part of the kernel do you find the most interesting ?

Thanks,
pitupepito
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Not that I know much about the linux kernel, but I've always found that articles in linux magazines give relatively straightforward explanations of specific kernel areas. They have nice things like architecture diagrams and source code snippets and a walk-through. Alot of them should be available online.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: pitupepito2000
Thanks kamper, what part of the linux kernel do you find interesting ?

thanks,
pitupepito
Just recently I read a few about usb and pcmcia drivers. I've read the odd one about filesystems and sound too. But I can't say what's really interesting, I'm just happy when I can understand some of it :eek:
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Nothinman, I agree with you I like books too, but since the presentation is on Monday, I needed something quicker .

Well if you have a book store nearby you could stop in and read there, but it's a little late now considering it's Sunday night.

Nothinman, what part of the kernel do you find the most interesting ?

It's hard to say, what I end up reading about mostly is VM, process management and filesystems because it's what most people misunderstand the most. Just look at all the "should I delete my pagefile?" threads. I subscribed to lkml a few years ago (I've even posted a few times =) ) and I try to at least skim all of the threads to keep up with what's going on in the kernel, but something that I've been watching closely lately is swsusp2 since I've been using it on my notebook.

Forget talking about linux and talk about HURD.

People have been talking about hurd for 20 years and it hasn't done any good so far...