Sollicitatievraag bij Amazon

How does malloc work in C? How does deadlock prevention work in operating systems?