GenerOS: An Asymmetric Operating System Kernel for Multi-core - - PowerPoint PPT Presentation

generos an asymmetric operating system kernel for multi
SMART_READER_LITE
LIVE PREVIEW

GenerOS: An Asymmetric Operating System Kernel for Multi-core - - PowerPoint PPT Presentation

IPDPS 2010 @ Atlanta 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 yuanbor@ncic.ac.cn Speaker:


slide-1
SLIDE 1

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 yuanbor@ncic.ac.cn Speaker: SuZhen Wu Huazhong University of Science & Technology

IPDPS 2010 @ Atlanta

slide-2
SLIDE 2

Outline

GenerOS | 2

Motivation

1

Conclusion

5

Implementation of GenerOS

3

Architecture of GenerOS

2

Evaluation of GenerOS vs Linux

4

slide-3
SLIDE 3

Motivation

Symmetric multithread operating system such as Linux suffers from lock contention and cache pollution Lock contention

 As more cores are packaged into a single chip, there are two many

cores in a system

 Each core has the ability to trap into kernel  Too many procedures in kernel -> serious lock contention

Cache pollution

 Applications and kernel run on the same core  Applications may kick kernel’s cache line out of cache  And vice versa

GenerOS | 3

slide-4
SLIDE 4

Motivation

  • --- Lock Contention @ Linux

Contention Probability = contentions / acquisitions

 acquisitions:

times acquiring lock

 contentions:

times encountering contention

Contention Efficiency = hold time / (hold time + wait time)

 hold time:

time in critical region

 wait time:

time waiting for entering critical region

GenerOS | 4

slide-5
SLIDE 5

Motivation

  • --- Lock Contention @ Linux

GenerOS | 5

0.00% 0.02% 0.04% 0.06% 0.08% 0.10% 0.12% 0.14% 0.16% 0.18% 1 4 16 64 256 1024 Thread Number

Contention Probability

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 1 4 16 64 256 1024 Thread Number

Contention Efficiency

slide-6
SLIDE 6

Motivation

  • --- Cache Pollution @ Linux

GenerOS | 6

60% 42% 96% 92% 0% 20% 40% 60% 80% 100% Dcache Miss Ratio Icache Miss Ratio Dcache Lines Evicted Icache Lines Evicted Kernel Proportion

slide-7
SLIDE 7

Motivation

GenerOS | 7

Lock Contention Solution GenerOS

More Cores More Contentions

Decrease Cores in Kernel Mode

Cache Pollution Solution

Applications Run Together with OS Separate Kernel and Applications

slide-8
SLIDE 8

Outline

GenerOS | 8

Motivation

1

Conclusion

5

Implementation of GenerOS

3

Architecture of GenerOS

2

Evaluation of GenerOS vs Linux

4

slide-9
SLIDE 9

Architecture

In a symmetric multiprocessing system, Linux treats all cores as an equal which causes a lot of problems By contrast, GenerOS partitions processing cores into application core, kernel core and interrupt core

 All of applications run on application core  Their system calls are executed by kernel core  Interrupts are all bound to interrupt core

GenerOS | 9

slide-10
SLIDE 10

Architecture

Most of cores are used by applications A limited number of cores are used by kernel service

 File System  Process

Few number of cores are used to handle interrupt

GenerOS | 10

slide-11
SLIDE 11

Outline

GenerOS | 11

Motivation

1

Conclusion

5

Implementation of GenerOS

3

Architecture of GenerOS

2

Evaluation of GenerOS vs Linux

4

slide-12
SLIDE 12

Implementation

GenerOS is developed based on Linux-2.6.25 @ x86_64 architecture In system call level, several kernel servers are developed

 File system server (98 system calls)

sys_open / sys_close / sys_read / sys_write

 Network server (15 system calls)

sys_socket / sys_connect

 Signal server (12 system calls)

sys_rt_sigaction

 IPC server (12 system calls)

sys_msgget

 Process server (10 system calls)

sys_fork

 Others (141 system calls)

sys_brk

GenerOS | 12

slide-13
SLIDE 13

Implementation

  • --- GenerOS Processing Flow Chart

GenerOS | 13

int main(void) { pid_t getpid(); return 0; }

Application @ Application core

pid_t generos_sys_getpid(void) { req = generos_get_request(); generos_init_request(req); generos_send_to_kernel(req); sleep(); return pid; }

Runtime @ Application core

while(generos_request_queue_is_not_empty(&process_queue)){ req = generos_pick_request(&process_queue); switch(req->type){ case GETPID: req->retvalue = sys_getpid(); break; …… } wake_up_process(req->task); }

Process Server @ Kernel core

slide-14
SLIDE 14

Implementation

  • --- Runtime at Application Core

GenerOS | 14

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

slide-15
SLIDE 15

Implementation

  • --- Kernel Core

GenerOS | 15

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

slide-16
SLIDE 16

Implementation

  • --- Binding Interrupt Handler

GenerOS | 16

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

slide-17
SLIDE 17

Outline

GenerOS | 17

Motivation

1

Conclusion

5

Implementation of GenerOS

3

Architecture of GenerOS

2

Evaluation of GenerOS vs Linux

4

slide-18
SLIDE 18

Evaluation

  • --- Platform

GenerOS | 18

slide-19
SLIDE 19

Evaluation

  • --- Lock contention

GenerOS | 19

0.00% 0.02% 0.04% 0.06% 0.08% 0.10% 0.12% 0.14% 0.16% 0.18% 1 4 16 64 256 1024 Contention Probability Thread Numbers linux generos 0% 20% 40% 60% 80% 100% 1 4 16 64 256 1024 Contention Efficiency Thread Numbers linux generos

slide-20
SLIDE 20

Evaluation

  • --- Cache Pollution

GenerOS | 20

60% 42% 96% 92% 44% 37% 92% 83% 0% 20% 40% 60% 80% 100% Dcache Miss Ratio Icache Miss Ratio Dcache Lines Evicted Icache Lines Evicted Kernel Proportion linux generos

slide-21
SLIDE 21

Evaluation

  • --- Single System Call

GenerOS | 21

slide-22
SLIDE 22

Evaluation

  • --- Single System Call

GenerOS | 22

5 10 15 20 25 30 35 40 45 50

  • pen

close kilo-cycles l-enter l-handle l-exit flyin flyout g-enter g-flyin g-handle g-flyout g-exit 5 10 15 20 25 read write million-cycles l-enter l-handle l-exit flyin flyout g-enter g-flyin g-handle g-flyout g-exit

slide-23
SLIDE 23

Evaluation

  • --- TPC-H 1GB Power

GenerOS | 23

511 522 559 611 450 554 517 455 100 200 300 400 500 600 700 Linux g-8000 g-8800 g-8880 g-8888 g-c000 g-e000 g-f000 TPC-H Power@1G The bigger the better

slide-24
SLIDE 24

Evaluation

  • --- TPC-H 1GB Power

GenerOS | 24

slide-25
SLIDE 25

Evaluation

  • --- Httperf

GenerOS | 25

50 100 150 200 250 300 350 400 450 200 400 600 800 1000 Replies Per Second the more the better Requests Per Second linux g-8000-8000 g-8000-800

slide-26
SLIDE 26

Outline

GenerOS | 26

Motivation

1

Conclusion

5

Implementation of GenerOS

3

Architecture of GenerOS

2

Evaluation of GenerOS vs Linux

4

slide-27
SLIDE 27

Conclusion

GenerOS is an asymmetric kernel which is designed to deal with the problems faced in traditional symmetric kernel Being compatible with Linux, GenerOS does not need to modify, recompile, or relink applications, or libraries Experiments with two typical workloads on 16-core AMD machine show that GenerOS behaves better than original Linux kernel when there are more processing cores

 19.6% for TPC-H using oracle database management system  42.8% for httperf using apache web server

GenerOS | 27

slide-28
SLIDE 28

GenerOS | 28

Thank you very much! Any question ? Please contact the author yuanbor@ncic.ac.cn