Question

In: Computer Science

1)Given that main memory is composed of only three page frames for public use and that...

1)Given that main memory is composed of only three page frames for public use and that a seven-page program (with pages a, b, c, d, e, f, g) that requests pages in the following order: a, b, c, b, d, a, e, f, b, e, d, f a)Using the FIFO page removal algorithm, indicate the movement of the pages into and out of the available page frames (called a page trace analysis) indicating each page fault with an asterisk (*). Then compute the failure ratio and success ratio. b)Using FIFO again, increase the size of memory so it contains four page frames for public use. Using the same page requests as above, do another page trace analysis and compute the failure and success ratios.

2)Given the following Segment Map Tables for two jobs:

SMT for Job 1

Segment Number

Memory Location

0

4096

1

6144

2

9216

3

2048

4

7168

SMT for Job 2

Segment Number

Memory Location

0

2048

1

6144

2

9216

a.   Which segments, if any, are shared between the two jobs?

b.   If the segment now located at 7168 is swapped out and later reloaded at 8192, and the segment now at 2048 is swapped out and reloaded at 1024, what would the new segment tables look like?

Solutions

Expert Solution

(1)

Number of page frames available = 3

Order of the page requests = a, b, c, b, d, a, e, f, b, e, d, f

Algorithm used: FIFO

Page Trace Analysis :

Page Request a b c b d a e f b e d f
Page Fault * * * * * * * * *
Page Frame 1 a a a a d d d f f f f f
Page Frame 2 b b b b a a a b b b b
Page Frame 3 c c c c e e e e d d

Note that the oldest page or First in page which needs to be swapped is shown in Bold.

The Order is a*, b*, c*, b, d*, a*, e*, f*, b*, e, d*, f

Failure Ratio = 9/12 = 0.75 or 75%

Success Ratio = 3/12 = 0.25 or 25%

(b)

Number of page frames available = 4

Order of the page requests = a, b, c, b, d, a, e, f, b, e, d, f

Algorithm used: FIFO

Page Trace Analysis :

Page Request a b c b d a e f b e d f
Page Fault * * * * * * *
Page Frame 1 a a a a a a e e e e e e
Page Frame 2 b b b b b b f f f f f
Page Frame 3 c c c c c c b b b b
Page Frame 4 d d d d d d d d

The Order is a*, b*, c*, b, d*, a, e*, f*, b*, e, d, f

Failure Ratio = 7/12 = 0.583 or 58.3%

Success Ratio = 5/12 = 0.416 or 41.6%

(2)

(a)

From the given Segment Map Tables for Job1 and Job2,

The following segments which are located at memory location 2048, 6144 and 9216 are shared by Job1 and Job2.

(b)

New SMT for Job1:

Segment Number Memory Location
0 4096
1 6144
2 9216
3 1024
4 8192

New SMT for Job 2:

Segment Number Memory Location
0 1024
1 6144
2 9216

Related Solutions

what are the three main stages of memory, as well as the main processes that occur...
what are the three main stages of memory, as well as the main processes that occur within each stage. There are a number of different types of memory. how are they define and what are examples of them. What types of retrieval exist? What factors/strategies might improve the odds of successful retrieval? How can memory go wrong? What research has been done that supports the fact that these memory errors exist?
Page Replacement Algorithms. Consider the following page reference stream and 3 page frames: 0 1 2...
Page Replacement Algorithms. Consider the following page reference stream and 3 page frames: 0 1 2 3 2 4 3 1 1 5 2 4 6 3 3 4 6 3 4 7. For the MIN, FIFO, and LRU algorithms, show the contents of the page frame after each reference, and then compute the total number of page faults, divided in to cold misses and other misses.
1. What are the three main types of Securities traded on public markets? Briefly describe each....
1. What are the three main types of Securities traded on public markets? Briefly describe each. 2. Briefly explain how CDO tranches work and why they are used. 3. Briefly explain going ‘short’ in market trading.
reference string 0123342453346256 If we allocate 3 page frames to the program, 1. Please draw a...
reference string 0123342453346256 If we allocate 3 page frames to the program, 1. Please draw a figure to show the LRU page allocation/replacement \. 2. How many page faults will be generated?
Explain how an operating system protects main memory in a computer system. Discuss three responsibilities that...
Explain how an operating system protects main memory in a computer system. Discuss three responsibilities that an operating system has for file management in a computer system. Clearly distinguish between interrupt and trap. Give examples to illustrate your answer. Describe time-sharing systems and give an example to illustrate your answer. Discuss the 4 categories in which work concerning information security and protection relating to Operating Systems are grouped.
Given the following TestDriver.java public class TestDriver {       public static void main(String args[]) {             Point point...
Given the following TestDriver.java public class TestDriver {       public static void main(String args[]) {             Point point = new Point(10, 5);       Circle circle = new Circle(10.5, 20, 19);       Cylinder cylinder = new Cylinder(12, 3.6, 20, 20);                     System.out.println("Point");       System.out.println(point.toString()) ;       System.out.println("Circle");       System.out.println(circle.toString());       System.out.println("Cylinder");       System.out.println(cylinder.toString());       } } You will get the following result once you execute the TestDriver.java (after compiling it) Point (10, 5) Circle Center = (20, 19); Radius = 10.5 Cylinder Center = (20, 20); Radius = 3.6; Height...
Given the following TestDriver.java public class TestDriver {       public static void main(String args[]) {             Point point...
Given the following TestDriver.java public class TestDriver {       public static void main(String args[]) {             Point point = new Point(10, 5);       Circle circle = new Circle(10.5, 20, 19);       Cylinder cylinder = new Cylinder(12, 3.6, 20, 20);                     System.out.println("Point");       System.out.println(point.toString()) ;       System.out.println("Circle");       System.out.println(circle.toString());       System.out.println("Cylinder");       System.out.println(cylinder.toString());       } } You will get the following result once you execute the TestDriver.java (after compiling it) Point (10, 5) Circle Center = (20, 19); Radius = 10.5 Cylinder Center = (20, 20); Radius = 3.6; Height...
a. Define “financial derivatives” in 1 or 2 sentences. b. What are the three main use...
a. Define “financial derivatives” in 1 or 2 sentences. b. What are the three main use cases for “financial derivatives”? c. In the world of buying/selling financial derivatives, what is the so-called “settlement-risk” and how can you avoid it when trading with unconditional forward transactions? (1-2 sentences)
public static void main(String[] args) {            //Part1: using three stacks           ...
public static void main(String[] args) {            //Part1: using three stacks            iQueue<Integer> main = new ourLinkedList<Integer>();                       for (int i = 0; i<10; i++) {                int num = -15 + (int) (Math.random() * ((15 - (-15)) + 1));            main.add(num);            }                       System.out.println("main: " +main);            iQueue<Integer> Q1 = new ourLinkedList<Integer>();           ...
Explain the three main “eras” in U.S. stadium funding: entrepreneurial, public infrastructure, and public-private partnership. Economically,...
Explain the three main “eras” in U.S. stadium funding: entrepreneurial, public infrastructure, and public-private partnership. Economically, why did we see a shift from one era to the next?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT