This project aims to provide a comprehensive understanding of system calls, kernel programming, concurrency, synchronization, and elevator scheduling algorithms.
- Margaret Rivas: mer20c@fsu.edu
- Sophia Quinoa: saq20a@fsu.edu
- Hannah Housand: hjh21a@fsu.edu
- Responsibilities:
- Create a baseline C/Rust program named "empty" with no system calls.
- Duplicate the "empty" program, naming the new copy "part1", and add exactly four system calls.
- Use the strace tool to ensure the correct number of system calls are added to "part1".
- Completed by: Margaret Rivas, Hannah Housand, Sophia Quinoa
- Assigned to: Hannah Housand, Sophia Quinoa
- Responsibilities:
- Develop a kernel module that uses ktime_get_real_ts64() to retrieve the current time in seconds and nanoseconds since the Unix Epoch.
- Ensure the module creates a proc entry "/proc/timer" when loaded and removes it when unloaded.
- Implement a read operation for "/proc/timer" to print the current time and the elapsed time since the last read.
- Completed by: Margaret Rivas, Hannah Housand, Sophia Quinoa
- Assigned to: Hannah Housand, Sophia Quinoa
- Responsibilities:
- Prepare kernel for compilation.
- Modify kernel files.
- Define system calls.
- Completed by: Margaret Rivas, Hannah Housand, Sophia Quinoa
- Assigned to: Hannah Housand, Sophia Quinoa
- Responsibilities:
- Compile kernel with new system calls, disabling certificates.
- Check if installed.
- Completed by: Hannah Housand, Margaret Rivas
- Assigned to: Hannah Housand, Margaret Rivas
- Responsibilities:
- Use a kthread to control the elevator movement.
- Completed by: Hannah Housand, Sophia Quinoa
- Assigned to: Hannah Housand, Sophia Quinoa
- Responsibilities:
- Use linked lists to handle the number of passengers per floor/elevator.
- Completed by: Hannah Housand, Margaret Rivas
- Assigned to: Hannah Housand, Margaret Rivas
- Responsibilities:
- Use a mutex to control shared data access between floor and elevators.
- Completed by: Sophia Quinoa, Margaret Rivas
- Assigned to: Sophia Quinoa, Margaret Rivas
- Responsibilities:
- Develop algorithm.
- Use kmalloc to allocate dynamic memory for passengers.
- Completed by: Sophia Quinoa, Margaret Rivas, Hannah Housand
- Assigned to: Sophia Quinoa, Margaret Rivas
elevator/
├── Makefile
├── part1/
│ ├── empty.c
│ ├── empty.trace
│ ├── part1.c
│ ├── part1.trace
│ └── Makefile
├── part2/
│ ├── src/
│ │ ├── my_timer.c
│ │ └── Makefile
│ │ ├── my_timer.h
│ └── Makefile
├── part3/
│ ├── src/
│ │ ├── elevator.c
│ │ └── Makefile
│ ├── tests/
│ ├── Makefile
│ └── syscalls.c
├── Makefile
└── README.md
- Compiler:
gccfor C/C++ - Dependencies: <linux/kernel.h>, <linux/string.h>, <linux/proc_fs.h>, <linux/uaccess.h>, <linux/slab.h>, <linux/module.h>, <linux/init.h>, <linux/kthread.h> <linux/mutex.h>, <linux/list.h>, <linux/delay.h>,and <linux/linkage.h>.
makeThis will build the executable in part1/
make runThis will run the program ...
makeThis will build the executable in part2/src/
To insert a kernel module:
sudo insmod my_timer.koTo remove a kernel module:
sudo rmmod my_timer.koTo check for your kernel module:
lsmod | grep my_timerFor a C/C++ example:
makeThis will build the executable in part3/src/
sudo insmod elevator.ko ## run inside of part3/src/ to load the module created by make
watch -n1 cat /proc/elevator ## run to watch proc file output updated every 1 secondWe test our elevator program by running "make" inside of elevator_tests and then running:
./producer (number) ## to input passangers into building
./consumer --start ## to start elevator
./consumer --stop ## to stop elevator- Bug 1: Elevator implementation currently skips floors but does fullfil FIFO.
- Bug 2: Elevator loading should be optimized to run faster.
- The proc file will only be 10000 characters long.
- Students will not leave from the same floor they entered from.
- Building only has 6 floors and only 5 people can ride on the elevator at a time as long as they do not exceed the max weight value of 750 lbs.