Skip to content

Commit bbb2ff7

Browse files
raress04teodutu
andcommitted
Update chapters/io/optimizations/drills/tasks/async-server/tests/check_server.sh
Co-authored-by: Teodor Dutu <[email protected]>
1 parent 9bff53b commit bbb2ff7

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

chapters/io/ipc/drills/tasks/client-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ordered Client-Server Communication
22

3-
Navigate to `chapters/io/ipc/drills/tasks/client-server/` and run `make` to generate the `support` directory.
3+
Navigate to `client-server` directory of the extracted archive (or `chapters/io/ipc/drills/tasks/client-server/` if you are working directly in the repository) and run `make` to generate the `support` directory.
44
This exercise will guide you in creating a basic messaging protocol between a server and a client.
55
Although in real-world applications a server typically handles multiple connections at once, here we focus on a single connection.
66
Handling multiple connections is further explored in [I/O multiplexing](../../../../io-multiplexing/reading/io-multiplexing.md).

chapters/io/optimizations/drills/tasks/async-server/README.md

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

3-
Navigate to `chapters/io/optimizations/drills/tasks/async-server` and run `make` to generate the `support` files.
4-
Enter `support` and run `make test-file.txt` to generate the test file.
3+
Navigate to `async-server` directory of the extracted archive (or `chapters/io/optimizations/drills/tasks/async-server` if you are working directly in the repository) and run `make` to generate the `support` files. Enter `support` and run `make test-file.txt` to generate the test file.
54

65
This task builds on the previous example of a [multiplexed client-server](../../tasks/multiplexed-client-server/README.md).
76
The server accepts connections from clients and downloads a file of `100MB` from each.
87
After uploading the file, the clients close the connection.
98

10-
1. Open `server.c` and complete the TODOs in the main function to setup IO multiplexing using [`epoll`](https://man7.org/linux/man-pages/man7/epoll.7.html).
9+
1. Look at the code in `support` and open `server.c` and complete the TODOs in the main function to setup IO multiplexing using [`epoll`](https://man7.org/linux/man-pages/man7/epoll.7.html).
1110
Use `epoll_create()`, `epoll_wait()`, and the wrappers defined in `w_epoll.h` to handle descriptors without blocking.
1211
**Remember** to remove the client sockets from the `epoll` instance before closing them.
1312

chapters/io/optimizations/drills/tasks/async-server/tests/check_server.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
TEST_FILE="../support/test-file.txt"
55
if [ ! -f "$TEST_FILE" ]; then
6-
echo "run make test-file.txt to generate the test file"
6+
echo "run make test-file.txt in the `support/` folder to generate the test file"
77
exit 1
88
fi
99

@@ -25,7 +25,7 @@ rm -f "$SERVER_LOG" "$CLIENT_LOG"
2525
PID_LIST=$(lsof -ti tcp:$PORT)
2626
if [ -n "$PID_LIST" ]; then
2727
echo "Killing previous server processes on port $PORT: $PID_LIST"
28-
kill -9 "$PID_LIST"
28+
lsof -ti tcp:$PORT | xargs kill -9
2929
sleep 1
3030
fi
3131

chapters/io/optimizations/drills/tasks/multiplexed-client-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Multiplexed Client Server
22

3-
Navigate to `chapters/io/optimizations/drills/tasks/multiplexed-client-server` and run `make` to generate the `support` files.
3+
Navigate to `multiplexed-client-server` directory of the archive, (or `chapters/io/optimizations/drills/tasks/multiplexed-client-server` if you are working directly in the repository) and run `make` to generate the `support` files.
44

55
This task builds on the previous implementation of a [client-server ordered communication](../../../../ipc/drills/tasks/client-server/README.md).
66
Previously, the client and server followed a strict, sequential communication pattern: each peer had to send a message and wait for a reply before proceeding.

chapters/io/overview/reading/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# I/O
22

3+
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_11_IO_Optimizations.zip) and in the [GitHub repository](https://github.com/cs-pub-ro/operating-systems).
4+
35
We know that a compute system is a collection of hardware and software that modifies data.
46
This data has to come from _somewhere_.
57
This _somewhere_ is always outside the compute system: files, network packets, radio signals, sensor data.

0 commit comments

Comments
 (0)