Home / Blog / What is Job Scheduling and CPU Scheduling in ML?
cpu scheduling

What is Job Scheduling and CPU Scheduling in ML?

Multiple Programming, Multitasking, Multi-threading

Multi-programming shows our OS can handle multiple threads at the same time using multi-threading techniques. Many software packages for modern computer systems are multi-threaded [2]. For example, a web browser can use one thread to display images and a second thread to retrieve data from the network.

                                     Figure 1: Multi-programming                                    

Multitasking is based on time sharing. CPU defines a separate time slot for each task. For example, if we have 3 jobs we denote jobs as j1, j2, and j3. CPU a lot of T1 time to the j1 job, T2 time slot to j2 and T3 will assign to the j3 job CPU completes all these jobs in nanoseconds.

Figure 2:Multitasking 

Multi-programming means more than one program can execute at the same time handled by the CPU. The multitasking concept is based on context switching it’s a logical extension of multitasking [3]. When the CPU performs the j1 job it needs to perform I/O (input/output) operation for each job and I/O operations are slow and take some time so, during I/O operation CUP will be sitting idle which is not an ideal performance to get the results for maximum utilization of CPU multi-programming concept had designed. If the CPU has to perform two jobs at the same time and j2 [2]. When the CPU performs an I/O task and is set idle then it can entertain j2 here is the context-switching concept that can apply.

Figure 3: Multi-threading

Difference between job Scheduling and CPU Scheduling

Job Scheduling and CPU Scheduling

Sometimes CPUs have to entertain more than one process at a time. It is near to [1] impossible to execute all processes simultaneously. Therefore, those processes are placed in the storage or the job pool so that they can be executed later. Job scheduling is the mechanism to select processes from this storage and bring them into the ready queue [1]. CPU scheduling is the mechanism to select which process has to be executed next and allocates the CPU to that process. It invokes when events such as when the clock interrupts, I/O interrupts and Operating System calls occur. Generally, the CPU scheduler is frequently invoked.

Post navigation