78.8k views
4 votes
What do you understand by multitasking?Explain cooperativemultitasking ?

User Christel
by
6.1k points

2 Answers

4 votes

Answer:

The term multitasking refers to the act of performing two (or more) tasks at the same time. In our present society this concept has a common place in the lives of the vast majority of people. Few jobs do not require, at some level, any form of multitasking. What's more, in a 100% connected society, the immediacy of interactions and access to information keeps our attention constantly shifting, and smartphones, added to social networks, are everyday tools that keep us constantly multitasking wherever we go. .

An important use of coroutines is the provision of a multitasking environment where multiple "tasks" (threads) can execute concurrently, sharing processor usage. Unlike a thread-based environment, which is typically preemptive (ie, tasks involuntarily lose control of the processor at any time of their execution), a coroutine-based environment is basically cooperative, meaning that tasks voluntarily relinquish the processor control.

The cooperative multitasking style has the advantage that breakpoints are well-defined because you know exactly when control moves from task to task. So there is not that big bottleneck that we saw with context switching, where all registers need to be saved, among others. A more elegant, efficient and green solution.

Step-by-step explanation:

User Bdetweiler
by
5.9k points
2 votes

Answer: Multitasking is the ability of the operating system by which a processor is able to process multiple task at the same time.

Cooperative multitasking is non preemptive multitasking where the processor is assigned to a single process and does not preempt until it completes its jobs or moves to a waiting state.

Step-by-step explanation:

In Multitasking jobs are executed at a faster rate than as many jobs or tasks can be assigned to the processor at the same time.

In cooperative multitasking due to the non preemptive nature a single job could be assigned to the cpu at a time.

User Evan Shaw
by
5.9k points