Skip to content

iakigarci/KernelSimulator

Repository files navigation


Kernel simulator

Simulation of some kernel functions coded in C

Connect with me:

iakigarci iakigarci

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

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.

(back to top)

Built With

The technologies used for this project are as follows:

(back to top)

Getting Started

Prerequisites

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

Installation

  1. Clone the repo
    git clone https://github.com/iakigarci/KernelSimulator.git
  2. Install C packages
    sudo apt install make
  3. Compile source files
    make
  4. Run the init script. Change the parameters name with the simulation parameters
    ./kernel clockFrequency timerFrequency processGenFrequency
    For example:
    ./kernel 10 10 10

(back to top)

Usage

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)

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Iñaki García : [email protected]

Project Link: https://github.com/iakigarci/KernelSimulator

(back to top)

About

Simulation of different kernel functionalities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published