Project – Park Operations System – the calm before the storm
While our park thrives with lively dinosaurs and excited visitors, our behind-the-scenes operations must run concurrently and seamlessly. The use of concurrency can ensure that tasks such as feeding dinosaurs, tracking dinosaur movements, and scheduling staff shifts are handled efficiently.
However, despite our best efforts, things start to go awry. A few dinosaurs become restless, security systems begin to glitch, and staff reports mysterious occurrences. Could this be the calm before the storm, and will we relive what happened in a famous competing park they made a movie about?
Update the following Park Operations System so that it concurrently safely handles different park operations. Use low-level threading, ExecutorService
, atomic classes, synchronized blocks, and the Lock
interface to manage concurrent access to shared resources. Prevent and handle race conditions, deadlocks, livelocks, and starvation...