What is the exact difference between static tasks/functions and automatic tasks/functions ? please explain with a clear example

In reply to srikanthen:

With no delays, you have a race condition. There are many possible outcomes, although you are only likely to see 5,7, or 7,5. That is because most event driven simulators only exec one thread at a time and do not switch to another thread until there is a potential blocking event.