Is it true that the x86 ASM “LOCK” command prefix causes all cores to freeze while the instruction following “LOCK” is being executed?
I read this in a blog post and it doesn’t make sense. I can’t find anything that indicates if this is true or not.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s about locking the memory bus for that address. The Intel 64 and IA-32 Architectures Software Developer’s Manual – Volume 3A: System Programming Guide, Part 1 tells us:
Here we learn that the P6 and newer chips are smart enough to determine if they really have to block off the bus or can just rely on intelligent caching. I think this is a neat optimization.
I discussed this more in my blog post “How Do Locks Lock?“