HOMEWORK 1, CS350 – Operating Systems solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (5 votes)

1. “Hello Driver” C kernel program. Implement and submit these 3 files. (3 points)
 File1: Write a Linux Kernel Loadable Module (KLM) aka. device driver (hello_driver.c) that prints
“Hello World!” to the Kernel log (printk). You can find this code in your slides. Just type & compile.
 File2: Write a Makefile that compiles the driver. Use lsmod, insmod, rmmod commands to install it.
 File3: Use dmesg command and take a screenshot of your “Hello” messages in kernel (dmesg.png)
2. Implement a simple game called “What to eat today?” using C language (4 pts + 3 pts)
 Motivation: Some days people living together try to decide what food to order home or dorm room. To
avoid this confusion, you decide to turn this situation into a democratic What2Eat.c game program.
 For the first round: Your program gets the number of people and asks them one-by-one to make 5
choices in order of their preferences (e.g. 1-Kebab, 2-Burger, 3-Pasta, 4-Lahmacun, 5-Salad or others).
Your program automatically assigns points to the ordered choices (e.g. Kebab:5, Burger:4 and so on). It
calculates the total points and prints a short list of preferences that are above a predefined threshold
value (e.g. 10). If no choices pass the threshold, you print “You are eating at home/dorm today!” and exit.
 For the second round: You ask all players to choose and order their choices from the short list. You
add the scores again and print them to screen. The food that gets the top point is ordered.
 Note: You can choose to “simulate” choices by randomly assigning them from a list, you can print a
numbered list of items and ask for numeric choices, or you can read – scanf()- any string you like.
 BONUS (+1 pts): Adding a GPL license to your code, putting it on Github and providing a link to it in
your homework.
SUBMISSION GUIDE:
 Create a folder “cs350_hw1_studentid” and put all your files in that folder.
 Compress the folder using the following command. Change the student id accordingly.
 tar –zcvf cs350_hw1.tar.gz cs350_hw1_studentid/
 Upload this tar.gz file to LMS Homework1.