Giter VIP home page Giter VIP logo

micoro's Introduction

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 <[email protected]>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.