<commit_before>Lecture 8 - Process Synchronization
=============

### race conditions
A race condition when separate processes manipulate the same information at the same time and so it becomes difficult to determine what the actual value of the information should be.

There are 2 reasons why a race condition occurs
* different processes access shared resources
* assembly code is interleaved

### Example revealing shared resource usage race condition
Note that this is actually from end of lecture 7, but yea, its a totally new topic so i put it here.
    Process 1:
      while(1){<commit_msg>spacing<commit_after>Lecture 8 - Process Synchronization
=============
### race conditions
A race condition when separate processes manipulate the same information at the same time and so it becomes difficult to determine what the actual value of the information should be.

There are 2 reasons why a race condition occurs
* different processes access shared resources
* assembly code is interleaved

### Example revealing shared resource usage race condition
Note that this is actually from end of lecture 7, but yea, its a totally new topic so i put it here.
    Process 1:
      while(1){
{'fraction_non_alphanumeric': 0.05550883095037847, 'fraction_numerical': 0.008410428931875526, 'mean_word_length': 4.5607476635514015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5736298', 'n_tokens_mistral': 273, 'n_tokens_neox': 257, 'n_words': 171}