Advanced Operating Systems (9 CFU)
MS Degree in Computer Engineering
Academic Year 2022/2023

Lecturer: Francesco Quaglia


The examination requires fulfilling the development of a project in the Linux kernel, which must comply with the following specification. Each student should develop the project individually.

Block-level data management service

This specification is related to a Linux device driver implementing block-level maintenance of user data, in particular of user messages. A block of the block-device has size 4KB and its layout is organized as follows: Clearly, the lower the value of X the better since larger messages can be actually managed by software.

The device driver is essentially based on system-calls partially supported by the VFS and partially not. The following VFS non-supported system calls are requested to be designed and implemented:

When putting data, the operation of reporting data on the device can be either executed by the page-cache write back daemon of the Linux kernel or immediately (in a synchronous manner) depending on a compile-time choice.

The device driver should support file system operations allowing the access to the currently saved data:

The device should be accessible as a file in a file system supporting the above file operations. At the same time the device should be mounted on whichever directory of the file system to enable the operations by threads. For simplicity, it is assumed that the device driver can support a single mount at a time. When the device is not mounted, not only the above file operations should simply return with error, but also the VFS non-supported system calls introduced above should return with error (in particular with the ENODEV error).

The maximum number of manageable blocks is a parameter NBLOCKS that can be configured at compile time. A block-device layout (its partition) can actually keep up to NBLOCKS blocks or less. If it keeps more than NBLOCKS blocks, the mount operation of the device should fail. The user level software to format the device for its usage should also be designed and implemented.

Project delivery

Projects can be delivered (for analysis and discussion) at any scheduled tutoring slot