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

Support multi-threaded applications #21

Open
eecheng87 opened this issue May 25, 2022 · 0 comments
Open

Support multi-threaded applications #21

eecheng87 opened this issue May 25, 2022 · 0 comments

Comments

@eecheng87
Copy link
Owner

eecheng87 commented May 25, 2022

In current ESCA, it is only available in single-thread application. It is time to extend ESCA to support multi-thread applications. The expected implementation would be similar with SAIO. Following is proposed changes:

  1. init_esca should allocate a table and pin to a proper physical page by customized system call. (refer to init_worker in SAIO)
  2. sys_register should take responsible for the task mentioned in step 1. Also, kernel need to maintain a global table which contain all the allocated table from user processes. (refer to sys_esca_register in SAIO)
  3. The table indexing of sys_batch should be changed.

To verify the correctness, a unit test program is also needed. The proposed testing program would like (simplified):

void worker() {
    batch_start();
    write(1, "foo", 3);
    write(1, "bar", 3);
    batch_flush();
}
int main() {
    ...
    pthread_create(..., &worker, ...);
    ...
    return 0;
}
@jserv jserv changed the title Support multi-thread applications Support multi-threaded applications May 25, 2022
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

1 participant