Essay sample library > Pre-Emptive and Cooperative Scheduling

Pre-Emptive and Cooperative Scheduling

2023-09-07 03:29:02

Over the years, computer science has evolved, modern software development has emerged as a standard. That is multitasking. Regardless of whether it is logical or physical, it has become a requirement of today's plan. In order to make this possible, it is necessary to establish the concept of concurrency and scheduling. This article describes concurrency and two types of scheduling (using preemptive threads in threads, cooperation in agents, their similarities and differences).

The scene of Frankfurt type is an example of behavioral "causal overdetermination". Excessive decisions are considered "priority" rather than "simultaneous". With simultaneous overdetermination, the two causal relationship sequences operate with overdetermined actions and are actually issued (or evented). In the preemptive decision, certain events actually occur in some way and occur in different ways if the actual causal sequence does not occur. Therefore, in the above Frankfurt style scenes, the Black device is one reason why Jones' T2 selection was preemptively preemptive.

This will take longer than thread completion and higher priority tasks to block and schedule new threads than preemptive scheduling with timely system interrupts (eg every 10 milliseconds). When tasks with lower priority are executed, long-term scheduling is executed. Another advantage is that it is implicitly called in code, such as sleeping or waiting for a channel, so that only compiling protects / restores registers that survive these points in time. In Go, this means that only three registers, PC, SP, and DX (data register), are updated during context switching, not all registers (AVX, floating point, MMX, etc.).

As mentioned in the previous paragraphs, Goroutines are cooperatively deployed. In cooperative scheduling, there is no concept of scheduler time slice. In this type of scheduling, Goroutines periodically generates control when idle, or logically blocked to run multiple Goroutines simultaneously. Switching between Goroutines occurs only at explicitly defined times, that is, explicit calls to the Goruntime scheduler at that time. A well-defined point is that in certain Go applications, the number of threads Goroutines can execute is equal to GOMAXPROCS. You can also use this runtime package to change this number at runtime. The OST thread is located in the processor and the goroutine is located in the OS thread