xv6
xv6
Some notes on xv6 OS modifications for my class.
Project 2
System call
user.h - function prototype
usys.S - list of system calls (no preprocessor directives)
syscall.h - mappings for system call name to number (no preprocessor directives)
syscall.c - system call entry point, function definition in function dispatch table
sysproc.c - implement sys_function()
uint getuid(void)
uint getgid(void)
uint getppid(void)
int setuid(uint)
int setgid(uint)
Changes
user.h - added get/set uid/gid
usys.S - added system calls
syscall.h - added mappings for system call name to number
syscall.c - added system call entry points and function definitions in function dispatch table
sysproc.c - implemented functions
param.h - added define for INIT_PPID
proc.h - added uid, gid, ppid to struct proc / added cpu_ticks_total and cpu_ticks_in variables to struct proc
proc.c
set default values for uid, gid, ppid, and set ppid of new process in fork().
update scheduler(), yield() and sleep() to keep track of process ticks.
create helper functions to print ctrl-P info
sh.c - enabled get/set shell commands
runoff.list - added gid/uid, uproc.h
ps.c - implemented ps
xv6.txt · Last modified: 2018/04/15 15:53 by kououken