Table of Contents
The objective of this program is to simulate some of the functionalities that a kernel has to manage an operating system. For this purpose, the following functionalities have been developed
- Simulate a Scheduler and a Dispatcher with a defined rules
- Simulate virtual memory manager
- Simulate physical memory manager
All the functionalities have been implement using advanced eficent features, such pointers, memory allocation and multithreading.
The technologies used for this project are as follows:
Is mandatory to have installed C program an the make package. To avoid errors during runtime, use Linux instead Windows. The following examples are for Ubuntu distribution:
- c
sudo apt install GCC
- Clone the repo
git clone https://github.com/iakigarci/KernelSimulator.git
- Install C packages
sudo apt install make
- Compile source files
make
- Run the init script. Change the parameters name with the simulation parameters
For example:
./kernel clockFrequency timerFrequency processGenFrequency
./kernel 10 10 10
As we have seen in the previous section, the execution of the program has been simplified with a MAKEFILE file. The MAKEFILE parameters are:
OBJS = kernel.o
SOURCE = kernel.c
HEADER = definitions.h
OUT = kernel.out
CC = gcc
FLAGS = -g -c -Wall
LFLAGS = -lpthread -lm
all: $(OBJS)
$(CC) -g $(OBJS) -o $(OUT) $(LFLAGS)
kernel.o: kernel.c
$(CC) $(FLAGS) kernel.c
queue.o: queue.c
$(CC) $(FLAGS) queue.c
thread.o: thread.c
$(CC) $(FLAGS) thread.c
mensajes.o: mensajes.c
$(CC) $(FLAGS) mensajes.c
clean:
rm -f $(OBJS) $(OUT)
For more examples, please refer to the Documentation (Spanish)
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Iñaki García : [email protected]
Project Link: https://github.com/iakigarci/KernelSimulator