Device preemption problem in 20160402_ multi-channel program Environment

Source: Internet
Author: User

Original question:

In a single CPU processor, there are p1,p3,p5 three jobs, two IO devices Io1,io2, and can achieve preemptive multi-task parallel work in the multi-channel program environment, put the operation priority from high to low p5,p1,p3 three jobs, The order in which they use the device and the time they occupy the device are: P1:io2 (10ms) CPU (10ms) IO1 (30ms) CPU (10ms) p3:io1 (30ms) CPU (10ms) IO2 (30ms) CPU (10ms) P5:CPU ( 20ms) IO1 (30ms) CPU (10ms) IO2 (15ms) ignores other time losses and 3 jobs are invested to complete the case. What are the following options for IO2 device utilization?

A. 0.55

B. 0.26

C. 0.48

D. 0.5

E. 0.39

Answer:

E

Knowledge Points:

  Operating system

Confusion point: about whether I/O devices can be preempted or not

Preemptive multitasking refers to the operating system: You can interrupt the current task when needed, and then schedule tasks according to the priority of each task in the task queue.

Therefore, the use of equipment time for each job in the topic can be interrupted .

Solution:


Answer = 55/140 = 0.39

Device preemption problem in 20160402_ multi-channel program Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.