7. Could actual call to kernel
fork be a regular call?
7 November 2013
University of Virginia cs4414
6
8. Rust Runtime
Entering the Kernel
run::Process::new(program, argv, options)
spawn_process_os(prog, args, env, dir, in_fd, …)
fork()
libc: fork()
linux kernel: fork syscall
7 November 2013
University of Virginia cs4414
7
9. Supervisor Mode
Kernel code needs (or at least uses)
special privileges!
What would happen if user-level code could
just jump into kernel code?
7 November 2013
University of Virginia cs4414
8
10. Entering the Kernel
User-Level Code
…
movl $SYS_fork,%eax
int
$0x80
int instruction generates an interrupt
7 November 2013
University of Virginia cs4414
9
12. Page 2213 of Intel x86 Manual:
http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf
Modern x86 Design:
“APIC” = “Advanced PIC”
7 November 2013
University of Virginia cs4414
11
13. Page 2213 of Intel x86 Manual:
http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf
What should generate a
“Local Interrupt”?
7 November 2013
What should generate an
“External Interrupt”?
University of Virginia cs4414
12
22. Rust Runtime
Running in Supervisor Mode
run::Process::new(program, argv, options)
spawn_process_os(prog, args, env, dir, in_fd, …)
fork()
int 0x80
libc: fork()
jumps into kernel code
sets supervisor mode
linux kernel: fork syscall
7 November 2013
University of Virginia cs4414
21
28. 13.2, 5701.3
6,000
Average Response Time (milliseconds)
Kiet, Mark, Tanmoy
5,000
9.7, 3908.1
4,000
217.1, 3902.7
reference zhtta
3,000
2,000
44.0, 989.7
39.8, 960.8
Hong, Jireh, Marshall
Chris, Tong, Yicheng
1,000
225.2, 531.3
5.5, 0.6
0
0
Harriet, Kevin, Zeming
50
100
150
200
Total Duration (seconds)
5 November 2013
University of Virginia cs4414
27
29. Charge
Find a team and project!
Decoy projects are only allowed in security classes.
Sneaking around my house is no longer permitted.
7 November 2013
University of Virginia cs4414
28