logo

Crowdly

Simulate a smart home system. Sensors send sensor events to a central hub. Each...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Simulate a smart home system.

Sensors send sensor events to a central hub. Each sensor event has a timestamp,

severity, type and location. Notification worker threads consume events from

the central hub. If the sensor event severity is low the event is logged

(written on disk), if the  severity is

high the notification worker raises an alarm ( prints in the error console). In

main test the program with 5 sensors and 3 workers.  Solve the concurrent access to shared

resources using synchronization, wait and notify or explicit locks. Sensors

should continuously produce random events.

Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на archive.curs.upb.ro?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!