0
1.4kviews
State the meaning of following terms: (i) multitasking (ii) Shared Data Problem
1 Answer
0
12views

Multitasking

  • In computing, multitasking is the ability of an operating system to hold multiple processes in memory and switch the processor from executing one process to another process is known as multitasking.

  • It creates the illusion of multiple tasks executing in parallel.

  • The act of switching of execution among multiple tasks is known as context switching.

  • In case of a system with a single processor, only one task is said to be running at any point in time, meaning that the processor is actively executing instructions for that task.

  • Multitasking solves the problem by scheduling which task may be the one running at any time and when another waiting task gets a turn T.

  • Even on computers with more than one processor (multiprocessor algorithm) multitasking allows many more tasks to be run that a processors.

Shared data problem

  • A real time operating system intended to serve real time application process data in real time; with processing time in milliseconds.

  • Essentially, RTOS has an advanced algorithm for scheduling multiple tasks. One of the key expectations from RTOS is to be able to quickly and predictably respond to multiple tasks.

  • The challenge of running multiple tasks is of sharing of common resource; it could be memory, I/O address or device.

  • If task 1 cells a function Read X for reading a shared data that is being interrupted and being modified by task 2, there is a chance that data read by task 1 is erroneous.

  • If access to shared resource is not synchronized, it may lead to unpredictable behavior of the task.

  • If a variable is used in two different processes and another task interrupts before the operation on that data is completed, then the value of the variable may differ from the one expected if the earlier operation has been completed. This condition is known as shared data problem.

enter image description here

Please log in to add an answer.