Gener OS
Gener OS
GenerOS: An Asymmetric
Operating System Kernel for
Multi-core Systems
Authors:
Qingbo Yuan, Jianbo Zhao, Mingyu Chen, Ninghui Sun
Institute of Computing Technology
Chinese Academy of Sciences
[email protected]
Speaker:
SuZhen Wu
Huazhong University of Science & Technology
Outline
1 Motivation
2 Architecture of GenerOS
3 Implementation of GenerOS
5 Conclusion
GenerOS | 2
Motivation
GenerOS | 3
Motivation
---- Lock Contention @ Linux
Contention Probability = contentions / acquisitions
acquisitions: times acquiring lock
contentions: times encountering contention
GenerOS | 4
Motivation
---- Lock Contention @ Linux
Contention Probability Contention Efficiency
0.18% 100%
0.16% 90%
80%
0.14%
70%
0.12%
60%
0.10%
50%
0.08%
40%
0.06%
30%
0.04%
20%
0.02% 10%
0.00% 0%
1 4 16 64 256 1024 1 4 16 64 256 1024
Thread Number Thread Number
GenerOS | 5
Motivation
---- Cache Pollution @ Linux
100% 96%
92%
80%
60%
Kernel Proportion
60%
42%
40%
20%
0%
Dcache Icache Dcache Icache
Miss Ratio Miss Ratio Lines Evicted Lines Evicted
GenerOS | 6
Motivation
GenerOS | 7
Outline
1 Motivation
2 Architecture of GenerOS
3 Implementation of GenerOS
5 Conclusion
GenerOS | 8
Architecture
GenerOS | 9
Architecture
GenerOS | 10
Outline
1 Motivation
2 Architecture of GenerOS
3 Implementation of GenerOS
5 Conclusion
GenerOS | 11
Implementation
GenerOS | 12
Implementation
---- GenerOS Processing Flow Chart
Application @ Runtime @ Application core
Application core
pid_t generos_sys_getpid(void)
int main(void) {
{ req = generos_get_request();
pid_t getpid(); generos_init_request(req);
generos_send_to_kernel(req);
return 0; sleep();
} return pid;
}
GenerOS | 13
Implementation
---- Runtime at Application Core
It replaces the system call table of Linux
const sys_call_ptr_t syscall_table [__NR_syscall_max+1] = {
[__NR_read] = &generos_sys_read,
[__NR_write] = &generos_sys_write,
……
[__NR_timerfd_gettime] = &generos_sys_timerfd_gettime;
};
The left side keeps the same meaning with Linux which
makes GenerOS compatible with Linux
The right side uses self defined function which will find a
kernel core to handle its system call
GenerOS | 14
Implementation
---- Kernel Core
Two queues
Request queue
Receive system call requests from application core
Wait queue
Store the being handled system calls which are waiting for
something
One schedule method
Slim Schedule
Schedule system calls in this kernel core with almost zero overhead
GenerOS | 15
Implementation
---- Binding Interrupt Handler
Interrupt core is used to deal with most of interrupts from
network interface, disk, or local timer
In such way, both of application core and kernel core will
have a clean execution environment
GenerOS uses the method in Linux to bind interrupt handler
to some processing core
GenerOS | 16
Outline
1 Motivation
2 Architecture of GenerOS
3 Implementation of GenerOS
5 Conclusion
GenerOS | 17
Evaluation
---- Platform
GenerOS | 18
Evaluation
---- Lock contention
linux generos linux generos
0.18% 100%
0.16%
80%
0.14%
0.12%
Contention Probability
Contention Efficiency
60%
0.10%
0.08%
40%
0.06%
0.04%
20%
0.02%
0.00% 0%
1 4 16 64 256 1024 1 4 16 64 256 1024
Thread Numbers Thread Numbers
GenerOS | 19
Evaluation
---- Cache Pollution
linux generos
100% 96%
92% 92%
83%
80%
60%
Kernel Proportion
60%
44% 42%
40% 37%
20%
0%
Dcache Icache Dcache Icache
Miss Ratio Miss Ratio Lines Evicted Lines Evicted
GenerOS | 20
Evaluation
---- Single System Call
GenerOS | 21
Evaluation
---- Single System Call
l-enter l-handle l-exit flyin flyout l-enter l-handle l-exit flyin flyout
g-enter g-flyin g-handle g-flyout g-exit g-enter g-flyin g-handle g-flyout g-exit
50 25
45
40 20
35
30 15
million-cycles
kilo-cycles
25
20 10
15
10 5
0 0
open close read write
GenerOS | 22
Evaluation
---- TPC-H 1GB Power
700
611
600
559 554
511 522 517
500
450 455
The bigger the better
TPC-H Power@1G
400
300
200
100
0
Linux g-8000 g-8800 g-8880 g-8888 g-c000 g-e000 g-f000
GenerOS | 23
Evaluation
---- TPC-H 1GB Power
GenerOS | 24
Evaluation
---- Httperf
450 linux g-8000-8000 g-8000-800
400
350
300
the more the better
Replies Per Second
250
200
150
100
50
0
200 400 600 800 1000
Requests Per Second
GenerOS | 25
Outline
1 Motivation
2 Architecture of GenerOS
3 Implementation of GenerOS
5 Conclusion
GenerOS | 26
Conclusion
GenerOS | 27
Thank you very much!
Any question ?