Code Monkey home page Code Monkey logo

cs307-assignment-2's Introduction

CS307-Assignment-2

This repository is dedicated for assignment 1 of CS307 course.

Instructor: Dr. Aditya Nigam

Team Members

Name Roll No.
A Ashutosh Sharma B18010
B Anuj Goel B18161
C Om Pandey B18182

Assignment problem sheet: Assignment Questions

Requirements

gcc version: 9.3

Q1. Compiling the Linux kernel from source and building a loadable module

Libraries used:

  1. linux/module.h
  2. linux/kernel.h
  3. linux/init.h

Running the code:

  1. Hello World Module
  • Type "cd Q1" on terminal
  • Type "cd Hello_World" on terminal
  • Type "make" on terminal
  • Type "sudo insmode hello.ko" on terminal
  • Type "modinfo hello.ko" on termninal to see details of module
  • Type "tail /var/log/kern.log" on terminal to view kernel log
  • Type "rmmod hello" to remove module from terminal
  1. Divide by 0 Module
  • Type "cd Q1" on terminal
  • Type "cd test1" on terminal
  • Type "make" on terminal
  • Type "sudo insmode test1.ko" on terminal
  • Type "modinfo test1.ko" on termninal to see details of module
  • Type "tail /var/log/kern.log" on terminal to view kernel log
  • Type "rmmod test1" to remove module from terminal
  1. Return other than 1 Module
  • Type "cd Q1" on terminal
  • Type "cd test2" on terminal
  • Type "make" on terminal
  • Type "sudo insmode test2.ko" on terminal
  • Type "modinfo test2.ko" on termninal to see details of module
  • Type "tail /var/log/kern.log" on terminal to view kernel log
  • Type "rmmod test2" to remove module from terminal
  1. Dereferencing a NULL pointer module
  • Type "cd Q1" on terminal
  • Type "cd test3" on terminal
  • Type "make" on terminal
  • Type "sudo insmode test3.ko" on terminal
  • Type "modinfo test3.ko" on termninal to see details of module
  • Type "tail /var/log/kern.log" on terminal to view kernel log
  • Type "rmmod test3" to remove module from terminal

Q2. Round-Robin Scheduling

Libraries used:

  1. iostream
  2. queue
  3. vector

Running the code

  • Enter Q2 folder
  • Type "make" on terminal
  • Type "./q2" on terminal
  • The program will produce the required output

Q3. Merge Sort using threads

Libraries used:

  1. iostream
  2. stdio.h
  3. cmath
  4. chrono
  5. pthread.h
  6. time.h
  7. stdlib.h

Running the code

  • Enter Q3 folder
  • Type "make" on terminal
  • Type "./myprogram" on terminal
  • The program will produce the required output

cs307-assignment-2's People

Contributors

anujgoel-b18161 avatar spider0061 avatar tom-bandex avatar

Watchers

 avatar  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.