Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3003


This forum is provided to promote discussion amongst students enrolled in Graphics and Animation (CITS3003).
 
Options:
RSS cloud
Jump to:

Event Mode vs Request Mode

3 of 306 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Mon 23rd Mar, 11:12pm
Actions: 
        Login-to-reply

 

Hi,

I get that for the request mode, the program has to wait for the user to trigger the 
device. However, for event mode, it seems like it is waiting for inputs from the event 
queue? So therefore, are event mode and request mode similar?

Event Mode vs Request Mode

photo
From: Naveed A.
Date: Tue 24th Mar, 1:21pm
Actions: 
        Login-to-reply

 

A computer has a number of input devices such as keyboard and mouse. These devices
contain a trigger which can be used to send a signal to the OS.
For the request input mode, the input is provided to the program only when the user triggers
the device (e.g. entering a number then pressing <enter>). The program that requests this
input comes to a halt until the input is entered.
Since most computer systems have more than one input device, each of these devices can
be triggered at an arbitrary time by the user. Each trigger from these input devices generates
an ”event” that is put in an ”event queue” which can be examined by the user program. For
the event input mode, the program may be executing many other operations (i.e., it does not
come to a halt) while waiting for an event to be triggered.

Event Mode vs Request Mode

photo
From: Mohammad J.
Date: Tue 24th Mar, 1:23pm
Actions: 
        Login-to-reply

 

Hi,

If you look at it in this way, it is indeed confusing. 

These differences are more from your application point of view. In your application, the flow is disrupted when a special 'event' takes place and for that, if there is a callback function then that is executed. 

While in request mode, your application keeps on waiting for something to happen, other activities in that thread of execution are held. 

The way event handling is done is an independent discussion. 

Regards,
Asim

P.S: For the sake of analogy, this is similar to polling vs interrupts in microcontrollers. The are special routines/functions that are executed if there is a change in signal over any pin. Special hardware circuitary is required to support it (similarly seperate software is required to support event handling).
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  3:32pm Aug 12 2020