Abbinante and Wang Restaurants, Inc. (A&W Restaurants) have decided to start a bar in the basement of the Love building to compete with the bar at basement of the Student Union. Due to budget...




Abbinante and Wang Restaurants, Inc. (A&W Restaurants) have decided to start a bar in the basement of the Love building to compete with the bar at basement of the Student Union. Due to budget constraints, they are unable to hire a Bar (Lab) Monitor to work with the Consumers at the Computer Science Majors Bar (Lab). Mr. Abbinante and Dr. Wang Produce a solution! They Produce a Linux-based waiter. Unfortunately, neither of them has written anything like this in years. Thus, you, the OS student, get to implement our Barstool Scheduler. Thanks for the free labor, I mean internship!



Purpose



This project introduces you to the nuts and bolts of system calls, kernel programming, concurrency, and synchronization in the kernel. It is divided into three parts.



Part 1: System-call Tracing [5 points + 1-point extra credit]



Write an empty C or Rust program, empty. Then, create a copy of this program called part1 and add exactly four system calls to the program. You will not receive points if the program contains more or fewer than four. The system calls available to your machine can be found within



/usr/include/unistd.h. Further, you can use the command line tool, strace, to intercept and record the system calls called by a process.



For example, to confirm you have added the correct number of system calls, execute the following commands:



$ gcc -o empty.x empty.c



$ strace -o empty.trace ./empty.x



$ gcc -o part1.x part1.c



$ strace -o part1.trace ./part1.x



To reduce the length of the output from strace, try to minimize the use of other function calls (e.g., stdlib.h) in your program.



Note: Using strace on an empty program will produce several system calls, so when using strace on your Part 1 code, it should produce 4 more system calls than that.



Submit empty.{c/rs}, empty.trace, part1.{c/rs}, part1.trace, and Makefile.
Mar 20, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here