Skip to main content

4.1.3 Explain the following scheduling algorithms -------------- ( FIFO & Round Robin )

A)First in First out (FIFO)

Definition

•In computer programming, FIFO (first-in, first-out) is an approach to handling program work requests from queues or stacks so that the oldest request is handled next.
•An abstraction in ways of organizing and manipulation of data relative to time and prioritization.
•This expression describes the principle of a queue processing technique or servicing conflicting demands by ordering process by first-come, first-served (FCFS) behaviour: what comes in first is handled first,





•Gives every process CPU time in the order the come
•The way data stored in a queue is processed
•Each item in the queue is stored in a queue (simpliciter) data structure
•The first data to be added to the queue will be the first data to be removed, then processing proceeds sequentially in the same order.



B)Round Robin Scheduling

Definition

•Round Robin is the simplest algorithm for a preemptive scheduler. Only a single queue of processes is used. When the system timer fires, the next process in the queue is switched to, and the preempted process is put back into the queue.

Process

•Round-robin job scheduling may not be desirable if the size of the jobs or tasks are strongly varying.
•A process that produces large jobs would be favoured over other processes.
•Each process is assigned a time slice or "quantum". This quantum dictates the number of system timer ticks the process may run for before being preempted. For example, if the timer runs at 100Hz, and a process' quantum is 10 ticks, it may run for 100 milliseconds (10/100 of a second). To achieve this, the running process is given a variable that starts at its quantum, and is then decremented each tick until it reaches zero. The process may also relinquish its quantum by doing a blocking system call (i.e. I/O), like in other preemptive algorithms.
•In the Round Robin algorithm, each process is given an equal quantum; the big question is how to choose the time quantum.
•Here are some considerations: The smaller the quantum, the larger the proportion of the time used in context switches.
Interactive processes should do I/O before being preempted, so that unnecessary preemptions are avoided.
The larger the quantum, the "laggier" the user experience - quanta above 100ms should be avoided.

•A frequently chosen compromise for the quantum is between 20ms and 50ms.
•Advantages of Round Robin include its simplicity and strict "first come, first served" nature. Disadvantages include the absence of a priority system: lots of low privilege processes may starve one high privilege one.
•Example ,by giving each job a time slot or quantum (its allowance of CPU time) ,and interrupt the job if it is not completed by then

Comments

Popular posts from this blog

Operating Systems Definition and the Classification of OS

             OPERATING SYSTEMS ( OS ) What is an operating system? An operating system (sometimes abbreviated as "OS") is the program that, after being initially loaded into the computer by a boot program, manages all the other programs in a computer. The other programs are called applications or application programs. The application programs make use of the operating system by making requests for services through a defined application program interface (API). In addition, users can interact directly with the operating system through a user interface such as a command language or a graphical user interface (GUI). An operating system performs these services for applications:     In a multitasking operating system where multiple programs can be running at the same time, the operating system determines which applications should run in what order and how much time should be allowed for each application before g...

3.1.1 Identify Between Resident And Transient Routines

Memory Management Memory management is concerned with managing: The computer’s available pool of memory Allocating space to application routines and making sure that they do not interfere with each other. 3.1.1 Identify between resident and transient routines The operating system is a collection of software routines. Resident routines Transient routines Routines that directly support application programs as they run Stored on disk and read into memory only when needed Example: routine that control physical I/O Example: routine that formats disks The operating system occupies low memory beginning with address 0. Key control information comes first followed by the various resident operating system routines. The remaining memory, called the transient area, is where application programs and transient operating system routines are loaded. Resident & transient routines structure...

Types of Operating System

State four types of Operating System 1)       MICROSOFT WINDOWS Operating system designed and produced by Microsoft Corporation. Similar to other operating systems, Windows makes a computer system user-friendly by providing a graphical display and organizing information so that it can be easily accessed. The operating system utilizes icons and tools that simplify the complex operations performed by computers. Estimates suggest that 90% of personal computers use the Windows operating system. Microsoft introduced the operating system in 1985 and it has continued to be widely used despite competition from Apple's Macintosh operating system. example of windows Display of Window 8 Name Release date Release version Editions Build Windows 10 29 July 2015 NT 10.0 [1] Windows 10 Home. Windows 10 Mac 7 Windows 10 Enterprise Windows 10 Education Windows ...