Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions chapters/io/file-descriptors/drills/tasks/buffering/README.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file doesn't belong to this lab, it should be added to lab 11.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ We'll checkout how effective buffering is in `libc` and then we'll do it ourselv
Wrote 1048576 bytes to test-file.txt in 38 ms
```

If possible, try to manually test your implementation.
Use `./checker.sh` only when you are sure of your result.

Buffering achieves dramatic performance gains, reducing read times by **98%** and write times by **99.8%** in this example!
This demonstrates the power of buffering, even though it’s an extreme case.

Expand Down
3 changes: 3 additions & 0 deletions chapters/io/file-descriptors/drills/tasks/mmap_cp/README.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, change the beginning of this file to instruct students to use the lab archive and add a lab9.md file with the download link. Find a model in this PR: #169.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ make: Nothing to be done for 'all'.
Test PASSED (File copies are identical)
```

If possible, try to manually test your implementation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If possible, try to manually test your implementation.
To test your implementation, navigate to the `mmap_cp/support/src` folder.
Run `make` to compile the code and test it manually with files generated by you.
When you think your code is correct, go to `mmap_cp/support/test` and run `checker.sh` to validate your solution.

Reword the other task like this. "If possible" makes no one want to actually test manually.

Use `./checker.sh` only when you are sure of your result.

1. Open `mmap_cp.c` and complete the TODOs to map the files in memory and copy the contents.
Do not forget to clean up by unmapping and closing the files.

Expand Down
3 changes: 3 additions & 0 deletions chapters/io/file-descriptors/drills/tasks/my-cat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Good job!
----------------------------------------
```

If possible, try to manually test your implementation.
Use `./checker.sh` only when you are sure of your result.

1. Implement `rread()` wrapper over `read()`.

`read()` system call does not guarantee that it will read the requested number of bytes in a single call.
Expand Down