Operating System Tutorial

Operating System Tutorial Types of Operating System Evolution of Operating System Functions of Operating System Operating System Properties Operating System Services Components of Operating System Needs of the Operating System

Operating Systems

Linux Operating System Unix Operating System Ubuntu Operating System Chrome Operating Systems Fedora Operating System MAC Operating System MS Windows Operating System Solaris Operating System Cooperative Operating System CorelDRAW Operating System CentOS FreeBSD Operating Systems Batch Operating System MS-DOS Operating System Commercial Mobile Operating Systems


Difference Between Multi-programming and Multitasking Difference between C-LOOK and C-SCAN Difference between Rotational Latency and Disk Assess Time Trap vs Interrupt Difference between C-SCAN and SSTF Difference between SCAN and FCFS Difference between Seek Time and Disk Access Time Difference between SSTF and LOOK Difference between Process and Program in the Operating System Difference between Protection and Security in Operating System

How To

How to implement Monitors using Semaphores How to Install a Different Operating System on a PC


What is Kernel and Types of Kernel What is DOS Operating System What is Thread and Types of Thread What is Process Scheduler and Process Queue What is Context Switching What is CPU Scheduling What is Producer-Consumer Problem What is Semaphore in Operating System Monitors in Operating System What is Deadlock What is Paging and Segmentation What is Demand Paging What is Virtual Memory What is a Long term Scheduler What is Page Replacement in Operating System What is BSR Mode What is Convoy Effect What is Job Sequencing in Operating System Why is it critical for the Scheduler to distinguish between I/O-bound and CPU-bound programs Why is there a Need for an Operating System


Process Management Process State Scheduling Algorithm FCFS (First-come-First-Serve) Scheduling SJF (Shortest Job First) Scheduling Round-Robin CPU Scheduling Priority Based Scheduling HRRN (Highest Response Ratio Next) Scheduling Process Synchronization Lock Variable Mechanism TSL Mechanism Turn Variable Mechanism Interested Variable Mechanism Deadlock Avoidance Strategies for Handling Deadlock Deadlock Prevention Deadlock Detection and Recovery Resource Allocation Graph Banker’s Algorithm in Operating System Fixed Partitioning and Dynamic Partitioning Partitioning Algorithms Disk Scheduling Algorithms FCFS and SSTF Disk Scheduling Algorithm SCAN and C-SCAN Disk Scheduling Algorithm Look and C-Look Disk Scheduling Algorithm File in Operating System File Access Methods in Operating System File Allocation Method Directory Structure in Operating System N-Step-SCAN Disk Scheduling Feedback Queue in Operating System Contiguous Memory Allocation in Operating System Real-time Operating System Starvation in Operating System Thrashing in Operating System 5 Goals of Operating System Advantages of Operating System Advantages of UNIX Operating System Bit Vector in Operating System Booting Process in Operating System Can a Computer Run Without the Operating System Dining Philosophers Problem in Operating System Free Space Management in Operating System Inter Process Communication in Operating System Swapping in Operating System Memory Management in Operating System Multiprogramming Operating System Multitasking Operating Systems Multi-user Operating Systems Non-Contiguous Memory Allocation in Operating System Page Table in Operating System Process Scheduling in Operating System Segmentation in Operating System Simple Structure in Operating System Single-User Operating System Two Phase Locking Protocol Advantages and Disadvantages of Operating System Arithmetic operations in binary number system Assemblers in the operating system Bakery Algorithm in Operating System Benefits of Ubuntu Operating System CPU Scheduling Criteria in Operating System Critical Section in Operating System Device Management in Operating System Linux Scheduler in Operating System Long Term Scheduler in Operating System Mutex in Operating System Operating System Failure Peterson's Solution in Operating System Privileged and Non-Privileged Instructions in Operating System Swapping in Operating System Types of Operating System Zombie and Orphan Process in Operating System 62-bit operating system Advantages and Disadvantages of Batch Operating System Boot Block and Bad Block in Operating System Contiguous and Non - Contiguous Memory Allocation in Operating System Control and Distribution Systems in Operations Management Control Program in Operating System Convergent Technologies in Operating System Convoy Effect in Operating System Copy Operating Systems to SSD Core Components of Operating System Core of UNIX Operating System Correct Value to return to the Operating System Corrupted Operating System Cos is Smart Card Operating System Cosmos Operating Systems Examples Generation of Operating System Hardware Solution in Operating System Process Control Block in Operating System Function of Kernel in Operating System Operating System Layers History of Debian Operating Systems Branches and Architecture of Debian Operating Systems Features and Packages of Debian Operating Systems Installation of Operating System on a New PC Organizational Structure and Development in Debian Operating Systems User Interface in Operating System Types Of Memory in OS Operating System in Nokia Multilevel Paging in OS Memory Mapping Techniques in OS Memory Layout of a Process in Operating System Hardware Protection in Operating System Functions of File Management in Operating System Core of Linux Operating System Cache Replacement Policy in Operating System Cache Line and Cache Size in Operating System What is Memory Mapping? Difference Between Network Operating System And Distributed Operating System What is the difference between a Hard link and a Soft Link? Principles of Preemptive Scheduling Process Scheduling Algorithms What is NOS? What is the Interrupt I/O Process? What is Time Sharing OS What is process termination? What is Time-Sharing Operating System What is Batch File File system manipulation What is Message-passing Technique in OS Logical Clock in Distributed System

What is Job Sequencing in Operating System?

Job sequencing is one of the crucial methods that is followed in the scheduling of the tasks in the operating system. An operating system is a program that manages the computer's resources, primarily allocating these tasks, among other programs. Some of the examples of Operating systems are Windows, macOS, Linux, etc.

The operating system is a crucial element for the computer system which provides many functionalities such as Security, Managing files and Jobs/tasks, I/O management, Communication, Accounting, Resource allocations, and many more.

Among the above-discussed functionalities, the most important one is Job sequencing; this is used to allocate sequences to the tasks that are to be performed whenever they are needed by the system or the machine. The tasks are arranged in an order where they are followed by one after another. These tasks contain crucial information to finish an objective assigned by the computer. In Job sequencing, each task is created to fulfil a certain objective, calculations, etc. These are called by the computer whenever they are necessary.

The main objective of Job sequencing is to arrange the jobs based on the outcomes they can produce and the time they have. This is called Job sequencing with deadlines. Where the tasks have a given time slot, the tasks must only complete their execution in the given time slot only. There are two types of approaches we use to execute the job sequencing, the Greedy method approach and the other is Dynamic programming approach. Each approach has its own advantages and disadvantages.

What is Job Sequencing

The Greedy approach works in such a way that the jobs are arranged in the order of their deadlines or profits. There are two ways. The first way is based on their deadlines, the order in which these are arranged based on their deadlines are in ascending order, or the order in which the deadlines are less. Because it will be easy to solve these in the least time required, another way is the dynamic programming way; the jobs are divided into subproblems and are calculated individually and then combined together to produce the final output.

These approaches depend on the requirement and the jobs with the deadlines; it is the user’s choice to choose from the approaches. Now let us understand the job sequencing with an example.

Job number J1 J2 J3 J4 J5
Deadline 4 1 5 3 2
Profit 20 30 10 5 40

This is given job schedule and we have to choose an approach to solve the given problem, which gives the best profits in less time. We will choose the approach where we consider the deadlines first. This helps us to complete the tasks with lesser time.

Job number J2 J5 J4 J1 J3
Deadline 1 2 3 4 5
Profit 30 40 5 20 10

Now we have arranged this into the order of the deadlines and the jobs are associated with some profits which they get when they complete the task within the deadline.

We have to calculate the total profit keeping in view that the deadlines play the important part in the chosen approach. The next step is to arrange these in the order which they will be first executed considering the deadlines.

  1. The Job 2 is first scheduled and then it will be completed in time 1.
  2. Job 5 is second in the list so; Job 5 is executed next after Job 2 which will be completed at time 3. Including the deadline which is 2.
  3. Job 4 is third which is scheduled at time 3 and is completed at time 4.
  4. Job 1 is fourth which will be scheduled at time 4 and will be completed at time 8.
  5. Job 3 is the last among all and is scheduled at time 8, after the execution of job 1. Job 3 is completed at time13.

We have arranged the jobs on their deadlines, now we have to calculate the profit from these jobs. The profits are also calculated based on the chosen approach in our case the priority is the early deadlines, we will choose the profits based on those jobs.

The profit will be: 30+40+5+20+10 = 105.

Now let us solve the problem in another approach from the greedy method, where we first consider the profits, we get.

Job number J1 J2 J3 J4 J5
Deadline 4 1 5 3 2
Profit 20 30 10 5 40

The given problem, now arrange the jobs based on their profits in decreasing order.

Job number J5 J2 J1 J3 J4
Deadline 2 1 4 5 3
Profit 40 30 30 10 5

Now that we have arranged them in decreasing order, calculate the jobs in the order the are scheduled.

  1. Job 5 will be scheduled at time 0 and is completed in time 2.
  2. Job 2 is scheduled at time 2 and is completed at time 4.
  3. Job 1 is scheduled at time 4, and is completed at time 8.
  4. Job 3 is scheduled at time 8 and is completed at time 13.
  5. Job 4 is scheduled at time 16 and will be completed at time 16.

We have also got the completion time of the above tasks and none of the tasks are completed after the allocated time frame. Calculate the profits.

Profits: 40 + 30 + 20 + 10 + 5 = 105

This way the Job sequencing is calculated and is completed based on the various approaches which are best suitable depending on the situation.