Question

suppose, I am having the application for movie seat reservation. scenario is, 3 different request comes at system at exact same time. neither the difference in milliseconds also... How to handle the request? how to define the critical section and what strategy i need to use. since all request are on exact same timing, so how to priorities which user should proceed first.

Was it helpful?

Solution

The concurrent request will be handled by Framework. For accessing shared resource in Code you need to apply locking mechanism. And if your program directly writing to database you need to apply database transaction locking.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top