Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

mikewei/micoro

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Introduction

   micoro (for MIcro COROutine & MIke's COROtine) is a light weight, high
performance coroutine implementation.
   The basic idea of micoro come from the paper "Revisiting Coroutines"
(http://www.inf.puc-rio.br/~roberto/docs/MCC15-04.pdf). As the paper proved,
the "full asymmetric coroutine" model is powerful, easier to use and 
expressive power equivalent to other similar models. So micoro is actually
a "full asymmetric coroutine" implemenation with simple API and clear 
semantics.
   The original motivation of micoro is to implement a light-weight 
cooperative multitasking infrastructure for server environment, so simple, 
performance and robust (rather than portability) is often the top 
considerations across disign and implementation. 

   some features:
   * x86 user space fast context switch
   * x86 user level light-weight lock
   * thread-safe operations
   * stack overflow detection
   * robust code with careful design and test
   * portable for non-x86 using ucontext
   * running activity statistics

2. Requirement

   Currently only POSIX systems are supported.
   Some tested platform:
     Linux-2.6.16  x86_32
     Linux-2.6.32  x86_64
     Linux-3.2     x86_64  GCC-4.7.1
     MacOS-10.7.4  x86_64  LLVM-GCC-4.2.1
     FreeBSD-9.0   x86_64  GCC-4.2.1
     Cygwin_NT-6.1   i686  GCC-4.5.3

3. Install

3.1 install from tarball

   tar -xvf micoro-1.0.tar.gz
   cd micoro-1.0
   ./configure
   make
   sudo make install

3.2 install from git source

   * require GNU autotools & libtool installed

   git clone git://github.com/mikewei/micoro.git
   cd micoro
   autoreconf -i
   ./configure
   make
   sudo make install

4. Performance

   micoro has much higher performance compared with others
   (e.g. GNU Pth, PCL, pthread ...)

   * my benchmark with a Linux-3.2 CoreDuo 2.1G PC
   context switch performance for 10000 concurrent routines:

   GNU Pth -     5,876 switches per second
   pthread -   237,318 switches per second
       PCL -   879,165 switches per second
    micoro - 4,577,256 switches per second

5. Bug report

   please email to <bin@vip.qq.com>

About

a light weight, high performance coroutine implementation

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.