Giter VIP home page Giter VIP logo

rtos_assignment's Introduction

RTOS _assignment

Description

This assignment consists in creating a scheduler using Rate Monotonic policy that schedules three periodic tasks and one aperiodic task in background. These tasks have to write in the kernel log using a custom kernel module that allows to write on the kernel log using the write() function. Furthermore, it's possible to prevent the preemption between tasks by uncommenting some lines (read comments in the scheduler.c code) to use a mutex semaphore with priority ceiling access protocol.

How to run

First of all, you need to have root privileges so open a terminal window and type:

$ sudo su

Then from inside the rtos_assignment folder, you need to compile the kernel module using the Makefile, so simply type:

$ make

To install the module, type:

$ insmod my_module.ko

and to check if it was correctly installed, type:

$ /sbin/lsmod

and in the list you should find a module called my_module.

Read the major number associated to the driver (number next to my) by typing:

$ cat /proc/devices

and create the special file by typing:

$ mknod /dev/my c <majornumber> 0

Finally, compile the scheduler by typing:

$ g++ -lpthread scheduler.c -o scheduler

and run it with:

$ ./scheduler

To read the kernel log, use the command:

$ dmesg

rtos_assignment's People

Contributors

yassinfrh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.