Skip to content

Commit

Permalink
general/drills: Add "User-level Threading Library" written task as exam
Browse files Browse the repository at this point in the history
Add Markdown file storing the question scenario and the questions
Modify config.yaml to render the new task

Signed-off-by: Petru-Vlad Ionescu <[email protected]>
  • Loading branch information
vladiouz committed Mar 18, 2024
1 parent d688e7f commit 0135a81
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions chapters/general/drills/tasks/user-level-threading-library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# User-level Threading Library

## Scenario

We aim to implement a user-level threading library that provides a POSIX Threads (`pthreads`) API.
The library should be portable across different operating systems and architectures and should be usable in programs written in various programming languages.

Answer the following questions with "True" or "False" and justify the answer.
Justification should be simple, 2-3 sentences for each answer.

## Questions

1. The library can only be used in programs written in compiled languages, NOT interpreted ones.
Answer: False

1. The library can work on operating systems with and without kernel-level thread support.
Answer: True

1. The library does not need to expose synchronization primitives (working with mutexes, spinlocks, condition variables).
Answer: False

1. Programs using the library must be dynamically linked.
Answer: False

1. Code within the library does produce page faults.
Answer: False

1. Code within the library does not lead to system calls.
Answer: False

1. For creating a thread on Linux, the library uses the `clone()` system call.
Answer: False

1. Programs using the library can run in a Docker container.
Answer: True

1. Modifying a file cursor in one thread will be visible in another thread.
Answer: True

1. A program using the library will use only one core/processor.
Answer: True

1. Programs using the library cannot use shared memory to communicate with other processes.
Answer: False
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ docusaurus:
- Application Investigator/: application-investigator.md
- Network Performance Utility/: network-performance-utility.md
- Nightly Builds System/: nightly-builds-system.md
- User-level Threading Library/: user-level-threading-library.md
- Hackathons:
path: content/assignments
subsections:
Expand Down

0 comments on commit 0135a81

Please sign in to comment.