Skip to content

Commit 83caf2d

Browse files
committed
io/optimizations/drills/tasks/async-server Update README
The instructions numbering in README was only 1s, oddly looking Signed-off-by: Rares Balcan <[email protected]> io/optimizations/drills/tasks/multiplexed-client-server Update README The instructions numbering in README was only 1s, oddly looking Signed-off-by: Rares Balcan <[email protected]> io/optimizations Add checker for async-server Added a checker for async-server. Added `make check` rule to the Makefile. Updated README.md with checker instructions. Modified the `test-file` size that is being sent from 1GB to 100MB, so the checker can run in a shorter time. Signed-off-by: Rares Balcan <[email protected]> io/optimizations: Add checker for async-server Added a checker for async-server. Added `make check` rule to the Makefile. Updated README.md with checker instructions. Modified the `test-file` size that is being sent from 1GB to 100MB, so the checker can run in a shorter time. Signed-off-by: Rares Balcan <[email protected]> io/ipc: Add checker for client-server Added checker(s) for client-server, one for the client, another one for the server. Added instructions in README upon using the checker and a Makefile rule for it. Added a script for resetting connection, in case the port is blocked. Signed-off-by: Rares Balcan <[email protected]> labs/lab-11: Add checkers and fix wording Added checkers for async-server and client-server. Added 'make check' rules to the Makefile. Updated README.md with checker and arhchive instructions. Added lab11.md in overview/reading. Signed-off-by: Rares Balcan <[email protected]> Update chapters/io/ipc/drills/tasks/client-server/README.md Co-authored-by: Teodor Dutu <[email protected]> Update chapters/io/optimizations/drills/tasks/async-server/tests/check_server.sh Co-authored-by: Teodor Dutu <[email protected]> Update chapters/io/ipc/drills/tasks/client-server/tests/check_server.sh Co-authored-by: Teodor Dutu <[email protected]> Update chapters/io/ipc/drills/tasks/client-server/tests/check_client.sh Co-authored-by: Teodor Dutu <[email protected]> Update chapters/io/optimizations/drills/tasks/async-server/tests/check_server.sh Co-authored-by: Teodor Dutu <[email protected]> Update chapters/io/ipc/drills/tasks/client-server/solution/Makefile Co-authored-by: Teodor Dutu <[email protected]> Update chapters/io/optimizations/drills/tasks/async-server/solution/Makefile Co-authored-by: Teodor Dutu <[email protected]> Update chapters/io/optimizations/drills/tasks/async-server/solution/Makefile Co-authored-by: Teodor Dutu <[email protected]> software-stack/system-calls: Fix minor bugs in lab01 - Fix SPDX license comment to use asm comment style - Fix `syscall-wrapper/support/` directory structure - Fix no. of skipped lines when generating `main.c` Signed-off-by: Vlad Grigore <[email protected]> assignments/elf-loader: Add ELF Loader assignment Add a new PIE statically linked ELF Loader assignment. Signed-off-by: Stefan Jumarea <[email protected]> data/memory-security: Fix typo in `buffer-overflow-leak` guide Replace "don" with "don't". Signed-off-by: Mihnea Firoiu <[email protected]> software-stack/high-level-languages: Fix typo in `high-level-lang` task Replace `spport/` with `support/`. Signed-off-by: Sorin Birchi <[email protected]> data/working-with-memory: Fix inconsistencies in lab 3 - `make skels` would generate the src file which had random brace symbols scattered throughout and made compiling the code impossible. - Replaced C Syntax code (scanf, printf) with dlang equivalent (readf, write/writeln). Pass `in_bits` array by ref in the `to_bits` function so the code actually does what it is supposed to. Minor additional spacing. - Made the read-only variable `ro` a global variable instead of a local one to be added to the .rodata section. Keeping it as a local variable stopped executing but still permitted writing via `do_write()` function. Signed-off-by: dariusica2 <[email protected]> compute/synchronization: Add link to the lab 8 archives and fix typos - Add links to the lab archive and change directory references. - Fix typo in `tls-on-demand` TODO. Signed-off-by: Vlad Hosu <[email protected]> io/ipc: Add link to lab 10 archive and review lab 10 - Add links to the lab archive and change directory references. - Add man links and additional explanations in the text. - Correct some comments. Signed-off-by: Laura Ruse <[email protected]> data/guides: Created dedicated guide folder for support files Created `static-dynamic` guide folder and moved assosiated files to it. Modified references to it in `.md` files. Signed-off-by: Cristian-Stefan Lazar <[email protected]> Modified generate_skels.py from Lab2 (#195) Added go files when generating skels Signed-off-by: Sorin Birchi <[email protected]> software-stack/libc: Fix minor bugs in lab02 - Fix SPDX license comment to use asm comment style - Remove redundant calls to 'os_string' functions in task 'libc' (probably a leftover from the other task) - Change 'putchar_buffer_len' from 'char' to 'int' to hold 1024 characters (had a student ask why the length was stored in a char, it shouldn't) Signed-off-by: Vlad Grigore <[email protected]> Update lab archive generator workflow Remove `.zip` from gitignore, this is needed because the workflow will overwrite the changes to the archive if the file is ignored by git. Create a commit for removing the outdated archives, since `git stash pop` will generate a merge conflict otherwise. Check if the name of the task contains `drills`. If it does not, do not add it to the archive. Signed-off-by: Stefan Jumarea <[email protected]> labs/lab6: Review and fix typos Fix #176 Signed-off-by: Mihai-Carol Bazga <[email protected]> /data/working-with-memory: Update `static-dynamic` Makefile for proper static and dynamic linking The previous Makefile did not provide both dynamic and static executables. Signed-off-by: Oprea Stefan Antoniu <[email protected]> data/tasks/copy: Add a rule to generate in.dat (#204) Added new `input` rule to create `in.dat` containing "Hello, world!". Updated the `all` target to include `input`, ensuring the file is generated automatically during the build. Fixes #203 Signed-off-by: Andreia Ocanoaia <[email protected]> software-stack/drills: Remove the `support/` folder for the `libc` task. This folder is generated by `make skels`. Signed-off-by: Andrei Lungu <[email protected]> exec-shellcode/Makefile: Fix Makefile Fix: Utils directory is from now on being copied to output. Signed-off-by: Mihnea Firoiu <[email protected]> software-stack/system-calls: Fix typo and rephrase Fix a typo in drills/questions/syscall-numbers.md Signed-off-by: nicolasdumitru <[email protected]> io/file-descriptors: Add testing suggestion for each task. Suggested students to test manually each task before using 'tests/checher.sh', for a better understanding of the concept. Added `lab9.md` that instructs students to download the arhive or use GitHub. Changed config.yaml to add `lab9.md` to the archive. Added guidance to tasks directories. Signed-off-by: Matei Stanuca <[email protected]>
1 parent c9fa116 commit 83caf2d

File tree

131 files changed

+1550
-349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1550
-349
lines changed

.checkpatch.ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Ignore directories containing third-party files
22
chapters/compute/synchronization/drills/tasks/threadsafe-data-struct/support
33
content/assignments/async-web-server/src/http-parser
4+
content/assignments/elf-loader/tests

.github/workflows/lab-archive.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ jobs:
3737
exit 0
3838
fi
3939
40+
git config user.name "github-actions[bot]"
41+
git config user.email "github-actions[bot]@users.noreply.github.com"
42+
43+
ls -A *.zip > zip-list
44+
git add *.zip
45+
git stash
46+
4047
# Create or switch to lab-archives branch
4148
if git ls-remote --exit-code origin lab-archives; then
4249
git fetch origin lab-archives
@@ -46,15 +53,12 @@ jobs:
4653
git rm -rf .
4754
fi
4855
56+
# Remove old archives
57+
for f in $(cat zip-list); do rm "$f"; git rm "$f"; done
58+
git commit -m "Remove outdated lab archives for commit $GITHUB_SHA"
59+
4960
# Copy new zips into branch root
61+
git stash pop
5062
git add *.zip
51-
52-
# Only commit if there are changes
53-
if ! git diff --cached --quiet; then
54-
git config user.name "github-actions[bot]"
55-
git config user.email "github-actions[bot]@users.noreply.github.com"
56-
git commit -m "Update lab archives for commit $GITHUB_SHA"
57-
git push origin lab-archives
58-
else
59-
echo "No changes to commit."
60-
fi
63+
git commit -m "Update lab archives for commit $GITHUB_SHA"
64+
git push origin lab-archives

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*.war
1616
*.nar
1717
*.ear
18-
*.zip
1918
*.tar.gz
2019
*.rar
2120

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The contents of the lab are located in the [lab archive](https://github.com/cs-pub-ro/operating-systems/raw/refs/heads/lab-archives/Lab_6_Multiprocess_and_Multithread.zip) and in the [GitHub repository](https://github.com/cs-pub-ro/operating-systems).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The contents of the lab are located in the [lab archive](https://github.com/cs-pub-ro/operating-systems/raw/refs/heads/lab-archives/Lab_8_Synchronization.zip) and in the [GitHub repository](https://github.com/cs-pub-ro/operating-systems).

chapters/compute/processes/drills/tasks/create-process/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Create Process
22

3-
Enter the `chapters/compute/processes/drills/tasks/create-process/` directory, run `make skels`, open the `support/src` folder and go through the practice items below.
3+
Enter the `create-process/` directory (or `chapters/compute/processes/drills/tasks/create-process/` if you are working directly in the repository).
4+
Run `make` and then enter `support/` folder and go through the practice items below.
45

56
Use the `tests/checker.sh` script to check your solutions.
67

78
```bash
8-
./checker.sh
9+
./tests/checker.sh
910
exit_code22 ...................... passed ... 50
1011
second_fork ...................... passed ... 50
1112
100 / 100

chapters/compute/processes/drills/tasks/sleepy/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
## Higher level - Python
44

5-
Enter the `chapters/compute/processes/drills/tasks/sleepy` directory, run `make skels`, open the `support/src` folder and go through the practice items below.
5+
Enter the `sleepy/` directory (or `chapters/compute/processes/drills/tasks/sleepy` if you are working directly in the repository).
6+
Run `make` and then enter `support/` folder and go through the practice items below.
67

78
Use the `tests/checker.sh` script to check your solutions.
89

910
```bash
10-
./checker.sh
11+
./tests/checker.sh
1112
sleepy_creator ...................... passed ... 30
1213
sleepy_creator_wait ................. passed ... 30
1314
sleepy_creator_c .................... passed ... 40

chapters/compute/processes/drills/tasks/wait-for-me-processes/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Wait for Me
22

3-
Enter the `chapters/compute/processes/drills/tasks/wait-for-me-processes/` directory, run `make skels`, open the `support/src` folder and go through the practice items below.
3+
Enter the `wait-for-me/` directory (or `chapters/compute/processes/drills/tasks/wait-for-me/` if you are working directly in the repository).
4+
Run `make` and then enter `support/` folder and go through the practice items below.
45

56
Use the `tests/checker.sh` script to check your solutions.
67

@@ -10,7 +11,7 @@ wait_for_me_processes ...................... passed ... 100
1011
```
1112

1213
1. Run the code in `wait_for_me_processes.py` (e.g: `python3 wait_for_me_processes.py`).
13-
The parent process creates one child that writes and message to the given file.
14+
The parent process creates one child that writes a message to the given file.
1415
Then the parent reads that message.
1516
Simple enough, right?
1617
But running the code raises a `FileNotFoundError`.

chapters/compute/processes/reading/processes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ student@os:~$ file /usr/bin/ls
1414
```
1515

1616
When you run it, the `ls` binary stored **on the disk** at `/usr/bin/ls` is read by another application called the **loader**.
17-
The loader spawns a **process** by copying some of the contents `/usr/bin/ls` in memory (such as the `.text`, `.rodata` and `.data` sections).
17+
The loader spawns a **process** by copying some contents of `/usr/bin/ls` into memory (for example the `.text`, `.rodata` and `.data` sections).
1818
Using `strace`, we can see the [`execve`](https://man7.org/linux/man-pages/man2/execve.2.html) system call:
1919

2020
```console

chapters/compute/synchronization/drills/tasks/apache2-simulator-condition/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ There are a few rules though, such as:
2222
- The consumer must not retrieve data if the buffer is empty.
2323
- The producer and the consumer can't access the shared buffer at the same time.
2424

25-
Now enter `chapters/compute/synchronization/drills/tasks/apache2-simulator-condition/` and run `make skels`.
26-
Look at the code in `chapters/compute/synchronization/drills/tasks/apache2-simulator/support/src/producer_consumer.py`.
25+
Now enter the `apache2-simulator-condition/` directory of the extracted archive (or `chapters/compute/synchronization/drills/tasks/apache2-simulator-condition/` if you are working directly in the repository) and run `make skels`.
26+
Look at the code in `support/src/producer_consumer.py`.
2727
We have one producer and one consumer for simplicity.
2828
Observe that the producer calls `notify()` once there is data available, and the consumer calls `notify()`, when data is read.
2929
Notice that this call is preceded by an `acquire()` call, and succeeded by a `release()` call.
@@ -58,7 +58,7 @@ Neat!
5858
So now we have both synchronization **and** signalling.
5959
This is what conditions are for, ultimately.
6060

61-
Open `chapters/compute/synchronization/drills/tasks/apache2-simulator/support/src/apache2_simulator_condition.py` and follow the TODOs.
61+
Open the `apache2-simulator-condition/` directory of the extracted archive (or `chapters/compute/synchronization/drills/tasks/apache2-simulator-condition/` if you are working directly in the repository), then go to `support/src/apache2_simulator_condition.py` and follow the TODOs.
6262
The code is similar to `apache2_simulator_semaphore.py`, but this time we use condition variables as shown in `producer_consumer.py`.
6363

6464
[Quiz](../../../drills/questions/notify-only-with-mutex.md)

0 commit comments

Comments
 (0)