/Kernel_mail_box

New system calls for asynchronous communication among system processes.

Primary LanguageC

Kernel-mailbox-system-calls

New system calls for asynchronous communication among system processes.

Here I assume that you have linux-3.11.1 running. if you have different version please change your directory name from linux-3.11.1 to whatever is appropriate to you while following below steps.

how to successfully compile and run?
1.) Add system calls declaration in linux-3.11.1/include/linux/syscalls.h or just copy below lines in to the file
asmlinkage long sys_mkMbox421(unsigned long mbxID);
asmlinkage long sys_rmMbox421(unsigned long mbxID);
asmlinkage long sys_countMbox421(void);
asmlinkage long sys_listMbox421(unsigned long *mbxList, unsigned long K);
asmlinkage long sys_sendMsg421(unsigned long mbxID, char *msg, unsigned long N);
asmlinkage long sys_receiveMsg421(unsigned long mbxID, char *msg, unsigned long N, unsigned char flag);
asmlinkage long sys_countMsg421(unsigned long mbxID);

2.) Add system calls in system calls table. It depends on your machine's archtecture.
Add accordingly e.g path : linux-3.11.1/arch/x86/syscalls/syscall_64.tbl
3.) Have your files in subfolder under linux-3.11.1 folder.
4.) Add your sub-folder on line "core-y := /usr" in main make file for linux source. e.g My make file and source files for this project are contained in kernel_mail_box folder under linux-3.11.1, so for me it is "core-y := /usr /kernel_mail_box"
5.) Enter into your extracted kernel directory from terminal. Follow below steps
1.) dave@ubuntu:$ cd Documents/linux-3.11.1
2.) dave@ubuntu:
/Documents/linux-3.11.1$ make
3.) dave@ubuntu:~/Documents/linux-3.11.1$ make install

make will take a while so be patient. if you really want to expedite your compilation, Compiler cache (ccache) is a very nice technology for that. The below link is an excellent tutorial from intel.
ccache

Future Plans
1.) Need to change all locks to read/write locks from mutex locks.
2.) Reading about unblocking data structures, lets see if that can help removing locks.
3.) Reading paper on asynchornous system calls and intend to convert current system calls in async system calls.
4.) Improve locking in system call.
Currently while reading or writing, system call(s) get lock on all mailboxes which is not efficient. I am trying to figure out a way so that locks only apply on mailbox(s) under reading or writing process.

insights or contributions are appreciated.