Software Engineering › Key terms › Y12 Secure Software Architecture › Race condition
Race condition
Term Key terms bank Y12 Secure Software Architecture
Definition
A fault where the outcome depends on the timing of two or more processes using the same data, so results are unpredictable (for example two users buying the last ticket).
Example: 'Two withdrawals read the same balance at once.' Prevent with locking.
Found in: syllabus, 2025 HSC marking guidelines, sample exam and familiarisation guidelines, school notes.
Outcome depends on the timing of concurrent access to shared data.
Where it is used in the test
Syllabus area: Y12 Secure Software Architecture.
Question types it can appear in
- Multiple choice: 2025 Q8 answer: Race conditions
- Short answer: Give an example and outline (sample Q22b)
Where it has appeared in the paper
Secure Software Architecture (Part A, B). Part letters follow each paper’s own layout.
Related past questions
- 2025 HSC Q8 (1 mark): User action controls Secure Software Architecture (Part A) · 1 mark
- Sample exam Q22b (3 marks): Race conditions Secure Software Architecture (Part B) · 3 marks
These are the questions the flashcard set links to this term. Open each one and compare your answer with its marking criteria.
Study links
- Flashcard: Race condition in Secure Software Architecture (Year 12) · study that set
- Memorise: User action controls: broken authentication, XSS, CSRF, forwarding, race conditions
- Key terms bank entry: Race condition
- Master answer: sample-q22b (3 marks, short answer (example + outline, max 75 words)) (Master model answers: Secure Software Architecture)
- Notes: User action controls: broken authentication, XSS, CSRF, forwarding, race conditions (Secure Software Architecture (Year 12))
- Notes: Design, develop and implement secure code to minimise vulnerabilities in user action… (Secure Software Architecture (Year 12))
- Notes: Part 3. Where this has been examined (see ../../question_bank.md) (Secure Software Architecture (Year 12))
How to use it in an answer
A model sentence
“A fault where the outcome depends on the timing of two or more processes using the same data, so results are unpredictable (for example two users buying the last ticket).” Then apply it: 'Two withdrawals read the same balance at once.' Prevent with locking.
In a short answer, give the definition in your own words first, then tie it to the situation in the question. Do not copy the example above unless it fits the scenario.
Command words used with it
- Identify: Recognise and name. (2025 HSC Q8 (1 mark): User action controls)
Technique for the question types
- Multiple choice: Read all four options, rule out wrong ones, pick one; no penalty for guessing so never leave blank.
- Short answer: One clear point per mark, use the stimulus and course terms, and answer the command word.
What the marking guidelines and feedback say
A clearer example for this scenario: two teachers update the same student's Attended count at once; both read 4, both write 5, so one update is lost. Fix: atomic transactions / row locks so the read-modify-write cannot be interleaved. (Reasoned example, not from the MG.)
Worked answers from the marking guidelines
Sample exam Q22b (3 marks): Race conditions (3 marks): criteria and sample answer
Criteria
3: Provides an example of when a race condition may occur AND outlines how secure code could prevent it. 2: Outlines some features of race conditions. 1: Some relevant information.
Sample answer
With multiple teachers potentially accessing the database at the same time, race conditions can allow malicious users to gain unauthorised access. Authentication could be used to restrict access to the database, and code can be written to use atomic transactions and database locks to time the reading and writing of data.
Common mistakes
- Use the term exactly as the syllabus words it, then link it to the scenario in the question; the 2025 feedback repeatedly rewards using the stimulus.
- Answer the command word: outline gives main points only, explain gives a reason or cause, discuss gives both sides.
Related terms
Same group in the syllabus: Broken authentication and session management · Cross-site scripting (XSS) · Cross-site request forgery (CSRF) · Invalid forwarding and redirecting · File attacks · Side channel attack