Operating System Chapter 4 Homework

Multiple choice

1. Which of the following is correct about the relationship between interruption and process switching ()?

A. Interruption is a sufficient but not necessary condition for process switching
B. Interruption is a necessary but not sufficient condition for process switching
C. Interruption is a condition for process switching
D. There is no direct connection between the two

A process executes a system call command to send a message to another process. The execution of the command will enter the operating system through an interrupt. The operating system may return to the original calling process after processing the message sending. At this time, the interrupt did not cause the process to switch; It is also possible to select a new process, and the interruption caused the process to switch.

2. Which of the following statements is correct about whether the user program can execute the "close interrupt" and "mask interrupt" instructions ()?

A. The user can only execute the "off interrupt" instruction
B. The user cannot execute the "close interrupt" and "mask interrupt" instructions
C. The user can only execute the "mask interrupt" instruction
D. The user can execute both the "off interrupt" and "mask interrupt" instructions

Because the interruption is controlled and managed by the system, the user does not perceive the interruption; otherwise it will cause system chaos (no unified manager)

3. Among the following process scheduling algorithms, what is the comprehensive consideration of process waiting time and execution time ()?

A. First come first serve scheduling algorithm
B. Short process priority scheduling algorithm
C. High response ratio priority scheduling algorithm
D. Time slice round-robin scheduling algorithm

In the high response ratio priority scheduling algorithm, if the process waiting time is the same, the execution time is shorter, and the process execution time is the same and the waiting time is shorter, so the process waiting time and execution time are comprehensively considered.

4. Regarding real-time scheduling, which of the following statements is incorrect ()?

A. Real-time scheduling should have a fast switching mechanism
. B. The most important consideration for
real-time scheduling is the deadline . C. When real-time scheduling is implemented, some running information of the task needs to be recorded
D. Real-time scheduling must be able to complete its time-required goals

The classification
of real -time scheduling algorithms is based on the nature of real-time tasks (that is, the strength of time constraints)

  • Hard real-time scheduling: Must meet the task deadline requirements, and miss the consequences.
  • Soft real-time scheduling algorithm: Expect to meet task deadline requirements, and miss to
    tolerate.

Multiple choice

5. (Multiple choice) Are the following operations that will cause low-level scheduling ()?

A. The end of a process
B. Time slice for a process to run
C. A process is blocked due to requesting I/O
D. A process enters a static blocking state from blocking

Here is the quote

Subjective questions

Suppose there are 4 jobs in the batch processing system. The time and running time when they enter the system are as follows:
Insert picture description here
Please find the execution order of each job in the following algorithms, as well as the average turnaround time and weighted turnaround time:

FCFS, SJF, HRN, SRT algorithm.

Knowledge supplement:
FCFS (First Come First Served): First Come First Served
SJF (Shortest Job First): Short job/process priority
HRN (Highest Response Ratio Precedence): Highest Response Ratio
SRT (Shortest Remaining Time): Shortest remaining
time = Completion time-Reach time
Weighted turnaround time = Turnaround time / Running time
Response ratio R = (Response time + Running time) / Running time

answer:Here is the quote

Guess you like

Origin blog.csdn.net/Jessieeeeeee/article/details/109018176