Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please CLEARLY type out solution and have clear explanation will give good feedb

ID: 3803098 • Letter: P

Question

Please CLEARLY type out solution and have clear explanation will give good feedback for correct solution thanks! 1. (Least load) You run a computer system with a changing set of scheduled jobs, each with a specified start time s and finish time f and a unique identifier ID. Given a time t, the system's load load is the number of scheduled jobs that will be running at time t: load (t) #ID job ID, s, f) is scheduled and s Sts You occasionally need to plan maintenance for the system. For this, you need to find a time where as few jobs as possible are running, that is, where the load is smallest. More precisely, You need to maintain a set S of jobs while supporting the following operations S.Insert(ID, s, f): adds a new job with start and end times s f. Returns an error if a job with identifier ID already exists in S. S.Delete (ID): deletes the job with identifier ID (or returns an error if no such job exists in S S.minLoadTime0: returns a time t E 0, 1) such that load(t) is as small as possible Note that load is defined with respect to the jobs in S the answer can vary as jobs are inserted and deleted. Also notice that t must lie in a fixed interval 0,1]. Design a data structure that supports each of these operations in O(log n) time. You may assume for simplicity that all the start and end times are distinct.

Explanation / Answer

#include<stdio.h>

void OS_Solaris_print()
{
        printf("Solaris - Sun Microsystems ");
}

void OS_Windows_print()
{
        printf("Windows - Microsoft ");

}
void OS_HP-UX_print()
{
        printf("HP-UX - Hewlett Packard ");
}

int main()
{
        int num;
        printf("Enter the number (1-3): ");
        scanf("%d",&num);
        switch(num) { case 1:
                        OS_Solaris_print();
                        break;
                case 2:
                        OS_Windows_print();
                        break;
                case 3:
                        OS_HP-UX_print();
                        break;
                default:
                        printf("Hmm! only 1-3 :-) ");
                        break;
        }

        return 0;
}