C program to implement SJF algorithm.

Write a C program to implement SJF algorithm.Shortest Job First(SJF) is the CPU scheduling algorithm. In SJF, if the CPU is available it allocates the process which has smallest burst time, if the two process are same burst time it uses FCFS algorithm.Read more about C Programming Language . and read the C Programming Language …

Advertisements

C Program to implement FCFS algorithm.

Write a C Program to implement FCFS algorithm.First Come First Served(FCFS) algorithm is the CPU scheduling algorithm. In FCFS process is served when they are arrived in order, i.e First In First Out(FIFO). FCFS is the simple scheduling algorithm, but it takes typically long/varying waiting time.Read more about C Programming Language . and read the …

C Program to lock file using semaphores.

Write a C Program to lock file using semaphores.Using semaphores, We can control access to files, shared memory and other things. The basic functionality of a semaphore is that you can either set it, check it, or wait until it clears then set it (“test-n-set”). In C semaphores functions defined in the sys/sem library. Read …

C Program to solve the producer consumer problem

Write a C Program to solve the producer consumer problem with two processes using semaphores.Producer-consumer problem is the standard example of multiple process synchronization problem. The problem occurs when concurrently producer and consumer tries to fill the data and pick the data when it is full or empty. producer consumer problem is also known as …

C program to implement Round Robin CPU scheduling algorithm.

Write a C program to implement Round Robin CPU scheduling algorithm.In Round Robin scheduling algorithm, a small time slice or quantum is defined, all the tasks are kept in queue. The CPU scheduler picks the first task from the queue ,sets a timer to interrupt after one quantum, and dispatches the process. If the process …

C Program to check whether two strings are anagrams of each other.

C Strings: Write a c program to check whether two strings are anagrams of each other. Two strings are said to be anagrams, if the characters in the strings are same in terms of numbers and value ,only arrangement or order of characters are may be different. Example: “dfghjkl” and “lkjghdf” are anagrams of each …

C Program to delete vowels in a string.

C Strings:Write a C Program to delete a vowel in a given string.In this program, We use the pointers to position the characters.check_vowel() function checks the character is vowel or not, if the character is vowel it returns true else false.Example output:Given string: Check vowelOutput is: Chck vwlRead more about C Programming Language . and …

C Program to delete a file.

Write a C Program to delete a file.To delete a file in c, We use the remove macro, which is defined in stdio.h. remove macro takes filename with extension as its argument and deletes the file, if it is in the directory and returns the zero, if deleted successfully.Note that deleted file does not goes …

C Program to demonstrate strspn function.

Write a C Program to demonstrate strspn function.The strspn() function returns the index of the first character in string1 that doesn’t match any character in string2. If all the characters of the string2 matched with the string1, strspn returns the length of the string1. Read more about C Programming Language . /************************************************************ You can use …

C Program to implement hashing.

Write a C Program to implement hashing.Hashing is the function or routine used to assign the key values to the each entity in the database. Using hashing, We can easily access or search the values from database.In this program we used the open addressing hashing, also called as closed hashing.Read more about C Programming Language. …