How to implement process control block (PCB) into a program that is a non preemptive scheduling program.
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
5 1/* Special enumerated data type for process state */ 2 typedef enum { 3 } process_state_t; 1. has a pre-defined total service time, and 2. does not use I/O and can never be in a blocked state, and 3. will eventually run to completion and does not encounter any errors (e.g. segmentation faults). Each process should be represented within your program as a process control block (PCB) instance defined as follows: 12 6 /* C data structure used as process control block. The scheduler 7 *should create one instance per running process system. 13 14 15 16 READY, RUNNING, EXIT 8 */ 9 typedef struct { 10 char process_name [11]; // A string that identifies the process 11 /* Times are measured in seconds. */ int entry Time; // The time process entered system int service Time; // The total CPU time required by the process int remaining Time; // Remaining service time until completion. process_state_t state; // current process state (e.g. READY). 17 18 pcb_t; 5 1/* Special enumerated data type for process state */ 2 typedef enum { 3 } process_state_t; 1. has a pre-defined total service time, and 2. does not use I/O and can never be in a blocked state, and 3. will eventually run to completion and does not encounter any errors (e.g. segmentation faults). Each process should be represented within your program as a process control block (PCB) instance defined as follows: 12 6 /* C data structure used as process control block. The scheduler 7 *should create one instance per running process system. 13 14 15 16 READY, RUNNING, EXIT 8 */ 9 typedef struct { 10 char process_name [11]; // A string that identifies the process 11 /* Times are measured in seconds. */ int entry Time; // The time process entered system int service Time; // The total CPU time required by the process int remaining Time; // Remaining service time until completion. process_state_t state; // current process state (e.g. READY). 17 18 pcb_t;
Expert Answer:
Answer rating: 100% (QA)
For a nonpreemptive scheduling program with a predefined total service time and without IO or errors you can implement a simple simulation using a PCB ... View the full answer
Related Book For
Computer Architecture Fundamentals And Principles Of Computer Design
ISBN: 9781032097336
2nd Edition
Authors: Joseph D. Dumas II
Posted Date:
Students also viewed these operating system questions
-
. A vertical pole that is 2 meters tall casts a shadow that is 1.5 meters long. Nearby, at the same time, another vertical pole casts a shadow that is 6.5 meters long. How tall is this pole? a. Make...
-
For the Dupit Corp. case study introduced in Section 11.4, the management science team was able to apply a variety of queueing models by making the following simplifying approximation. Except for the...
-
Why do joints tend to be evenly spaced rather than clustered?
-
Organic Growth Company is presently testing a number of new agricultural seeds that it has recently harvested. To stimulate interest, it has decided to grant to five of its largest customers the...
-
A table is assembled using three components, as shown in the accompanying product structure tree. The company that makes the table wants to ship 100 units at the beginning of day 4, 150 units at the...
-
For each of the following situations, calculate the population standard error of the mean \(\sigma \mathrm{X}^{-}\)and the \(z\)-statistic \((z)\), make a decision about the null hypothesis, and...
-
Lance H. and Wanda B. Dean are married and live at 431 Yucca Drive, Santa Fe, NM 87501. Lance works for the convention bureau of the local Chamber of Commerce, while Wanda is employed part-time as a...
-
3. May 9: Derby's engineering staff complete the train design and it is approved by officials from OM as well as the Transportation Safety Board. 4. August 1: Derby completes construction of the 10...
-
Discuss your evaluation of WINTER ENERGY BILL graph or chart you find particularly interesting, effective, misleading, or difficult to understand. In your discussion, focus on answering some of the...
-
Define and give examples of fellowship, autonomy, and competence face.
-
In what ways is using video advantageous in an online meeting?
-
Why is it useful to avoid multitasking in an online meeting?
-
In what ways can you become a better empathic listener? How does using continuer statements instead of terminator statements help you in that effort?
-
How can teams focus first and foremost on performance? What are the obstacles to focusing on team performance?
-
In a survey conducted among a random sample of students the following observations were made regarding their gender and learning environment preferences during the COVID-19 pandemic: 168 prefer...
-
If a test has high reliability. O the test measures what the authors of the test claim it measures O people who take the same test twice get approximately the same scores both times O scores on the...
-
You are on a team helping design the new Platinum V processor for AmDel Corporation. Consider the following design issues: a. Your design team is considering a superscalar versus superpipeline...
-
Fill in the blanks below with the most appropriate term or concept discussed in this chapter: A characteristic of a memory device that refers to the amount of information that can be stored in a...
-
Name and describe the three types of data transfers that can be used for USB-connected input/output devices. Give an example of where each would be appropriate and explain why.
-
You have two regions, A and B, of differently doped silicon, with the regions joined together to make a continuous silicon crystal. When the positive terminal of a battery is connected to region...
-
In Figure P32.33, what combinations of positive bias (input signals) A, B, C, D allow the light bulb to light up? Data from Figure P32.33 A B OR JOR AND D
-
Suppose a transistor consists of a very narrow \(p\)-type material sandwiched between two very wide regions of \(n\)-type material. (a) Is the charge on the \(p\)-type region positive or negative,...
Study smarter with the SolutionInn App