flâneur — a map of the web's best reading

Process Control Syscalls | CS 162 Project 1

cs162.org · 1,323 words · saved by 1 readers

Pintos currently only supports one syscall, exit, which terminates the calling process. You will add support for the following new syscalls: practice, halt, exec, wait. To implement syscalls, you first need a way to safely read and write memory that’s in a user process’s virtual address space. The syscall arguments are located on the user process’s stack, right above the user process’s stack pointer. You are not allowed to have the kernel crash while trying to dereference an invalid or null pointer. For example, if the stack pointer is invalid when a user program makes a syscall, the kernel ought not crash when trying to read syscall arguments from the stack. Additionally, some syscall arguments are pointers to buffers inside the user process’s address space. Those buffer pointers could be invalid as well. Try to avoid writing large amounts of repetitive code for implementing system calls. Each system call argument, whether an integer or a pointer, takes up 4 bytes on the stack. You sh

Process Control Syscalls | CS 162 Project 1 Skip to main content Menu Expand (external link) Document Search Copy Copied CS 162 Project 1 Process Control Syscalls Table of contents Implementation details Syscall signatures practice halt exit exec wait fork Pintos currently only supports one syscall, exit , which terminates the calling process. You will add support for the following new syscalls: practice , halt , exec , wait , and fork . Implementation details To implement syscalls, you first need a way to safely read and write memory that’s in a user process’s virtual address space. The sysca

Explore this link on the map →

related reading