![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2020 19:01 Bryanguzman2004
Suppose you are given the following data structure, variables and several functions to manage the list of processes in a CPU scheduling algorithm.
struct list_item{
struct Proc_Ctrl_Block *PCB;
int cpu_burst; int io_burst;
struct list_item *next;
} struct list_item *head=NULL, *tail=NULL;
Suppose we have several functions that are already implemented to create new list items, associate them with PCBs which we don't consider here, add/insert a given item to the end of the list, which is accessed through global variables: head and tail. Now you are asked to implement the following two Get_... functions!
struct list_item *Get_next_item_FCFS( );
/* remove the first item from the beginning of the list, and returns its address. If there is no item, return NULL */
struct list_item *Get_next_item_SJF( );
/* remove the item that has the shortest cpu_burst time from the list, and returns its address. If there is no item, return NULL. Note that the list is not sorted! */
My code looks like this:
*Get_next_item_FCFS( ){
struct list_item *tmp;
UNSURE WHERE TO GO FROM HERE
*Get_next_item_SJF( ){
struct list_item *tmp, *prev,
*min_i, *prev_i;
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 00:00
What engine component is shown in the above figure?
Answers: 1
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
You know the right answer?
Suppose you are given the following data structure, variables and several functions to manage the li...
Questions
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/en.png)
English, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
English, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.07.2019 02:00