Advanced Operating Systems (9 CFU)
MS Degree in Computer Engineering
Academic Year 2021/2022
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.
Multi-flow device file
This specification is related to a Linux device driver implementing low and high priority flows of data.
Through an open session to the device file a thread can read/write data segments. The data delivery follows a First-in-First-out policy
along each of the two different data flows (low and high priority). After read operations, the read data disappear from the flow.
Also, the high priority data flow must offer synchronous write operations while the low priority data flow must offer an asynchronous execution (based on delayed work) of write operations, while still keeping the interface able to synchronously notify the outcome. Read operations are all executed synchronously. The device driver should support 128 devices corresponding to the same amount of minor numbers.
The device driver should implement the support for the ioctl(..) service in order to manage the I/O session as follows:
- setup of the priority level (high or low) for the operations
- blocking vs non-blocking read and write operations
- setup of a timeout regulating the awake of blocking operations
A a few Linux module parameters and functions should be implemented in order to enable or disable the device file, in terms of a specific minor number. If it is disabled, any attempt to open a session should fail (but already open sessions will be still managed). Further additional parameters exposed via VFS should provide a picture of the current state of the device according to the following information:
- enabled or disabled
- number of bytes currently present in the two flows (high vs low priority)
- number of threads currently waiting for data along the two flows (high vs low priority)
Project delivery
Projects can be delivered (for analysis and discussion) at any scheduled tutoring slot