1. Introduction, Multiple Tasks and Multiple Processes
1. Introduction, Multiple Tasks and Multiple Processes
Process
Multiprogramming
Multitasking
Multiprocessing
Multithreading
Process
A single execution of a program is called as
Process.
If we run the same program two different times, we
have created two different processes.
Each process has its own state that includes not
only its registers but all of its memory.
In some OSs, the memory management unit is used
to keep each process in a separate address space.
In others, particularly lightweight RTOSs, the
processes run in the same address space.
Processes that share the same address space are
often called threads
Multiprogramming
Multiprogramming is also the ability of an
operating system to execute more than one
program on a single processor machine.
More than one task/program/job/process can
reside into the main memory at one point of
time.
A computer running excel and firefox browser
simultaneously is an example of
multiprogramming.
Multitasking
Multitasking is the ability of an operating
system to execute more than one task
simultaneously on a single processor machine.
In reality no two tasks on a single processor
machine can be executed at the same time.
Actually CPU switches from one task to the
next task so quickly that appears as if all the
tasks are executing at the same time.
Multitasking System
Multiprocessing
Multiprocessing is the ability of an operating
system to execute more than one process
simultaneously on a multi processor machine.
In this, a computer uses more than one CPU at
a time.
Multithread
Threads are the light wait processes which are independent
part of a process or program
Processes that share the same address space are often
called threads
Multithread
Multithreading is the ability of an operating system to
execute the different parts of a program called threads
at the same time.(ex. spelling check ,grammar checking
in microsoft word )
Threads are the light wait processes which are
independent part of a process or program.
In multithreading system, more than one threads are
executed parallel on a single CPU.
Multiple tasks and multiple
processes
Many embedded computing systems do more
than one thing that is the environment can
cause mode changes that in turn cause the
embedded system to behave quite differently.
These different tasks are part of the system’s
functionality but that application-level
organization of functionality is often reflected
in the structure of the program as well.
A process is a single execution of a program. If
we run the same program two different times we
have created two different processes.
Each process has its own state that includes not
only its registers but all of its memory.
In some OSs, the memory management unit is
used to keep each process in a separate address
space. In others, particularly lightweight RTOSs,
the processes run in the same address space.
Processes that share the same address space are
often called threads.
To understand why the application can be divided into tasks let us consider the
example.
This device is connected to serial ports on both ends. The input to the box is
an uncompressed stream of bytes. The box emits a compressed string of bits
on the output serial line, based on a predefined compression table. Such a box
may be used, for example, to compress data being sent to a modem.
Variable data rates:
The variable data rates term used in
telecommunication and computation related to the bit rate
used in sound or video encoding. It allows a higher bit rate to
be located to the more complex segments of media files and
less space is allocated to less complex segments.
Advantages:
• It produces a better quality to space ratio
• It used more flexible to encode the sound or video data more
accurately.
Disadvantages:
• It may take more time to encode, as the process in more
complex.
• Some hardware may not compatible with variable data rates.
Asynchronous input:
The text compression box provides a simple example
of rate control problems. A control panel on a
compression machine provides an example of a
different type of rate control problem, known as
asynchronous input.
Initiation Time:
Process goes from waiting state to ready state
Deadline:
It specifies when a computation must be finished
Timing Requirements on processes
Timing Requirements on processes
Sequence of process with a high initiation rate
Missing a deadline:
Variety of actions can be taken when missing a deadline
Data Dependencies among process
DAG:
A directed acyclic graph (DAG) is a directed graph that
contains no cycles
A set of processes with data dependencies is known as a
task graph
Communication among processes at
different rates
CPU usage metrics
The initiation time is the time at which a process actually
starts executing on the CPU.
The completion time is the time at which the process
finishes its work.
The simplest and most direct measure is Utilization:
Multiple Timers
While Loop