blog




  • Essay / Preemptive and cooperative planning - 1244

    Over the years, IT has continued to evolve; leading to the emergence of what has become a standard in modern software development: multitasking. Whether logical or physical, it has become a requirement of today's programs. For this to be possible, it became necessary to establish the notion of competition and scheduling. In this essay, simultaneity will be discussed as well as two types of planning; preemptive used in threads and cooperative used in agents, their similarities and differences. Competition is an essential part of multitasking; after all, using concurrency means running multiple tasks at the same time or at least to give this impression: “Concurrency is an illusion of parallelism. Thus, two tasks are concurrent if there is the illusion that they are executed in parallel, when in reality only one of them can be executed at any given time. » (DMDhamdere, 2006, p91). However, in the case of multicore or multiprocessor processors, true parallelism can be achieved. In any case, in order to maintain the illusion of parallelism, it is essential to alternately execute various tasks. It is therefore particularly important to determine which task will run next. This is where planning appears since, according to DMDhamdere (2006, p91), planning consists of selecting the next process to serve, to do this, different policies can be used, depending on the context in which the program is going to be used , of course, combinations are also possible. Let's mainly focus on commonly preemptive scheduling (used by threads) and cooperative scheduling (used by agents). First, preemptive scheduling, in this configuration a process, thread or application can be preempted. This means that it can be suspended in the middle of the paper......me needed for the planner to change tasks; this may cause some latency but will still be better than an unscheduled batch. In conclusion, both preemptive and cooperative planning have strengths as well as weaknesses, and these can affect performance. Ultimately, it all comes down to choosing the right one for the type of outcome and behavior one wants to achieve as well as the hardware available. In some cases, preventive planning may prevail; in others it may be cooperative planning, but of course using the two together is also a possibility. Works CitedMicrosoft MSDN (2010) Comparing concurrency runtime with other concurrency models. Available at http://msdn.microsoft.com/en-us/library/dd998048.aspx (Accessed May 21, 2011)Dhamdere, MD (2006), Operating Systems: A concept based Approach 2E, Tata McGraw-Hill Education