You are on page 1of 2

School of Computer Science and Engineering

Fall Semester – 2021-22


CSE2005 – Operating System
ASSESSMENT 2
(SUBMISSION DEADLINE:28/SEP/2021)

➢ SYSTEM CALL, DEVICE DRIVERS, TIMER, INTERRUPTS


a. Kernel space programming: Implement and add a loadable kernel module to
Linux kernel, demonstrate using insmod, lsmod and rmmod commands. A
sample kernel space program should print the "Hello World" while loading the
kernel module and "Goodbye World" while unloading the kernel module.
b. Implement a new system call, add this new system call in the Linux kernel (any
kernel source, any architecture and any Linux kernel distribution) and
demonstrate the use of same.
c. [Interrupts] Create an interrupt to handle a system call and continue the
previously running process after servicing the interrupt
d. Compare the overhead of a system call with a procedure call. What is the cost
of a minimal system call?
e. Write programs using the following system calls of UNIX operating system:
fork, exec, getpid, exit, wait, close, stat, opendir, readdir
f. Write programs using the I/O system calls of UNIX operating system (open,
read, write, etc)

➢ Process Management
a. Compare the performance of Pre-emptive scheduler (Pre-emptive SJF – SRTN)
with Non-preemptive Scheduler (Priority). Display individual Service time,
waiting time, turnaround time and response time. Also display average waiting
time and turnaround time.
b. Process control system calls: The demonstration of fork, execve and wait system
calls along with zombie and orphan states.
i. Implement the C program in which main program accepts the integers to
be sorted. Main program uses the fork system call to create a new process
called a child process. Parent process sorts the integers using merge sort
and waits for child process using wait system call to sort the integers using
quick sort. Also demonstrate zombie and orphan states.
ii. Implement the C program in which main program accepts an integer
array. Main program uses the fork system call to create a new process
called a child process. Parent process sorts an integer array and passes the
sorted array to child process through the command line arguments of
execve system call. The child process uses execve system call to load new
program that uses this sorted array for performing the binary search to
search the particular item in the array.
iii. Run an experiment to determine the context switch time from one process
to another and one kernel thread to another. Compare the findings
iv. Compare the task creation times. Execute a process and kernel thread,
determine the time taken to create and run the threads.

You might also like