answersLogoWhite

0


Best Answer

We are have a two dimensional array, A: array[0..199,0..199] of characters. The contents of the array are stored in memory in row-major order starting at memory address 200. (i.e. A[0,0] is at address 200, A[0,1] is at address 201, ... A[0,99] is at address 299, A[1,0] is at address 300, etc.). In our computer each page of memory consists of 400 bytes (1 character takes up 1 byte), and there are three physical frames available to a process, one of which is taken up by the code segment currently being run. Assuming only the code segment page is initially loaded into memory, and an LRU page replacement algorithm is being used, determines how many page faults are caused by the array accesses in the following two code segments: // Code Segment A: for(j=0;j<=199;++j) for(i=0;i<=199;++i) A[i,j] = 'x';

// Code Segment B: for(i=0;i<=199;++i) for(j=0;j<=199;++j) A[i,j] = 'x'; // Code Segment A: for(j=0;j<=199;++j) for(i=0;i<=199;++i) A[i,j] = 'x';


User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How the page faults are handled by an operating system?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Performing Arts

What is demand paging in operating system?

It is a memory managermnet concept where the operating system copies the dats from the disk space to the main memory (RAM) only when is trying to access the page. it is like we have to attempt the page again, when the page fault has occured while trying to get the data.


What is page stealing in operating system?

Some Operating Systems periodically look for pages that have not been recently referenced and add them to the Free page queue, after paging them out if they have been modified.


What is a page table base register?

Each process running on a processor needs its own logical address space. This can only be realized if each process has its own page table. To support this, a processor that supports virtual memory must have a page table base register that is accessible by the operating system. For operating system security, this register is only accessible when the processor is in system mode. The operating system maintains information about each process in a process control block. The page table base address for the process is stored there. The operating system loads this address into the PTBR whenever a process is dispatched.


How do you find the operating system for laptop Acer aspire 5735?

The Acer Aspire 5735 model has a Windows Vista operating system. The specifications about the Aspire 5735 can be found on the Acer Support page.


What is Trashing in operating system?

Trashing means excessive page input output in swapping. Which reduces the degree of multiprogramming.

Related questions

What is thrashing with reference to Operating System?

It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.


What is the site name to get tutorial book for operating system?

visit this page that will give you a good idea about operating system


What is demand paging in Unix?

In computer operating systems, demand paging is an application of virtual memory. In a system that uses demand paging, the operating system copies a disk page into physical memory only if an attempt is made to access it (i.e., if a page fault occurs). It follows that a process begins execution with none of its pages in physical memory, and many page faults will occur until most of a process's working set of pages is located in physical memory. This is an example of lazy loading techniques.


When was operating system introduced?

I assume you mean "When was the first operating system introduced?" Seems to be in the 1950s. See the link below for a very detailed page.


What is demand paging in operating system?

It is a memory managermnet concept where the operating system copies the dats from the disk space to the main memory (RAM) only when is trying to access the page. it is like we have to attempt the page again, when the page fault has occured while trying to get the data.


What is page stealing in operating system?

Some Operating Systems periodically look for pages that have not been recently referenced and add them to the Free page queue, after paging them out if they have been modified.


How are page faults handled?

When a page fault occurs, the hardware cannot do anything else with the instruction that caused the page fault and thus it must transfer control to an operating system routine (this is the page fault handler). The page fault handler must then decide how to handle the page fault. It can do one of two things:- It can decide the virtual address is just simply not valid. In this case, Windows will report this error back by indicating an exception has occurred (typically STATUS_ACCESS_VIOLATION)- It can decide the virtual address is valid. In this case, Windows will find an available physical page, place the correct data in that page, update the virtual-to-physical page translation mechanism and then tell the hardware to retry the operation. When the hardware retries the operation it will find the page translation and continue operations as if nothing had actually happened.


What is a page table base register?

Each process running on a processor needs its own logical address space. This can only be realized if each process has its own page table. To support this, a processor that supports virtual memory must have a page table base register that is accessible by the operating system. For operating system security, this register is only accessible when the processor is in system mode. The operating system maintains information about each process in a process control block. The page table base address for the process is stored there. The operating system loads this address into the PTBR whenever a process is dispatched.


What software translates HTML into a Web page outlook browser or operating system?

A browser.


What page fault in operating system?

a page fault is a hardware or software interrupt,it occurs when an access to a page that has not been brought into main memory takes place.


How to find my electronic notebooks operating system?

An easy way to find out what operating system is installed onto your notebook would be to open your system's control panel. From there you need to go to the "System and Security" section, and from there click on the "System" link. The page will show you your current operating system, as well as all the other details about your notebook.


How do you find the operating system for laptop Acer aspire 5735?

The Acer Aspire 5735 model has a Windows Vista operating system. The specifications about the Aspire 5735 can be found on the Acer Support page.