Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

understanding operating system 7th edition by Ann Mclver McHoes Ida M. Flynn. Exercise 6- Given that main memory is composed of only three page frames

understanding operating system 7th edition by Ann Mclver McHoes Ida M. Flynn.

Exercise 6-

Given that main memory is composed of only three page frames for public use and that a program requests in the following order:

a, c, b, d, a, c, e, a, c, b, d, e

A. Using the FIFO page algorithm, indicate the movement of the pages into and out of the available page frames (called a page trace anaysis) indicating each page fault with an asterisk (*). then compute the failure and sucess ratios.

b. increase the size of the memory so it contains four pages frames for public use. using the same page request as above and FIFO, do another page trace analysis and compute the failure and sucess rations.

c. what general statement can you make from the example? explain your answer.

Exercise 7.

given that the main memory is composed of thre page frames for public use and that a program requests pages in the followin order:

a, b, a, b, f, d, f, c, g, f, g, b, d, e

a. Using the FIFO page removal algorithm, perform a page trace analysis and indicate page faults with asterisk (*). then compute the failure and sucess ratios.

b. Using the LRU page removal algorithm, perform a page trace analysis and compute the failure and sucess ratios.

c. What conclusiondo u draw from this comparison of FIFO and LRU performance? could you make general statement from this example? Expalin why or why not.

INT 1700 Understanding Operating Systems

Supplemental Lab Assignment 1

Necessary Background Information Read This First!

Mr. Bugg

There are three topics that this lab is attempting to cover:

Filters these are like command utilities that have specific purposes, such as sorting or finding strings of information. Since they function like a free standing mini-program, then data has to be brought into the filter and results have to be outputted from the filter. You will see the use of the following items; redirection and piping.

Redirection: this is when you take one thing and direct it to a place that is not the usual default location for things to go. For example, in a TYPE command, you might enter at a prompt C:\TYPE FileA.txt. You would expect the text file to display to the screen, which is the default. Using redirection, I can alter that and as an example, ask it to take the contents of that file and print it. I can do it this way: C:\TYPE FileA.txt > PRN. The command given will redirect the output to the device PRN with is the system name for any printer attached to the computer. Redirection can go either direction using either the < or the > symbols. As an example, I could have a command as follows: C:\SORT < FileA.txt > SortFile.txt. In the example FileA.txt is being redirected to the SORT filter and the output of the SORT is being redirected to a new file called SortFile.txt.

Piping: this is when you are joining multiple functions together the symbol for piping on the keyboard is the shift of the backslash ( \ ). It looks like two stacked short lines. Unfortunately in a word processor such as the one I am using to write this the piping symbol comes out as one long solid line ( | ), which is what you will see in this handout. As an example of piping, lets say that first you want to FIND all the records in a file that contain a particular key word, and then you would PIPE the results to the SORT filter to sort the particular records it found. You will see examples of this used within this assignment.

Additional Note:

When working from the command line, please note that help is always available. You have only to type HELP to get a list of all the things you can get help for. For example, should you need help with the sort command, or any other, you can just type in HELP SORT at the command prompt and see screens of information to help you figure out what is and is not allowed when using that particular command. Do not be afraid to try it!

When working on this lab:

Please create the files required on your computer. You can do this from within the virtual machine. You will want a copy of this assignment nearby, so you can write down what you see in the blanks provided. Then, when everything is completed, type the answers in the original handout and submit that back to me via the assignment item provided in blackboard.

INT 1700 Understanding Operating Systems

Supplemental Lab Assignment 1

Mr. Bugg - Page 1

This lab involves a little preparation in the form of creating a file to use. You will use the Notepad to create the file. The name of the file, which you will create on your C: drive is:

ph.txt

Each line of the file contains six items of data: Last name, first name, area code, telephone number, a key word that identifies a category and a short description. The key words are cust for customer, cons for consultant, and vend for vendor.

It is important that the data be entered in exact column locations for processing later on. The first is shown with periods marking the number of spaces between items. Press the space bar once for each period.

Jones.....Michele...(747).429-6360..cons.chemist

Smith John (747) 926-2945 vend furniture

White Alice (747) 425-7692 cust Accountant

Green Fred (541) 926-4921 cust math teach

Black John (747) 426-3385 cons mech eng pkg

Smith Ed (541) 835-8747 vend caterer

Jones Alison (747) 429-5584 cons Chem engineer

Hill Dave (747) 463-2000 vend IBM sales

Jones James (747) 636-3541 cust architect

Black Alice (747) 426-7145 cust Elec eng

1 11 21 27 37 42

Note: the numbers above indicate starting location for

each column of data.

At a C:> prompt, type in the command type to display the file and make sure it is there.

Now we will use this file with some of the filter commands.

1. At the prompt, enter find "Wh" ph.txt

Record what you see: ___________________________________________________

2. Enter sort < ph.txt

What is displayed: ______________________________________________________

3. Enter sort /r < ph.txt

What is displayed? ______________________________________________________

INT 1700 Understanding Operating Systems

Supplemental Lab Assignment 1

Mr. Bugg - page 2

4. Suppose you want to arrange the list by key word. The keyword begins in col. 37.

Enter sort /+37 < ph.txt

What is displayed? ______________________________________________________

Enter the same command, but this time redirect the output to a disk file called sortph.txt.

5. The find command is used to locate particular strings within a file.

Enter find "cons" ph.txt to find all the consultants.

What displays? _________________________________________________________

6. The find command can work on more than one file. To illustrate this:

Make a copy of ph.txt on your disk called ph1.txt using the copy command.

Enter find "cons" ph.txt ph1.txt

What displays? _________________________________________________________

7. The find command does not require full words - it uses strings.

Enter find "eng" ph.txt

What displays? _________________________________________________________

8. Enter find /i "chem" ph.txt

What displays? _________________________________________________________

What do you think the function of the /i parameter is? __________________________

(Hint: if you cannot guess, try the command again without the /i parameter)

9. Enter find /v "(747" ph.txt

What displays? _________________________________________________________

What is the apparent function of the /v paramter? ______________________________

10. Enter find /n "Smith" ph.txt

What displays? _________________________________________________________

What is the function of the /n parameter? _____________________________________

INT 1700 Understanding Operating Systems

Supplemental Lab Assignment 1

Mr. Bugg - page 3

11. Enter find /v /n "(7" ph.txt

What displays? _________________________________________________________

Using redirection with filters:

12. The find command can have its output redirected to the printer.

Enter find "vend" ph.txt > vend.txt

What is displayed when you enter type vend.txt ? ________________________________________________________

13. You can create a file by redirecting output to it. You can also add redirected output to an

existing file by using the >> symbol. Try this.

Enter sort /r ph.txt > sort.txt

Display the file sort.txt to see what is in it.

Enter find "vend" ph.txt >> sort.txt

Display the file again to see what has changed.

What is displayed? ______________________________________________________

To pipe a command means to connect the output of one command to the input of another command much as water flows through a pipe. A common filter command that is used to halt the display is more.

Try this: At the C:\> prompt, enter dir | more

What do you see? ___________________________________________________

15. Enter find "cust" ph.txt | find "(7"

What is displayed? _____________________________________________________

16. Enter find "cons" ph.txt | sort

What is displayed? _____________________________________________________

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

More Books

Students also viewed these Databases questions

Question

1. What does this mean for me?

Answered: 1 week ago

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago