Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

统一用户态和内核态的调用 #1072

Closed
xiamaocheng opened this issue Dec 8, 2024 · 1 comment
Closed

统一用户态和内核态的调用 #1072

xiamaocheng opened this issue Dec 8, 2024 · 1 comment

Comments

@xiamaocheng
Copy link

您的功能请求是否与问题/故障有关?请描述一下。
有,我想适配一下用户态和内核态的fork

描述您想要的解决方案
应用层如java ,C++语言调用fork,操作系统会适配

描述您考虑过的备选方案

  • 接口设计:提供一致的用户接口,以简化用户程序的调用。用户态的 fork 调用应能够无缝地转化为内核态的系统调用。
  • 上下文切换:考虑进程上下文切换的开销,优化切换路径。
  • 错误处理:提供清晰的错误返回机制,用于处理资源不足等问题。
  • 同步和调度:在创建多个进程时,确保调度算法合理,避免竞态条件。

其他上下文
在此处添加有关功能请求的任何其他上下文或截图。

@fslongjin
Copy link
Member

你可能没有理解fork的实现。用户程序调用fork,本质是通过libc来发起fork的系统调用的。没有”统一用户态和内核态的调用“这一说。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants