文档库 最新最全的文档下载
当前位置:文档库 › homework_6

homework_6

homework_6
homework_6

Exercise 3

Question 2. Virtual Memory

In this section, you will use a program demonstrating how virtual memory is used.

a.How does virtual memory work using a page table?

Every address is "translated" into a physical memory location by means of a page table in virtual mode. The page table gives the real address in RAM where the page is located for each page in the virtual address space,.

b. What is the primary purpose of virtual memory?

To increase program's flexibility.

c. List three advantages of using virtual memory when executing a program.

Execute the Page Replacement Simulation program.

Click on Paging.exe to run the application. Refer to Appendix A. Running a Visual Basic File if Paging.exe does not run.

Notice the top of the program window indicates the number of request and total page faults. The table on the left represents RAM and the one on the right represents the hard disk. The order of requests is set at default. You can also enter your own order of requests. To change the speed of the simulation, you can use the speed adjuster at the bottom-left of the program window. Each time you click on Stop or Pause, the simulation ends after one complete memory access.

Start the program using the default queue of requests.

d. Describe what is happening for the first seven requests step-by-step for the default order of requests.

e. When does a page fault occur, and how does the kernel handle a page fault?

f. Enter a sequence of eight requests in place of the default order of requests in the program that would cause four page faults.

g. In what case is it undesirable(不可取) to use virtual memory?

h. Given a total paging file size of 267MB, and a RAM of size 256MB. Your applications are currently taking up 500MB of memory. How would you run an application that consumes 100 MB of memory?

Question 3. Troubleshooting

Below are various problem scenarios. Select the most likely cause(s) for the problem from the Causes list.

Causes

A. Component not plugged in

B. Application software error

C. Operating system error

D. Low RAM

E. Slow processor

F. CMOS battery failure

G. Motherboard failure

H. Hard disk failure

I. BIOS ROM failure

J. Appropriate component driver not installed properly

Problems

a. Program not responding

Causes:

b. Screen froze after successfully booting

Causes:

c. Programs running slowly

Causes:

d. Peripheral device not working (mouse, keyboard, printer)

Causes:

e. All necessary computer system components are plugged in, but the system does not boot

Causes:

f. The computer is being booted, and an error message indicates that the hard drive cannot be found.

Causes:

g. If low memory is a cause of the system running slowly, what can you do as a user to speed up the system?

Question 4. File Directories

In this question, you are given a zip file, which contains some folders and files. You will unzip the given file, manipulate the files and folders, zip the resulting file structure and submit it, along with answers to the questions in this exercise.

First, download and save SSD2 File System.zip onto your Desktop. Then unzip the file.

a. What is the absolute path of the file named test.txt in SSD2 File System folder?

b. How many parent directories does test.txt have?

c. Create a shortcut of test.txt and place it in the same directory. Rename the shortcut “MyTest”. Copy and paste a screenshot showing the file

property of MyTest.

d. Examine the file property of test.txt. Explain why the values for Size and Size on disk are different. What is the term for the difference between the two sizes?

e. Opening MyTest or test.txt both result in the display of the file. Explain the difference between MyTest and test.txt.

f. What are the different file extensions in folder Temp1?

g. List the most recently modified item in SSD2 File System folder.

Unit 3 and Unit 4 Review Materials

14. Virtual Memory

a.What three advantages does the course mention, regarding virtual

memory?

b.What is one disadvantage of virtual memory?

c.What data is contained in a swap file and where does the swap file

reside?

d.How does virtual memory work using a page table?

e.Given pages 2, 3, and 5 are already in main memory (the memory is

not yet full). What happens when a request for page 6 is made? What role does the kernel play in processing this request?

相关文档