Differences between revisions 16 and 19 (spanning 3 versions)
Revision 16 as of 2012-08-14 10:32:35
Size: 2193
Editor: bbb
Comment:
Revision 19 as of 2012-08-14 11:39:32
Size: 2378
Editor: bbb
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
A brief guide to creating a new scheduling plugin in LITMUS^RT^ (based on version 2012.2.) A brief guide to creating a new scheduling plugin in LITMUS^RT^ (based on version 2012.2).
Line 28: Line 28:
In the first seven steps, the tutorial re-creates a ''partitioned EDF'' (P-EDF) scheduler. In contrast to the PSN-EDF plugin shipping with LITMUS^RT^, the demo implementation does not support locking and non-preemptive sections to keep it simple. In the first eight steps, the tutorial re-creates a ''partitioned EDF'' (P-EDF) scheduler. In contrast to the PSN-EDF plugin shipping with LITMUS^RT^, the demo implementation does not support locking and non-preemptive sections to keep it simple.
Line 41: Line 41:

== Reference Implementation ==

A branch containing commits corresponding to each of the above steps is available at [[https://github.com/LITMUS-RT/litmus-rt/tree/wiki-tutorial]].

How to Create a Custom Scheduler Plugin in LITMUS^RT

A brief guide to creating a new scheduling plugin in LITMUSRT (based on version 2012.2).

Prerequisites

  • A testing environment (i.e., KVM/Qemu or Bochs). This tutorial assumes KVM.
  • Strong C programming skills.
  • Ideally, some exposure to OS kernel development.

General Guidelines

Work in a checked-out git repository. Do not use the tarball from the web page. This will make keeping track of your edits and incorporating upstream changes much easier.

Test incrementally to catch errors early. Compile test after each edit. Test-boot as often as possible. The earlier you catch an error, the easier it is to debug.

Commit early, commit often. Make many small commits a you go along. You can clean them up later using git rebase.

Do not commit to the master branch. This will make incorporating upstream changes much easier.

Follow the kernel coding standard defined in Documentation/CodingStyle, even when writing “throw away” code.

Steps

The tutorial is structured in a series of steps, which are intended to be completed sequentially. When working through these, you should reproduce the instructions on your own local machine. If something seems unclear, please feel free to ask on the mailinglist for clarification.

In the first eight steps, the tutorial re-creates a partitioned EDF (P-EDF) scheduler. In contrast to the PSN-EDF plugin shipping with LITMUSRT, the demo implementation does not support locking and non-preemptive sections to keep it simple.

To be continued... please contribute.

Reference Implementation

A branch containing commits corresponding to each of the above steps is available at https://github.com/LITMUS-RT/litmus-rt/tree/wiki-tutorial.

CreateAPluginTutorial (last edited 2014-06-12 15:51:56 by bbb)