Today I was trying to understand what multithreading and hyperthreading are. However I have several doubts regarding it.
In multithreading, what happens when two threads try to modify the same location simultaneously?
Are threads completely operating system concepts and CPU have no idea about them? It sees them as processes?
hyperthreading allows an operating system to see double the amount of logical cores per physical core.
- Does that mean every physical core executes two process simultaneously? Or it means Two threads simultaneously?
So basically I am confused between processes and threads in case of hyperthreading. Also What happens when dependent threads and processes arrive in case of multithreading and hyperthreading?