Presenting at SIGCSE 2010

As you may or may not know, here at HPI, we use the WRK pretty intense for teaching operating systems. Since the WRK has been released, we have developed a couple of programming projects, each dealing with a particular OS subject or principle. The goal behind those projects was to enable our students to use the WRK to experiment with certain parts of it and to experience implications of different design and implementation rationals.

However, when we started doing this, we ran into several problems, most of which are related to complexity of the WRK. First of all, we experienced that our students were not very familiar with the provided nmake-based build environment. Second, deploying the kernel onto a test system is way different than running a usual application. This also includes the debugging process. Finally, the complexity of the WRK requires students to thoroughly study the sources of the kernel prior to actually do some programming. While studying the WRK first is not the worst idea, it takes way too much time to understand each and every detail of the implementation. In many cases, it is however as sufficiently to understand only portions of it.

To persist our methodology, our experiences, our experiments, and the feedback our students gave us, we wrote a paper, which has been accepted for presentation at the 41st ACM Technical Symposium on Computer Science Education (SIGCSE 2010), in Milwaukee, WI, USA. If you are interested in our findings, please have a closer look on our paper –- Teaching Operating Systems – Windows Kernel Projects –, which can be found on the conference website. We will also post the slides of the talk here anytime soon.

Numbered Queued Spinlocks in the WRK

In a recent post, we covered the implementation of in-stack queued spinlocks, the recommended method to use queued spinlocks in drivers. In this article, we would like to extend the discussion to a second class of queued spinlocks: numbered queued spinlocks. These well-known locks use per processor, pre-allocated memory to store the processor’s queue item. In this article, we will give a short overview over the existing queued spinlocks in the WRK, how they are initialized and how they are used.

Read more

Queued Spinlocks in the WRK

A few days ago, we came up with a discussion on the advantages of queued spinlocks over normal spinlocks. The biggest advantage in our oppinion is that queued spinlocks guarantee a FIFO ordering among competing processors while normal spinlocks don’t. In this article, we show the implementation of queued spinlocks in the WRK. We present the source code of the 64-bit version for two reasons: first, the 64-bit version contains the implementation in plain C and not in the Assembly language, and second, in the 32-bit version, queued spinlocks are implemented in the HAL, which is not available as source code. The rational behind the implementation remains however the same.

Read more

Windows 7 and Server 2008 R2 Kernel Changes (TechEd Europe 2009)

Michael and I got the chance to attend TechEd Europe 2009 in Berlin, where Mark Russinovich was giving a great talk about the changes within the Windows 7 and Server 2008 R2 kernels. And although this blog is about the WRK and its details, we thought it might still be valuable to stay up to date with current OSes.

Mark’s talks can also be found on Web: PDC 2009 talk, Channel 9 talk.

For those who don’t have the time for watching the whole 70 minute presentation, here is a summary of the changes:

Read more

Resolved: A Performance Issue in Windows Timer Management

Two years ago, I wrote an article about spurious timer table entries. Those entries occurred in the global timer table and resulted in unnecessarily scheduled DPCs. During a recent visit in Redmond, I had the chance to meet with one of the Windows kernel developers. By coincidence, he remembered my article and told me that with Windows 7 the issue has been fixed. Here is how they did it.

Read more

NtCreateThread – memory allocations in kernel mode

In this post we try to determine how much kernel memory is required when creating a new thread. This amount of memory is relevant for the upper bound of the number of possible threads in the system as investigated in detail by Mark Russinovich.

For a starting point we looked at the system service call implementation of NtCreateThread and followed every possible code path down to memory allocation functions such as ExAllocatePoolWithTag.

Read more

WRK @ HPI First Hit on Bing

Well, it required us some work, but finally it pays off :)

At least on the US version of bing, our blog is the first entry on the result list. As Bing is sometimes strange and does not work properly if you do not set its locale to English (US), here is a screen shot to prove my claim:

Read more


Lists are a basic data structure in any operating system kernel, e.g. used for thread queue management. The WRK provides a set of struct definitions and list related functions/macros. In this post a short survey of these elements is given.

Read more

How To: Debug the WRK on Mac OS X Using VirtualBox

This article describes how to configure VirtualBox on a Mac OS X system that allows both developing and debugging the WRK at the same time.

Read more

Howto: Adding a new kernel module

The Windows Research Kernel contains multiple kernel modules, e.g. for memory management or for the executive layer. Each module has its own subdirectory in base/ntos. If you want to extend the WRK it might be useful to collect all your new files in a new kernel module. This post explains the necessary steps for adding a new kernel module. Basically, all it takes is tweaking a few makefiles.

Read more

← Previous PageNext Page →