The electronic forum deals with the topics related to analog and digital circuits and systems (i.e. ASIC, FPGA, DSPs, Microcontroller, Single/Multi Processors etc) and their programming such as HDL, C/C++, etc.

Many real-time applications require a high-resolution time tick in order to work properly. However, supporting a high-resolution time tick imposes a very high overhead on the system. In addition, such systems may need to change scheduling discipline from time to time to satisfy some user requirements such as Quality of Service (QoS).The dynamic changing of the scheduling discipline is usually associated with delays during which some deadlines might be missed.

GULSHAN IQBAL CMS NO : 7780The Go runtime, specifially focusing on the scheduling module, is the recently proposed scheduler to improve scalability and performance for parallel Go Program.The recently valuable contribution of Dmitry Vyukov an employee in Google has addressed some area for improvement.He published a document detailing some of the failings of the current runtime schedule.I wish to write something about current scheduler.The Go runtime manages scheduling ,garbage collection,and the runtime for goroutines among other things.I will focus only on scheduling for this we need to understand how the runtime worked.Go is a high level language and is still under developement.Go program is compiled into machine code by Go compiler.Since Go provides high level constructs such as goroutines, channels and garbage collection,a runtime infrastructure is required to support these features.This runtime is C code that is statically linked to the compiled user code during the linking phase.During execution Go program is composed of two layers: the user code and the runtime (manages goroutines,channels and high level constructs).Now discussing,the goroutines scheduler is the important outlook of Go runtime.The runtime keeps track of each goroutine, and will schedule them to run in turn on a pool of threads belonging to the process. Goroutines are separate from threads but rely upon them to run, and scheduling goroutines onto threads effectively is crucial for the efficient performance of Go programs.The idea behind goroutines is that they are capable of running concurrently,like threads, but are also extremely lightweight in comparison.So, while there might be multiple threads created for a process running a Go program, the ratio of goroutines to threads should be much higher than 1-to-1. Multiple threads are often necessary to ensure that goroutines are not unnecessarily blocked. When one goroutine makes a blocking call,the thread running it must block. Therefore, at least one more thread should be created by the runtime to continue the execution of other goroutines that are not in blocking calls. Multiple threads are allowed to run in parallel up to a programmer defined maximum, which is stored in the variable GOMAXPROCS. To acomplish the task of scheduling, the Go Scheduler uses 3 main entitiesTHE G STRUCT , THE M STRUCT , THE SCHED STRUCT

The process scheduling is an action of process manager that helps the CPU in selection of process of special need instead of running process. It means it helps the CPU to select process of prime importance rather of running command. It is a vital component of Multi programming operating systems that allow more than one process to be loaded into the executable memory at a time. Their major function is the selection of commands to be submitted into the system and decision which process should operate firstly. Schedulers are of three types (1) Long Term Scheduler(2) Short Term Scheduler (3) Medium Term SchedulerLong Term Scheduler is a job scheduler in which programs are admitted to the system for processing. It loads the memory for execution by selecting processes from pool. It is about absent or negligible in time sharing system and handles the extent of multi programming. Short Term Scheduler is also called CPU scheduler. Its major function is to increase the efficiency of system in relation with the chosen set of criteria. It provides lesser control over degree of multi programming and also minimal in time sharing. It selects those processes which are ready to execute. Medium term scheduling is part of the swapping. It removes the processes from the memory. It reduces the degree of multi programming.criteria:Fairness:This means that each process that are to be executed have a fair share of CPU.Non-preemptive Scheduling:In this scheduling once a process start then it stops only if it terminates or block itself or by request by operating system.Preemptive Scheduling:In this mode, by the operating system currently running process may be moved to the ready State or interrupted.

Last edited by iqra on Thu Apr 02, 2015 6:22 am, edited 1 time in total.

Scheduler:Scheduling is referring to set of policies and mechanism to control the work which is performed by a computer system. Of all the resources in a computerSystem that is scheduled before use, the CPU is by far the most important.

Multi programming is the (efficient) scheduling of the CPU.In multiprogramming systems, when there is more than one run able process. the operating system must decide which one to activate. The decision is made by the part of the operating system which is called scheduler, using a scheduling algorithm. The first Scheduling algorithm is Non-preemptive First-Come-First-Served (FCFS) and Shortest Job first (SJF) which is Good for ‘ ‘background’ ’ batch jobs..and second algorithm is preemptive which includes • Round-Robin (RR) and . Priority which is Good for ‘ ‘foreground’ ’interactive jobs. The scheduler is concerned with deciding policy, not providing a mechanism. A scheduler is designed to select one or more-primary performance criteria. One problem in selecting a set of performance criteria is that they often conflict with each other.

In general, scheduling is performed in three stages: short-, medium-, and long-term.

In Long-term scheduling is done when a new process is created.

In Medium-term scheduling involves suspending processes by swapping them out of.

In Short-term process scheduling occurs most frequently and decides which process to execute next.