Cicode Programming Reference > Performing Advanced Tasks > How Cicode is Executed

How Cicode is Executed

Your multi-tasking operating system gives Citect SCADA access to the CPU through threads. However, this access time is not continuous, as Citect SCADA needs to share the CPU with other applications and services.

Note: Be careful when running other applications at the same time as Citect SCADA. Some applications place high demands on the CPU and reduce the execution speed of Citect SCADA.

The Citect SCADA process has many operations to perform, including I/O processing, alarm processing, display management, and Cicode execution - operations that are performed continuously. And, because Citect SCADA is a real-time system, it needs to perform the necessary tasks within a minimum time - at the expense of others. For this reason, Citect SCADA is designed to be multitasking, so it can efficiently manage it's own tasks.

Citect SCADA performs its tasks in a specific order in a continuous loop (cycle). Citect SCADA's internal tasks are scheduled at a higher priority than that of Cicode and have access to the CPU before the Cicode. For example, the Alarms, Trends, and I/O Server tasks all get the CPU before any of your Cicode tasks. The reports are scheduled at the same priority as your Cicode. Citect SCADA background spoolers and other idle tasks are lower priority than your Cicode.

For Cicode, which consists of many tasks, Citect SCADA uses round-robin single priority scheduling. With this type of scheduling each task has the same priority. When two or more Cicode tasks exist, they each get a CPU turn in sequence. This is a simple method of CPU scheduling.

Note: If a Cicode task takes longer than its designated CPU time to execute, it is preempted until the next cycle - continuing from where it left off.

See Also

Published June 2018