I need suggestions for a practical work related with Kernel Development
Hi! I'm new here and i what to introduce myself i'm teacher in a University in the course Operation Systems. During the course the students learn some Operatyng Systems concepts, specially everything relating to the Kernel. As a practice task, they also have to use C to make a program with some Kernel functionalities. This year this task consists on programming a File System (I chose FAT32 since I thought it was the easiest one to implement) using FUSE and simulating a Hard Disk and a RAID behavior. Since I'm not a Kernel expert I'm looking for some advice and ideas. The aim of the practice task I'm creating is to help the students make a program that simulates the behavior and functionalities of a Kernel (such as a File System, Memory Administrator, Planner, etc.), but at the same I would like those programs to really interact with the Kernel, being not only ideal simulation cases (like FUSE). But, as I said, I don't know that much to have a good idea of what can I use to make the most from the Kernel in the task. I could really use some ideas! Some of the things I have in mind: - Use netlinks - Build a kernel module - I'm also interested in the /dev/mem ¡Thanks a lot in advance!
From: kernelnewbies-bounces@kernelnewbies.org [mailto:kernelnewbies-bounces@kernelnewbies.org] On Behalf Of Facundo Viale Sent: Friday, August 26, 2011 11:19 AM To: kernelnewbies@kernelnewbies.org Subject: I need suggestions for a practical work related with KernelDevelopment Hi! I'm new here and i what to introduce myself i'm teacher in a University in the course Operation Systems. During the course the students learn some Operatyng Systems concepts, specially everything relating to the Kernel. As a practice task, they also have to use C to make a program with some Kernel functionalities. This year this task consists on programming a File System (I chose FAT32 since I thought it was the easiest one to implement) using FUSE and simulating a Hard Disk and a RAID behavior. Since I'm not a Kernel expert I'm looking for some advice and ideas. The aim of the practice task I'm creating is to help the students make a program that simulates the behavior and functionalities of a Kernel (such as a File System, Memory Administrator, Planner, etc.), but at the same I would like those programs to really interact with the Kernel, being not only ideal simulation cases (like FUSE). But, as I said, I don't know that much to have a good idea of what can I use to make the most from the Kernel in the task. I could really use some ideas! Some of the things I have in mind: - Use netlinks - Build a kernel module - I'm also interested in the /dev/mem ¡Thanks a lot in advance! I would think if the goal is to teach them about kernel development, then having them write an actual kernel module would be more to the point than some user space application accessing a netlink socket or peeking and poking RAM with /dev/mem. In a module you are running in kernel context so you have all the issues of memory management, different execution contexts (task context, IRQ context, soft IRQ context), synchronization to deal with that aren't issues when running some user space simulator. PCs are cheap these days. I assume each of your students would have access to his own so if his module panics the kernel of the machine he's debugging his module on, it won't affect the work of other students. If that's not the case maybe my advice is not so applicable, though even if they have to share systems they could each run their own kernel in their own virtual machine and the hypervisor would keep them out of each other's way. Actually, maybe that would be better since then they get a chance to learn a little about hypervisors too. Jeff Haran
From: kernelnewbies-bounces@kernelnewbies.org [mailto:kernelnewbies-bounces@kernelnewbies.org] On Behalf Of Facundo Viale Sent: Friday, August 26, 2011 11:19 AM To: kernelnewbies@kernelnewbies.org Subject: I need suggestions for a practical work related with KernelDevelopment Hi! I'm new here and i what to introduce myself i'm teacher in a University in the course Operation Systems. During the course the students learn some Operatyng Systems concepts, specially everything relating to the Kernel. As a practice task, they also have to use C to make a program with some Kernel functionalities. This year this task consists on programming a File System (I chose FAT32 since I thought it was the easiest one to implement) using FUSE and simulating a Hard Disk and a RAID behavior. Since I'm not a Kernel expert I'm looking for some advice and ideas. The aim of the practice task I'm creating is to help the students make a program that simulates the behavior and functionalities of a Kernel (such as a File System, Memory Administrator, Planner, etc.), but at the same I would like those programs to really interact with the Kernel, being not only ideal simulation cases (like FUSE). But, as I said, I don't know that much to have a good idea of what can I use to make the most from the Kernel in the task. I could really use some ideas! Some of the things I have in mind: - Use netlinks - Build a kernel module - I'm also interested in the /dev/mem ¡Thanks a lot in advance! Another thought would be to have them do some real kernel work. Take a look at : http://kernelnewbies.org/KernelJanitors Some of their code might then actually make it into the real kernel sources maintained at kernel.org. I would think being able to say that some of their code they wrote as students was accepted for inclusion in the real kernel would look a lot better on a resume to future prospective employers than being saying they did yet another implementation of FAT32. Jeff Haran
Hi.... On Sat, Aug 27, 2011 at 01:18, Facundo Viale <facundo.m.viale@gmail.com> wrote:
Hi! I'm new here and i what to introduce myself i'm teacher in a University in the course Operation Systems.
We have similarities in that aspect alone :) In my opinion, before you put your student into coding practice, it would be good to get them familiar with the kernel mechanism first. The best way I can think of, is by using Qemu and its gdb stub. Load a Linux kernel that is compiled with debugging symbols and let them play with it (put breakpoints here and there, use watchpoint etc).
From there, gradually ask them to alter few things like what if each tasks gets doubled time slice than normal? how it affects interactivity and so on. They could also hack magic sysrq a bit and do additional thing like simply triggering hello world.
Apologize if we have different view on how to teach OS, but hopefully you could grab the positive aspects here. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
On Fri, Aug 26, 2011 at 11:48 PM, Facundo Viale <facundo.m.viale@gmail.com> wrote:
Hi! I'm new here and i what to introduce myself i'm teacher in a University in the course Operation Systems. During the course the students learn some Operatyng Systems concepts, specially everything relating to the Kernel. As a practice task, they also have to use C to make a program with some Kernel functionalities. This year this task consists on programming a File System (I chose FAT32 since I thought it was the easiest one to implement) using FUSE and simulating a Hard Disk and a RAID behavior. Since I'm not a Kernel expert I'm looking for some advice and ideas. The aim of the practice task I'm creating is to help the students make a program that simulates the behavior and functionalities of a Kernel (such as a File System, Memory Administrator, Planner, etc.), but at the same I would like those programs to really interact with the Kernel, being not only ideal simulation cases (like FUSE). But, as I said, I don't know that much to have a good idea of what can I use to make the most from the Kernel in the task. I could really use some ideas! Some of the things I have in mind: - Use netlinks - Build a kernel module - I'm also interested in the /dev/mem ¡Thanks a lot in advance!
University of Massachusetts have a very well tailored OS coursework and is available online with plenty of details and exercises. Here's the link: http://pdos.csail.mit.edu/6.828/2010/ -Amit
participants (4)
-
amit mehta -
Facundo Viale -
Jeff Haran -
Mulyadi Santosa