Question

4. A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines t...

4.

A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines that run the individual programs. Each virtual machine is given access to the CPU for a certain time (the time slice), during which it will continue to execute its program. The next time slice then goes to another virtual machine, and so on.

a.

Assume that each time slice is one millisecond (1/1000 of a second) long. The computer on which the operating system runs therefore has 1000 time slices available. If the OS itself uses 100 of these (you may assume that these are spread at regular intervals over each second) it can make 900 such time slices available for virtual machines each second. If the computer needs to run 10 programs that each require a time slice at least 20 times per second, and one program (the user interface) that requires a time slice at least once every 10 milliseconds, what is the maximum number of time slices left for other programs? [5 marks]

b.

Given the scenario above, is it theoretically possible for a program that requires 90 time slices to complete in 100 ms or less? Explain. Hint: You will need to consider when exactly the programs under (a) above may need to occupy available time slices. [5 marks]

c.

If the computer had a second CPU, each of the CPUs could process a time slice in parallel and therefore there would be another 1000 time slices per second. Suppose the operating system could make another 900 of these extra time slices available. Would this make it possible for a program that requires 90 time slices to complete in less than 80 ms? Explain. [5 marks]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

answer:

a)

1 second has 1000 milliseconds in it.

so this means we have 1000 time slices available

out of these 100 are occupied by the operating system

and 900 are available for application programs

To make a sure the maximum number of time slices remaining we must a lot the least amount of time slices to the given programs

for 10 programs at least 20 times per second will require= 20*10= 200-time slices at least

so now, we have 900-200= 700-time slices available

Now we need a time slice at least once every 10 milliseconds and

there are 100 10 milliseconds in a 1-second time slot.

This means we have to assign 100 more time slice

Now the remaining time slices= 700-100= 600 time slices

b)

Yes, since there are 100 10 ms in a second which means 100 time slices are required here.

c)

No, it won't be possible in this case.

Please give it a thumbs up if this helped you, also provide your valuable feedback.

Please give it a thumbs up if this helped you, also provide your valuable feedback.

Add a comment
Know the answer?
Add Answer to:
4. A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 4. A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines that run the individual programs. Each virtual machine is given access to th...

    4. A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines that run the individual programs. Each virtual machine is given access to the CPU for a certain time (the time slice), during which it will continue to execute its program. The next time slice then goes to another virtual machine, and so on. Assume that each time slice is one millisecond (1/1000 of a second) long and the computer on...

  • Q.6. Consider a preemptive operating system where processes have priorities and a running process gets preempted...

    Q.6. Consider a preemptive operating system where processes have priorities and a running process gets preempted (i.e., forced to leave the CPU) as soon as a higher priority process is ready to run. The life cycle of a process, other than the very first process, begins with a "spawn" by another process and ends with either a regular "exit" by the process or a "terminate (process_id)" command by another process of equal or higher priority. COMP 346 – Fall 2019...

  • Overview: In this lab, you will write a program called JobScheduler; it should take a single...

    Overview: In this lab, you will write a program called JobScheduler; it should take a single input file as a command-line argument. Each line in the input file has the following format: <job #> <priority> <arrival time (sec)> <duration (sec)> e.g. a file might contain: 1 3 10 100 5 2 20 50 8 4 5 100 (all values will be positive integers) These jobs might represent computer programs (or threads) that need to be run by the operating system....

  • Question III This question carries 20% of the marks for this assignment. Given the following mix...

    Question III This question carries 20% of the marks for this assignment. Given the following mix of tasks, task lengths and arrival times, compute the completion [5 marks and response time time from the arrival to the finish time) (5 marks for each task, along with the average response time for the FIFO. RR and SJF algorithms. Assume a time slice of 10 milliseconds and that all times are in milliseconds. You are kindly asked to provide the Gantt Chart...

  • Tokeniser in C++

    TokenisersBackgroundThe primary task of any language translator is to work out how the structure and meaning of an input in a given language so that an appropriate translation can be output in another language. If you think of this in terms of a natural language such as English. When you attempt to read a sentence you do not spend your time worrying about what characters there are, how much space is between the letters or where lines are broken. What...

  • Playing a video game on a computer can give different experiences based on the performance capabi...

    Playing a video game on a computer can give different experiences based on the performance capabilities of the computer’s hardware (typically processor and graphics card – among other things). Developers of a new game will typically have “recommended” specifications for the computer hardware that is required to run their games on a variety of graphics settings (the faster the hardware, the higher the graphics quality). You are being tasked to create a program that will tell a gamer what graphics...

  • pls answer all questions 1) A step-by-step solution to a problem is called a. hardware b....

    pls answer all questions 1) A step-by-step solution to a problem is called a. hardware b. an operating system c. a computer language d. an algorithm 2) separated the programming task from the computer operation tasks. a. Algorithms b. Data processors c. High-level programming languages d. Operating systems 3) is a 16-bit code that can represent symbols in languages other than English. a. ASCII b. Extended ASCII c. EBCDIC d. Unicode 4) When you want to download music to a...

  • A new version of the operating system is being planned for installation into your department’s production...

    A new version of the operating system is being planned for installation into your department’s production environment. What sort of testing would you recommend is done before your department goes live with the new version? Identify each type of testing and describe what is tested. Explain the rationale for performing each type of testing. [ your answer goes here ] Would the amount of testing and types of testing to be done be different if you were installing a security...

  • I need help with Task 1 at the end. most of this is background information. Willowbrook...

    I need help with Task 1 at the end. most of this is background information. Willowbrook School is a small private school that has retained your services as a systems analyst to assist in the development of a new information system for the school’s administrative needs. Background Willowbrook School is a small, private school in the Midwest United States. For the past 20 years, it has offered a curriculum for preschool through 6th grade. Five years ago it expanded to...

  • TRUE/FALSE QUESTIONS:  Foundations of Information Security and Assurance 1. There is a problem anticipating and testing for...

    TRUE/FALSE QUESTIONS:  Foundations of Information Security and Assurance 1. There is a problem anticipating and testing for all potential types of non-standard inputs that might be exploited by an attacker to subvert a program. 2. Without suitable synchronization of accesses it is possible that values may be corrupted, or changes lost, due to over-lapping access, use, and replacement of shared values. 3. The biggest change of the nature in Windows XP SP2 was to change all anonymous remote procedure call (RPC)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT