System calls provide an interface to the services made available by an OS
It is the programmatic way in which a computer program requests a service from the kernel of the OS
과제 설명:
User programs are written under the illusion that they have the entire machine. This means that when you load and run multiple processes at a time, you must manage memory, scheduling, and other state correctly to maintain this illusion.
User virtual memory ranges from virtual address 0 up to KERN_BASE, which is defined in include/threads/vaddr.h and defaults to 0x8004000000 Kernel virtual memory occupies the rest of the virtual address space.
virtual address KERN_BASE accesses physical address 0, virtual address KERN_BASE + 0x1234 accesses physical address 0x1234
As part of a system call, the kernel must often access memory through pointers provided by a user program.
There are at least two reasonable ways to do this correctly.
verify the validity of a user-provided pointer, then dereference it.
check only that a user pointer points below KERN_BASE, then dereference it. An invalid user pointer will cause a "page fault" that you can handle by modifying the code for page_fault() in userprog/exception.c
User program이 load, run은 되지만, 인자를 넘긴다던지 file을 열고 읽는 일이 불가능한 상태다.
커널 접근을 지원하는 system call 함수가 없기 때문.