SJF Scheduling Program in C

Problem Description: Write an SJF scheduling program in C to determine the average waiting time and average turnaround time given n processes and their burst times. SJF Scheduling Algorithm in C: The CPU scheduling algorithm Shortest Job First (SJF), allocates the CPU to the processes according to the process with smallest execution time. SJF uses … Read more

advertisement

Round Robin Scheduling Program in C

Problem Description: Write a C Program that implements the Round Robin Scheduling algorithm and determines the average waiting time and turnaround time. What is Round Robin Scheduling in C? Round Robin Scheduling is a CPU scheduling algorithm in which each process is executed for a fixed time slot. Since the resources are snatched after the … Read more

advertisement

FCFS Scheduling Program in C

Problem Description: Write an FCFS Scheduling Program in C to determine the average waiting time and average turnaround time given n processes and their burst times. FCFS Scheduling Algorithm: The CPU scheduling algorithm First Come, First Served (FCFS), also known as First In, First Out (FIFO), allocates the CPU to the processes in the order … Read more

advertisement

Priority Scheduling Program in C

Priority Scheduling is a CPU scheduling algorithm in which the CPU performs the task having higher priority at first. If two processes have the same priority then scheduling is done on FCFS basis (first come first serve). Priority Scheduling is of two types : Preemptive and Non-Preemptive. Preemptive: In this case, resources can be voluntarily … Read more

advertisement

C Program to Implement Trie

This is a C Program to implement Trie. A Trie is a very useful (but often ignored) data structure, which can be used to solve a large number of Strings related problems quickly. Here is source code of the C Program to Implement Trie. The C program is successfully compiled and run on a Linux … Read more

advertisement

C Program to Implement Vector

This is a C Program to implement Vectors. An array (vector) is a common-place data type, used to hold and describe a collection of elements. These elements can be fetched at runtime by one or more indices (identifying keys). A distinguishing feature of an array compared to a list is that they allow for constant-time … Read more

advertisement

C Program to Solve the Magic Squares Puzzle without Recursion

This is a C Program to solve the magic squares puzzle without using recursion. Problem Description The following C program, using iteration, finds the magic square for a given odd sized number. Problem Solution A magic square is an arrangement of numbers from 1 to n^2 in an [n x n] matrix, with each number … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.