Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with any of those questions 1.) What is an advantage of a large time quantum? What is a disadvantage? 2.) What is the

Need help with any of those questions 1.) What is an advantage of a large time quantum? What is a disadvantage? 2.) What is the difference between a preemptive scheduler and a nonpreemptive scheduler? 3.) Suppose that an operating system has a round robin preemptive priority scheduler with a time quantum of 50 (and no scheduling overhead). Consider the following set of processes. (Assume that lower numbers denote lower priority and higher numbers denote higher priority). Process Arrival-Time Run-Time Priority 0 0 150 2 1 50 30 3 2 100 130 4 3 120 80 1 4 170 90 4 a) Create a time line illustrating the execution of these processes assuming that scheduling decisions are only made whenever a process terminates or a time quantum expires. b) Create a time line illustrating the execution of these processes assuming that scheduling decisions are only made whenever a process terminates, a time quantum expires, or a process becomes ready (that is, it arrives in the queue). 4.) For the following parts, use the following set of processes (all the processes have the same arrival time). Process Run-Time Priority 0 150 2 1 30 3 2 130 5 3 80 1 4 90 4 a) Using FCFS, what is the average wait time for the example process set? b) Using FCFS, what is the average turnaround time for the example process set? c) Using SJF, what is the average wait time for the example process set? d) Using SJF, what is the average turnaround time for the example process set? e) Using priority scheduling, what is the average wait time for the example process set? f) Using priority scheduling, what is the average turnaround time for the example process set? g) Using RR scheduling with a time quantum of 40 and no scheduling overhead, what is the average wait time for the example process set? h) Using RR scheduling with a time quantum of 40 and no scheduling overhead, what is the average turnaround time for the example process set? i) Using RR scheduling with a time quantum of 40 and 10 units of time for scheduling overhead (dispatching, context switching, etc.) what is the average wait time for the example process set? j) Using RR scheduling with a time quantum of 40 and 10 units of time for scheduling overhead (dispatching, context switching, etc.) what is the average turnaround time for the example process set? k) For each of FCFS, SJF, priority scheduling, and RR (with a time quantum of 40) scheduling policies, create a time line illustrating the execution of the processes in the example process set. 5. Explain two differences between virtual addresses and physical addresses. 6. In a base-and-bound virtual memory system, explain how if a process modifies an arbitrary location in its virtual memory space, the change is not reflected at the same address of other processes. 7. In a paged virtual memory system, explain how if a process modifies an arbitrary location in its virtual memory space, the change is not reflected at the same address of other processes. 8. How does a base-and-bound virtual memory system prevent a process from accessing physical memory that is not allocated to the process? 9. How does a paged virtual memory system prevent a process from accessing physical memory that is not allocated to the process? 10. In a paged virtual memory system, why does the page size have to be a power of two? 11. In a paged virtual memory system, can the computer's physical memory address space be larger than a process's virtual memory address space? Explain your answer. (Note: A computer's "physical memory address space" is the number of bits for the frame number plus the number of bits for the offset. A process's "virtual memory address space" is the number of bits for a page number plus the number of bits for the offset.) 12. In a paged virtual memory system, can a process's virtual memory address space be larger than the computer's physical memory address space? Explain your answer. 13. In a paged virtual memory system, explain how two processes can share physical memory. 14. Consider a virtual address space of 64 pages of 1,024 bytes each, mapped onto a physical memory of 32 page frames. a.) How many bits are there is a virtual address? b.) How many bits are there in a physical address? c.) How are the bits divided between page number, frame number, and offset? 15. Consider a virtual address space of 32 pages with a 4KB page size, mapped onto a physical memory of 16 page frames. a.) How many bits are there is a virtual address? b.) How many bits are there in a physical address? c.) How are the bits divided between page number, frame number, and offset? 16. A certain computer system implements a paged virtual memory system. Each process has a 16MB virtual memory space. The page size is 1024 bytes. The physical memory size for the system is 2MB. How many bits are in a virtual memory address? _______ How many bits are in a physical memory address? _______ What is the number of pages in a virtual address space? _______ What is the number of page frames in the system? _______ What is the maximum number of valid entries in a page table? _______ Draw an address translation diagram that would help someone visualize how addresses are translated in this system. Your diagram should show the sizes of virtual and physical addresses and how they are broken down into fields. It should show how a page table is used and what the dimensions of a page table are. 17. A computer system implements a paged virtual memory system. Assume a 16-bit virtual address space and a 24-bit physical address space. Assume that the first 6 bits of a virtual address index the page table and the rest of the bits are the page offset. A process has the following indexed page table. Index | Page Table Entry (PTE) 0 | 0x3800 1 | 0x3600 2 | 0x3200 3 | 0x1000 Each page table entry gives a hexadecimal page frame addresses. Translate the following two hexadecimal VM addresses into their corresponding hexadecimal physical address. Hint: Translate the VM address to binary first. Translate the binary VM address to a binary PM address. Translate the binary PM address into hexadecimal. VM Address 0x084B is _____________________ in Physical Memory VM Address 0x0C78 is _____________________ in Physical Memory 18. This problem is about what can be done when a process is larger than physical memory, that is, a process has more virtual pages than there are physical page frames. Assume that a process has four pages (numbered 0,1,2,3) in its virtual address space but the computer has only three physical page frames (numbered 0,1,2). The following diagrams show two possible sequences of referenced virtual page numbers by the running process. Write down in the empty slots below each page reference the virtual page that is loaded into each of the physical page frames just after the page reference (in other words, what does the process's page table look like just after each page reference?). Also, write down the total number of page hits and misses. Use the "Leased Recently Used" (LRU) page replacement policy in both cases, so you replace the contents of the page frame that was used the farthest back in time. Page Referenced: 0 1 2 3 0 1 2 3 Page Frame 0: Page Frame 1: Page Frame 2: # of hits = # of misses = Page Referenced: 0 1 0 1 2 3 2 3 Page Frame 0: Page Frame 1: Page Frame 2: # of hits = # of misses =

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions