Requirements#
Concurrency Requirements
|
status: draft
security: YES
safety: ASIL_B
|
||||
tags: requirements, concurrency
bazel_module: score_baselibs
version: 1
realizes: wp__requirements_comp
|
|||||
Generic Document
|
|||||
Functional Requirements#
Asynchronous Task Execution
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: ThreadPool__executesSubmittedCallables (passed); ThreadPool__PostTaskFromWithinAnotherTask (passed); ThreadPool__SubmitTaskFromWithinAnotherTask (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall allow running tasks asynchronously. |
|||||
Component Requirement
|
|||||
Task Cancellation
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: ThreadPool__CanAbortThread (passed); TaskResultTest__CanAbortTask (passed); ThreadPool__CanAbortThread (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall allow cancelling tasks when needed. |
|||||
Component Requirement
|
|||||
Simple Task Implementation
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: SimpleTaskTest__ExecutesVoidCallback (passed); SimpleTaskTest__ExecutesCallbackWithParameter (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall provide implementation for executing callable objects without returning results, supporting fire-and-forget asynchronous operations. |
|||||
Component Requirement
|
|||||
Thread Pool Implementation
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall provide implementation that manages submitted tasks in FIFO order. |
|||||
Component Requirement
|
|||||
Interruptible Wait Utilities
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: InterruptibleWait__wait_until_exit_requested_exits_on_stop_requsted (passed); InterruptibleWait__wait_for_returns_true_on_stop_requsted (passed); InterruptibleWait__wait_for_returns_false_on_not_stop_requsted (passed); InterruptibleWait__wait_until_returns_true_on_stop_requsted (passed); InterruptibleWait__wait_until_returns_false_on_not_stop_requsted (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall provide utilities offering APIs for sleep operations allowing early cancellation. |
|||||
Component Requirement
|
|||||
Notification Mechanism
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: Notification__Waits (passed); Notification__WaitGetsAborted (passed); Notification__WaitDoesNotWaitIfAlreadyAborted (passed); Notification__WaitsForNotificationAfterNotifying (passed); Notification__WaitsForNotificationWithTimeout (passed); Notification__WaitsForReturnsFalseWhenTimeoutExpires (passed); Notification__WaitDoesNotWaitIfAlreadyNotified (passed); Notification__WaitsForDoesNotWaitIfAlreadyNotified (passed); Notification__WaitsForGetsAborted (passed); Notification__WaitsForDoesNotWaitIfAlreadyAborted (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall allow one thread to notify another thread once, with a timeout option. |
|||||
Component Requirement
|
|||||
Synchronized Queue
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: SynchronizedQueue__CallPushWhenPopIsWaitingForTimeout (passed); SynchronizedQueue__CallPushWithConstValueWhenPopIsWaitingForTimeout (passed); SynchronizedQueue__CallPushAndPopAtForNoneEmptyQueue (passed); SynchronizedQueue__MakeStressTestForPushingFromMultipleThreads (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall provide a thread-safe container facilitating FIFO transmission of data in a N:1 communication pattern. |
|||||
Component Requirement
|
|||||
Non-Blocking Synchronized Access
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: TypeTraitsTest__IsTryLockableCompileTimeChecks (passed); SynchronizedTest__TryLockSupportsMutableConstAndUnavailableLockables (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
|
|||||
Synchronized object access shall provide a non-blocking lock acquisition operation that returns an empty pointer when the lock cannot be acquired immediately. |
|||||
Component Requirement
|
|||||
Timed Synchronized Access
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: TypeTraitsTest__IsTimedLockableForCompileTimeChecks (passed); SynchronizedTest__TryLockForSupportsMutableConstAndTimedLockables (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
|
|||||
Synchronized object access shall provide a timed lock acquisition operation that returns an empty pointer when the lock cannot be acquired within the specified duration. |
|||||
Component Requirement
|
|||||
Deadline-Based Synchronized Access
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: TypeTraitsTest__IsTimedLockableUntilCompileTimeChecks (passed); SynchronizedTest__TryLockUntilSupportsMutableConstAndTimedLockables (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
|
|||||
Synchronized object access shall provide a deadline-based lock acquisition operation that returns an empty pointer when the lock cannot be acquired by the specified time point. |
|||||
Component Requirement
|
|||||
Long-Running Threads Container
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
testlink: ThreadPool__ExecutesSubmittedCallables (passed); ThreadPool__StopRequestFunctional (passed); ThreadPool__ExecuteTaskWhileThreadPoolWasAlreadyDestructed (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall provide a container for managing long-running threads, allowing addition and removal of threads. |
|||||
Component Requirement
|
|||||
Non-Functional Requirements#
Memory Usage Control
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall limit memory usage to prevent uncontrolled resource consumption. |
|||||
Component Requirement
|
|||||
Memory Reservation
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall allow reserving memory upfront for tasks to ensure predictable resource allocation. |
|||||
Component Requirement
|
|||||
Thread Count Reporting
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Non-Functional
testlink: ThreadPool__CorrectMaxConcurrencyLevel (passed); ThreadPool__correctMaxConcurrencyLevel (passed); ConcurrentTimedExecutorFixture__HoldsExpectedConcurrentActions (passed)
version: 1
derived from: feat_req__baselibs__concurrency_library
satisfied by: comp__baselibs_concurrency
fulfilled by: comp_arc_sta__baselibs__concurrency
|
|||||
The concurrency module shall report the maximum number of concurrent threads available for task execution. |
|||||
Component Requirement
|
|||||
Assumptions of Use (AoU)#
Cooperative Cancellation Handling
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
version: 1
|
|||||
Users shall implement cancellation logic in long-running tasks to respond to stop_token signals. |
|||||
Assumption of Use Requirement
|
|||||
Memory Management on Task Submission Failure
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
version: 1
|
|||||
Users shall handle task submission failures when the bounded memory resource is exhausted and implement appropriate backpressure mechanisms. |
|||||
Assumption of Use Requirement
|
|||||
Thread Pool Sizing
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Functional
version: 1
|
|||||
Users shall size ThreadPool according to task characteristics and avoid submitting blocking tasks that will starve the thread pool. |
|||||
Assumption of Use Requirement
|
|||||
Thread Safety
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, concurrency
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
|
|||||
Users shall implement appropriate synchronization mechanisms when sharing state between tasks, as the library only guarantees thread-safe task submission and execution scheduling. |
|||||
Assumption of Use Requirement
|
|||||