Watch 6 Star 7 Fork 2

openEuler / marketingMulanPSL-2.0

No.33 - 基于 Posix 接口的协程框架

暑期2020
待办的
liqingqing  Opened this issue

标题 No.33 - 基于 Posix 接口的协程框架

描述
对于大部分应用程序,实际并不关心实际的运行实体是什么。基于linux kernel的线程调度机制相较于协程占用资源多,上下文切换时间长。当前行业内的解决方案主要是语言级别的协程调度方案,典型的如go routine。本课题的目标是基于glibc的posix接口编程,提供用户无感知的协程调度框架,解决提升存量软件性能。
具体包含:
目标一:pthread相关库的协程化,包含线程管理已经基于线程的条件变量,锁等接口。
目标二:基于目标一,实现网络编程相关接口的协程化。
目标三:全量的posix接口协程化配合。

glibc源码:
https://gitee.com/src-openeuler/glibc

难度

导师 @liqingqing

联系方式 liqingqing3@huawei.com

产出标准

  • 根据实际情况,优先完成目标一,二
  • 目标一:pthread相关库的协程化,包含线程管理已经基于线程的条件变量,锁等接口。
  • 目标二:基于目标一,实现网络编程相关接口的协程化。
  • 目标三:全量的posix接口协程化配合。

技术要求

  • linux基础知识,熟悉posix编程接口及实现。
  • 协程相关原理。
Attachments
5329419 openeuler ci bot 1578984659 23249 genedna 1586065964 total 5 participants

Comments (2)

5329419 openeuler ci bot 1578984659
openeuler-ci-bot 2020-05-23 16:36 owner

Hey @liqingqing , Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot .
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.

BinGao 2020-06-06 10:03

Hi, @liqingqing, I'm Bin Gao, who inquired about this project through the mail before.
As you explained in the mail, we need to develop a language-level coroutine framework without hurting any current POSIX standards.

To do this, inspired by the existing solutions, I think we have the following aspects to discuss now.

  1. stack design 2) scheduler. 3) how to communicate 4) what features to be supported in the prototype.

For the above questions, there are several designs and considerations in existing solutions, such as libgo, lthread, and libco. Learned from these libraries, I propose we answer the above question with these techniques.

  1. shared virtual stack;
  2. Cooperative and preemptive scheduling;
  3. Shared value in the parent process;
  4. this remains to be discussed, I think it's the first priority to just make it run under supporting the simplest features.

Our current task is to discuss and determine the architecture and design of this framework. It's important because we should consider the new features to make the future upgrades easy.

What're your opinions? Hope your suggestions.

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Planed to end
Top level
Priority
1
https://gitee.com/openeuler/marketing.git
git@gitee.com:openeuler/marketing.git
openeuler
marketing
marketing

Help Search