Changes

Jump to: navigation, search

GPU621/Group 6

383 bytes added, 10:51, 28 November 2018
Deadlocks
=== Memory leaks ===
These are a resource leak leaks that occurs when a computer program incorrectly manages to release memory when it is no longer needed.
This may lead to extensive response times due to excessive paging, leading to slower applications.
===Mismatched allocation/deallocation===
this is when attempting to delete memory already deleted or allocate already allocated memory
 
[[File:Invalid_mem_access.JPG]]
There are multiple types of race conditions such as
#Data Race:a Occurs when multiple threads attempt to perform an operation on shared data#Heap Race: performs Performs operations on a shared heap,
#Stack Race: Performs operations on a shared stack.
 
[[File:racecondition_chart.png|400px]]
'''Solutions'''
===Deadlocks===
A deadlock is when a multiple processes attempt to access the same resource at the same time, and the waiting process is holding a resource that the first process needs to finish.
 
[[File:deadlock_chart.png|400px]]
 
'''Solutions'''
 
#Create a global lock hierarchy
#Use recursive synchronization objects such as recursive mutexes if a thread must acquire the same object more than once.
#Avoid the case where two threads wait for each other to terminate. Instead, use a third thread to wait for both threads to terminate.
'''Intel Inspector cannot detect a Deadlock problem involving more than four threads.'''
46
edits

Navigation menu