ISC2 Certified Secure Software Lifecycle Professional (CSSLP) Practice Question

Performance profiling shows a C++ microservice where thousands of threads mostly read a shared stdmap of customer balances, while updates are rare. A single stdmutex guards all accesses but throttles throughput. Which change best maintains correctness and reduces contention in this read-heavy scenario?

  • Remove the lock entirely and rely on CPU cache coherence to keep the map consistent across threads.

  • Replace the single mutex with a readers-writer (shared) lock so multiple threads can read concurrently but writers still lock exclusively.

  • Mark the shared std::map variable as volatile to ensure all threads observe the latest values without locking.

  • Guard accesses with a counting semaphore whose permit count equals the number of worker threads.

ISC2 Certified Secure Software Lifecycle Professional (CSSLP)
Secure Software Implementation
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot