Develop a Linux kernel module which will implement a simple stacking mechanism. The driver will control two such stack devices (/dev/stack1 and /dev/stack2) where each device will act as an independent stack. You might choose to implement the stack as a list of strings, if you like.
Writing to a stack device will insert the text to the top of the stack. When reading from the stack, entries in the stack will behave as concatenated strings. There will also be an ioctl command for popping the topmost entry from the stack (return the element and remove it from the stack).
/dev/stack0 will be a special stack which will only be used through the ioctl command described above (no read or write). It will pop the topmost element from stack1 if it is not empty Otherwise it will do the same with stack2.
Also create a "/proc" entry which will display the current entries in both stack1 and stack2.
implement language: c, platform:linux xububuntu, kernel :2.6