Materials for STOS

Course

Slides:

Bibliography and References

Advices & instructions

Mail review of your patches

All your code submission must pass by a mail review to be validated, this will count as a bug part of your grade. Here is some advices and instructions for that:

Submission

For this project, you have to submit your work 2 times:

For the second part, we will review your patches, moslty the form, coding style and such. We will also give you advices on how to write better code.

Assignments

ksto-1: Memory Protection

For this first part, that serve as an introduction, you will implement a module that handle the GDT for STOS.

You have to submit your code on the branch named “k1”. For the patches sent by mail, you must have the prefix tag “k1”. (for example [PATCH k1])

You will need to implement set_gdt_gate() like its described inside <kernel/arch/pm.h>. The init function should set the segments for standard protected flat model with an high memory kernel, and a userland.

All the relevant segment selectors must also be set (don’t forget %es, %fs, and %gs.)

Pay attention to pm.h header, all the segment described there must be usable with your code. They don’t need to be set at init time, as you don’t have all the informations yet, but other part of the code might need them.

ksto-2: Events

For this second part, you will have to implement 3 modules, in order to have an functionnal event subsystem.

You have to submit your code on the branch named “k2”.

IDT

For this first module, you will need to implement 2 functions:

PIC

For this first module, you will need to implement 6 functions:

When you declare your irq handlers, the right type to use is:

struct irq_handler {
	/* needed fields for you irq */
	struct list_node next;
};

static struct list_node handlers[16];
PIT

For this module, you will need to implement 1 function:

ksto-3: Pagination

For this second part, you will have to implement 1 module, in order to have a working paging system.

You have to submit your code on the branch named “k3”.

Pagination

For this module, you will need to implement 5 functions:

ksto-4: Scheduling

In this last part, you will have to implement the scheduling inside the stos kernel. After this one, you should have a working OS, with the userland enabled.

You have to submit your code on the branch named “k3”.

Scheduling

For this module, you will need to implement 4 functions: