From 5dc69f606a75780ca9234b0ed8a535650537f20b Mon Sep 17 00:00:00 2001 From: t2-akhmetov <tair2.akhmetov@live.uwe.ac.uk> Date: Sat, 6 Jan 2024 10:40:06 +0000 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 03e0354..9782185 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,16 @@ # Context switching with fibers and FIFO scheduler in System V ABI - +### The following file structure for the tasks +For the solution of the tasks, the implementation of APIs was stored in a seperate files, while the examples and unit test, which are powered via `simpletest`, are seperate files as well. +### Overall Results +The following functionalities have been implemented: +1. Struct Fiber, +2. Class Fiber, +3. Class scheduler, with support for yield, do_it, spawn, and get_data, +4. Functions/fibers for the queue, +5. Simpletest unit tests, +6. Example code files for the implemented APIs. + +Below, the task of creating the aforementioned functionalities are documented. ## Task 1 This project demonstrates the implementation of a basic fiber system in C++, using context switching and stack management. It showcases the creation and execution of lightweight, user-space threading constructs called fibers within a single thread. The final solution(foo_goo_ext.cpp) for the last pseudo code comprises of three key functions: `foo`, `goo`, and `main`, which demonstrate context switching between fibers while respecting stack alignment and layout rules as specified by the System V ABI for x86-64 Linux systems. @@ -98,6 +109,7 @@ Context mainContext; ``` The main function in foo_goo_ext.cpp orchestrates the context swapping between multiple fibers, such as foo and goo, showcasing the practical implementation of the concepts. +### Run/compile instructions The following are instructions for running the code: ```sh as -o context.o ../context/context.s -- GitLab