What Is Still Difficult With Events
Explore the challenges inherent in event-based concurrency, particularly on multicore systems where synchronization and locking are required. Understand issues like performance hits from blocking due to paging, the complexity of managing event-driven code as behavior changes, and the difficulties of integrating asynchronous disk and network I/O operations within this model.
We'll cover the following...
There are a few other difficulties with the event-based approach that we should mention.
On multiple CPUs
When systems moved from a single CPU to multiple CPUs, some of the simplicity of the event-based approach disappeared. Specifically, in order to utilize more than one CPU, the event server has to run multiple event handlers in parallel; when doing so, the usual synchronization problems (e.g., critical sections) arise, and the usual solutions (e.g., locks) must be employed. Thus, on modern multicore systems, simple event handling without locks is no longer possible.