Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. 2. 3. 4. Question is the images above, follow the order of 1-2-3-4. Using the queue to solve this problem, not Linked list. The

1. image text in transcribed2. image text in transcribed

3. image text in transcribed4. image text in transcribed

Question is the images above, follow the order of 1-2-3-4. Using the queue to solve this problem, not Linked list. The code needs to be written in C++. Input file is not given, so use the sample from the 1st image. The sample shows only one process, need to include two processes (two process ID). It is a very hard assignment for me. Please help and reply ASAP. I will upvote. Thank you.

1. OBJECTIVE This assignment will introduce you to core scheduling. 2. SPECIFICATIONS You are to simulate the execution of processes by a tablet with a large memory, one display, a multi-core processing unit, and one solid-state drive. Each process will be described by its start time and its process id followed by a sequence of resource requests. These resources requests will include core requests (CORE), SSD requests (SSD) and user interactions (TTY). Your input will be a sequence of pairs as in: NCORES 2 // number of cores START 12000 // new process PID 23 // process ID CORE 100 // request CORE for 100 ms TTY 5000 // 5000 ms user interaction CORE 80 // request CORE for 80 ms SSD 1 // request SSD for 1 ms CORE 30 // request CORE for 30 ms SSD 1 // request SSD for 1 ms CORE 20 // request CORE for 20 ms START 12040 // new process END // end of data All times will be expressed in milliseconds. All process start times will be monotonically increasing. The last line of input will contain an END. Processor Management: Your program should have two ready queues, namely: 1. A interactive queue that contains all processes have just completed a user interaction, 2. A non-interactive queue that contains all other processes waiting for a core. Each time your program answers process core requests, it should give priority to processes in the interactive queue and only allocate cores to processes from the non-interactive queue when the interactive queue is empty. Both ready queues should be FIFO queues and keep all processes ordered according to their queue arrival time in strict first-come first-served order. SSD Management: SSD access times are much shorter than disk access times with write requests taking less than a millisecond and read requests taking much less than that. As a result, write request timings will be rounded up to one millisecond and read requests timing will be rounded down to zero. SSD scheduling will be strictly first-come first-served. To simplify your life, we will also assume that: 1. There is no contention for main memory, 2. Context switch times can be neglected, and 3. User think times and other delays, like overlapping windows, are included in the TTY times. In addition, you can assume that all inputs will always be correct. Program organization: Your program should read its input file name though input redirection as in: ./a.out

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions