Advanced Operating Systems (9 CFU)
MS Degree in Computer Engineering
Academic Year 2021/2022
Lecturer: Francesco Quaglia
This page is used to post suggested homework which can help better making experience with the course topics. The suggested homework is not mandatory for passing the examination. For each suggested homework a solution will be posted along with the "Software Examples" available via the course main page. Students are encouraged to provide their own solutions before checking with the posted one.
This homework deals with the C-based implementation of an RCU (Read Copy Update) list offering the following API:
Atomic memory operations via gcc bult-in API like, e.g., __sync_fetch_and_add(...), can be used as building blocks. Each function should return zero upon success.
This homework deals with the implementation of a TLS support standing aside of the original one offered by gcc. It should be based on a few macros with the following meaning:
Essentially, the homework is tailored to implementing an interface for managing per-thread memory resembling the one offered by the Linux kernel for managing per-CPU memory.
This homework deals with the implementation of a system-call int vtpmo(unsigned long x) dealing with memory management. This system call should take as input parameter a user-level logical address and should return to the user information related to the frame-number that hosts the virtual page (or huge page) associated with that address. Invalid addresses (e.g. kernel level addresses) should be correctly identified by the system call, which will simply return an error code in this case.
This homework deals with the implementation of a Linux kernel subsystem dealing with thread management. The subsystem should implement a blocking FIFO-queuing service. It is based on two system calls 1) int goto_sleep(void) used to make a thread sleep at the tail of the queue and 2) int awake(void) used to awake the thread currently standing at the head of the queue. Threads could also be awaken in non-FIFO order because of Posix signals.
This homework deals with the implementation of a Linux kernel module that offers a device file which allows updating the content of memory locations in the address space of an arbitrary process. The device file must support a write operation that leads to update the content of some memory location (supposed to be of type long) in the address space of the target process. To be successful, the write operation needs to receive as input-stream a sequence of bytes structured as follows: "PID ADDRESS NEW_VALUE", where PID is the target process identifier, ADDRESS is the memory address where the update needs to be installed and NEW_VALUE is the value to be installed on that memory location.