You are on page 1of 3

CPE 436/536

Homework 1 (parts a b and c)


Thiago Rodrigues Alves
1a Construct a system call that allows for passing blocks of data between a user program and
kernel
To create the system call, some files of the linux kernel had to be modified. Here is a list of the
modified files:

/usr/src/linux/arch/i386/kernel/syscall_table.S

usr/src/linux/include/linux/syscalls.h

usr/src/linux/include/asm-i386/unistd.h
After modifying these files to
create an entry for the new
system call, the files for the
system call itself had to be created:

/usr/src/linux/include/linux/read_kernel_mem.h (user library)

usr/src/linux/kernel/read_kernel_mem.c (system call)

The Makefile for


the directory

/usr/src/linux/kernel had to be modified to compile the new system call:

1b- Use the


system call to
return the
contents of the
schedule queues/trees at 1 second intervals
1c- modify the scheduler to assign processes/threads to cores based on their number with odd
numbered tasks running on odd numbered cores and even numbered tasks running on even
numbered cores. Two cores (0,1) are sufficient for this task
A new system call was created in order to change the processes schedule and return the contents of the
schedule queues/trees. The procedure to create the system call was the same as the previous item.
Below is the code for both files of the system call:

/usr/src/linux/include/linux/read_kernel_mem.h (user library)

usr/src/linux/kernel/read_kernel_mem.c (system call)

You might also like