aboutsummaryrefslogtreecommitdiff
path: root/docs/miscellanoues/jobs_vs_tasks.md
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-03-20 16:39:30 +0100
committerKarel Kočí <cynerd@email.cz>2016-03-20 16:39:30 +0100
commit9439c6f1caffd938673018f3af7460b33a12528e (patch)
tree55eb32bfb1f90a489982853f698619a2083a4285 /docs/miscellanoues/jobs_vs_tasks.md
parent1ac3026c039cb15dd8c110c84215096854c3c804 (diff)
downloadavr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.tar.gz
avr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.tar.bz2
avr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.zip
Another work progress
Diffstat (limited to 'docs/miscellanoues/jobs_vs_tasks.md')
-rw-r--r--docs/miscellanoues/jobs_vs_tasks.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/miscellanoues/jobs_vs_tasks.md b/docs/miscellanoues/jobs_vs_tasks.md
new file mode 100644
index 0000000..17d7fdd
--- /dev/null
+++ b/docs/miscellanoues/jobs_vs_tasks.md
@@ -0,0 +1,17 @@
+Jobs vs. Tasks
+==============
+This document refers to [Jobs](/parts/jobs.md) and [Tasks](/parts/tasks.md).
+
+You should be familiar with threads from other platforms. Tasks are from usability
+point of view almost same. They are switched according their priority and
+availability. Jobs are different. They are designed to execute single function at
+the time and when this function exits it executes another. It cant interrupt
+execution when more important task come. So why use jobs instead of tasks? Task
+requires for their run stack memory and during whole live of task is this memory
+taken. This limits number of tasks running. Jobs are sharing same stack and only
+one function has data on it at the time. This results in less memory consumption.
+Another huge difference is how planing works. Tasks are planned based on priority.
+Task with higher priority will run unless it isn't suspended. Jobs don't have
+priority, but they have to specify time until they should be finished (deadline)
+and duration of execution. With these two parameters jobs planner can plan their
+execution.