Ludovic Apvrille
Information on the project
Information
about the computer system
The project should be realized using a "vmwared" Linux. The starting vmware machine is the one provided in /home/Admin_Data/Tp_Apvrille/TP_Kernel.tar. Information on the use of this machine is provided in lab session on Linux kernel. This lab session also contains information on the system (edition, compilation, and various functions that may be useful).
We provide a backuped disk space for your project. Thus, the first time you use your machine, do:
Copy and extract the virtual machines information into a work directory:
$ cd /home/Local_Data
$ tar xvf /packages/administration/TP_Kernel.apvrille.tar
Then, you may start the virtual machine. When you have finished working on it, do as follows:
$ cd TP_Kernel
$ vmplayer TP_Kernel.vmx
Stop the system, in the virtual machine:
$halt
Wait for the Linux to be halted, and then, close vmware. Come back to the main Linux, and do:
$ cd /home/Local_Data
$ tar -cvf <mylogin_vm>.tar TP_Kernel/
You may need to use Linux manual pages, section 9 (kernel). I recommend using:
Work to do
Basically, your work is to implement a new function offered by Linux to user applications.
At first, you have to finish the lab session on kernel programming i.e. your final virtual machine should contain the implementation of exercises 1 to 3. You don't have to provide information on theses system calls in your report.
In this project, the objective is to design a system call that can handle a delayed signals between processes. Indeed, usually, when a process sends a signal to another process - using the kill() system call - , that signal is delivered immediatly by the operating system to the destination process. On the contrary, with your new system call - called mykill() - the signal shall be delivered to the destination process only after a given duration provided as argument to the system call.
1) At first, understand how the usual kill() system call works
To do so, you may use the lecture notes on "thread", and use related manual pages i.e. :
$ man -s2 signal
$ man -s2 kill
Then, do two different programs, and test them under linux
2) We now wish to add a delay parameter to signals
…
int pid;3) Is your system call re-entrant i.e. can it be called at the same time by several user processes? If no, what shall be done for making it re-entrant? Do justify your answer in the report [Here, I do not ask you to program a re-entrant system call if the one you have programmed is not].
4) Now, we wish to implement another system call that allows the cancellation of a signal
Propose an implementation for that second system call, and provide a test program.