Write a page fault handler process that can be invoked

Assignment Help Operating System
Reference no: EM131309075

Operating Systems

Programming Assignment- Virtual Memory Manager with Paged Segments

In this assignment, you will design a virtual memory manager with paged segments, and then simulate its operation for five different page replacement algorithms: FIFO (first-in-first-out), LRU (least recently used), LFU (least frequently used), OPT-lookhead-X (optimum with lookahead of X future addresses), and WS (Working Set). There will be 5 sets of output from these 5 runs.

The information provided here is intended to guide you in your design; it is not a complete description of all issues that must be considered. The assignment requires a combination of Unix/Linux processes (such as the page fault handler, disk driver, and page replacement process) synchronized by Unix/Linux semaphores, and simulators (such as the paging disk).

Data Structures:

You may add additional fields to these data structures if needed in your design. There is one segment table per address space (process); one page table per segment; and one table entry per page. The address can thus be divided into 3 parts: segment number, page number within the segment, and displacement (offset).

A single frames table contains the address space and page number of the page currently occu- pying each page frame. The format of the entry for frame f is:

FRAMES[f]: a p forward_link backward_link

Entries in the frames table are linked together in allocated and free lists. The disk page table entry, DPT[a,p], contains the address on the paging disk of page p of address space a.

Key Elements of the Assignment:

1. Write a page fault handler process that can be invoked by the interrupt dispatcher when a page fault occurs. The address space and page number of the missing page are made available to the fault handler by the addressing hardware. The fault handler requests a page transfer by placing an entry in the disk driver work queue and signaling the associated semaphore.

2. Design a disk driver process which schedules all I/O to the paging disk. The disk command

STARTDISK(read/write, memory_addr, disk_addr)

initiates an I/O operation. The paging disk is wired to the semaphore of the disk driver process, which it signals when a command is complete. The disk has a work queue containing entries of the form

(process_id, read/write, frame_index, disk_addr).

3. Assume that the page replacement algorithm runs as a separate process which is signaled each time a page frame is removed from the pool. the replacement process attempts to maintain a free pool size between min and max frames. To accomplish this, one or more processes may need to be "deactivated" and "activated" later.

Note: In this assignment, you need not consider the actual creation and deletion of address spaces. Be sure to initialize the semaphores you use with correct initial counts.

Input and Output:

The input to your simulator is as follows:

tp /* total_number_of_page_frames (in main memory) */ sl /* maximum segment length (in number of pages) */ ps /* page size (in number of bytes) */

r /* number_of_page_frames_per_process for FIFO, LRU, LFU and OPT, or delta (window size) for the Working Set algorithm */

x /* lookahead window size for OPT, 0 for others (which do not use this value) */ min

max

k /* total number of processes */

pid1 size1 /* process_id followed by total number of page frames on disk */ pid2 size2

: :
: :

pidk sizek

These parameters are followed by a list of process id and address pairs: pid addr. You need to extract the segment number and page number from the address addr. The last address accessed by process i is followed by: i -1.

The output from your simulator includes the following data. You may also show other useful statistics.

number_of_page_faults for each process;

for Working Set, show the min and max size of the set and total_number_of_page_faults.

Attachment:- Assignemnt_Input.txt

Reference no: EM131309075

Questions Cloud

What is knowledge transfer during erp implementation : What is knowledge transfer during ERP implementation? How does an organization ensure that knowledge is transferred properly and to the right individuals?
What arguments might be used to oppose such a tax cut : What arguments are likely to be used in support of such a tax cut? What arguments might be used to oppose such a tax cut?
How different models integrate with each other to create erp : Explain functions associated and how the different models integrate with each other to create this ERP. Examine customer reviews, and find an organization that is currently using that particular product and why it has chosen this product.
Write an object-oriented console application in the java : CPT121 / COSC2135 Programming Assignment. For this assignment you need to write an object-oriented console application in the Java programming language which adheres to basic object-oriented programming principles shown below: Setting the visibilit..
Write a page fault handler process that can be invoked : Write a page fault handler process that can be invoked by the interrupt dispatcher when a page fault occurs. The address space and page number of the missing page are made available to the fault handler by the addressing hardware.
Compare your percentage of occurrence of colors : Compare your percentage of occurrence of colors to that shown as the M&M standard. Create a chart showing the comparison.
Non performing team member : If you had a non performing team member, what motivation theory and approach would you use to get the team member on track?
What will the size of the budget be after 10 years : Assuming that the budget stays the same except for the interest on the debt for 10 years, what will be the accumulated debt? What will the size of the budget be after 10 years?
What are the strengths and weaknesses of each visual : Find three or more charts in business articles from newspapers or magazines.- Evaluate the charts based on the principles presented.

Reviews

Write a Review

Operating System Questions & Answers

  Effects of spyware and adware

Describe the effects of spyware and adware. Discuss how has spyware and adware impacted the public's confidence in the security of internet?

  Api the system-call interface and the operating system

Describe the relationship between an API, the system-call interface, and the operating system. What are the advantages of using a higher-level language to implement an operating system?

  Assessing security risks

In your new position at XYZ Company, you have been asked to lead a risk assessment group. As part of your assignment to assess security risks for the computing infrastructure.

  Challenges os faces-passing parameter among user-kernel mode

Write two challenges an OS faces when passing parameters between user and kernel mode. Describe how an OS can overcome them

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  What exactly are the static and dynamic chains

Do I have enough information to do this problem and What exactly are the static and dynamic Chains? I am not a programmer and I am trying to get this right.

  Write a five pages paper about vmware education

Write a five pages paper about VMware Education.

  Security administrators to monitor servers

Discuss techniques used by security administrators to monitor servers for security purposes? For example, how are event logs and task or system monitors used?

  Supporting multiple incoming requests via threads

The email database server is created to accept multiple incoming requests via a socket in order to locate a specific message and return it to the customer email browser

  Minimum and maximum size of an ethernet frame in bytes

Determine the minimum size and Maximum size of an Ethernet frame, in bytes?

  What is the maximum data transfer rate

What is the maximum data transfer rate across the bus that this microprocessor can sustain in bytes?

  Process customer order history from a file

Required help creating a document that Develop an application that will read and procedure customer history order information from a document.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd