Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a full answer. Do not answer if you do not know it! Assignment 5 Consider a function scheduler that realises a scheduler of

image text in transcribed

image text in transcribed

image text in transcribed

Please write a full answer. Do not answer if you do not know it!

Assignment 5 Consider a function scheduler that realises a scheduler of a single core/single processor timesharing OS. This function will be called by the kernel in one of the following situations: A timer interrupt that signals the expiration of a time slice occurs. (In this case, the function scheduler is called by the corresponding interrupt handler of the kernel. The interrupt handler did already save the context of the interrupted process in the PCB1 of that process.) The current process did request an IO. Therefore, the process needs to be blocked until the I/O is completed. (In this case, the scheduler function is called after the correspond- ing I/O system call implementation has initiated the I/O. The kernel did already save the context of the process that has requested the I/O in the PCB of that process.) An VO device raised an interrupt to signal that its 10 has been completed. (In this case, the scheduler function is called after the kernel has serviced the I/O device. The kernel did already save the context of the process that has been interrupted in the PCB of that process. The PId of the process that requested the IO that has just been completed can then be found in the global variable ioCompleted2.) Fill out the empty branches of the following skeleton of the function scheduler. Take care to consider also the case that the ready queue is empty in case all processes are blocked because all of them are waiting. https://en.wikipedia.org/wiki/Process_control_block 'Note: this process is not necessarily at the head of the waiting queue: the waiting queue is rather unordered and not a queue with a strict ordering. Assignment 5 Consider a function scheduler that realises a scheduler of a single core/single processor timesharing OS. This function will be called by the kernel in one of the following situations: A timer interrupt that signals the expiration of a time slice occurs. (In this case, the function scheduler is called by the corresponding interrupt handler of the kernel. The interrupt handler did already save the context of the interrupted process in the PCB1 of that process.) The current process did request an IO. Therefore, the process needs to be blocked until the I/O is completed. (In this case, the scheduler function is called after the correspond- ing I/O system call implementation has initiated the I/O. The kernel did already save the context of the process that has requested the I/O in the PCB of that process.) An VO device raised an interrupt to signal that its 10 has been completed. (In this case, the scheduler function is called after the kernel has serviced the I/O device. The kernel did already save the context of the process that has been interrupted in the PCB of that process. The PId of the process that requested the IO that has just been completed can then be found in the global variable ioCompleted2.) Fill out the empty branches of the following skeleton of the function scheduler. Take care to consider also the case that the ready queue is empty in case all processes are blocked because all of them are waiting. https://en.wikipedia.org/wiki/Process_control_block 'Note: this process is not necessarily at the head of the waiting queue: the waiting queue is rather unordered and not a queue with a strict ordering

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

| What are the values that are most important to me?

Answered: 1 week ago