
"Performance" depends on the type of application. In general, performance is separated into "throughput" and "delay". Applications like data logging tend to required high throughput, wereas voice type application a short delay time require.
The Avisaro 2.0 system contains a multitasking architecture. The TCP/IP Stack, WLAN driver and BASIC Scripting run in separate tasks. The multitasking has two different modes:
Use the command "sched" (
more ) to configure the length of the timeslot each task should be given. A value of 20 ms ("sched 50" : 1sec/50 = 20ms) is a goog starting point.
Use the command "sched" (
more ) to switch on the Work Load Mode ("sched 0").
It is advised to tell the BASIC Script when to give up computing resources. This is done with the command "sleep 0". Typically this command is inserted after sending a data packet :
repeat_put:
put 201, C, BYTESREAD
if LASTERR <> 0 then
sleep 0
goto repeat_put
end if
There is a 'safety net' - if no sleep 0 is used, every about 20ms the BASIC Scripting task is switched anyway. This is to avoid a 'hanging' system: If BASIC would not free computing resources to the TCP/IP task, no network traffic could be done.
The overall result is a system with short delay times.
When running a Windows PC, there is problem called "Delayed Ack". See
here for details.
Stay tuned ... will be discussed later.