How fork and vfork unix system calls work

Assignment Help Operating System
Reference no: EM131043914

Explain the difference between how fork() and vfork() UNIX system calls calls work, from Virtual memory managementprospective. i.e., explain how the way these system calls work affects how the memory management system deals with them. (relevant to Section  9.1-3)

Process creation using the fork() system call may initially bypass the need for demand paging by using a technique similar to page sharing. the fork() system call creates a child process that is a duplicate of its parent. Traditionally, fork() worked by creating a copy of the parent's address space for the child, duplicating the pages belonging to the parent.

However, considering that many child processes invoke the exec() system call immediately after creation, the copying of the parent's address space may be unnecessary. Several versions of UNIX (including Solaris and Linux) provide a variation of the fork() system call-vfork() (for virtual memory fork)-that operates differently from fork() with copy-on-write. With vfork(), the parent process is suspended, and the child process uses the address space of the parent. Because vfork() does not use copy-on-write, if the child process changes any pages of the parent's address space, the altered pages will be visible to the parent once it resumes. Therefore, vfork() must be used with caution to ensure that the child process does not modify the address space of the parent. vfork() is intended to be used when the child process calls exec() immediately after creation. Because no copying of pages takes place, vfork() is an extremely efficient method of process creation and is sometimes used to implement UNIX command-line shell interfaces.

Assume the following page reference sequence. (1, 2, 3, 5, 6, 2, 3, 4, 5, 6, 1, 2, 1, 6, 7). Calculate the number of page faults as well as the content of the memory frames at the end of the references for the following 6 cases (scenarios): the memory system contains 1, 2, 3, 4, 5, or 6 frames. Draw curve that show Number of Frames on the X axis and number of page faults on the Y axis. Show your work in a separate page of paper? (relevant to Section  9.4)  

Reference sequence

1

2

3

5

6

2

3

4

5

6

1

2

1

6

7

Page Fault

1

1

1

 

5

6

2

 

6

1

1

2

 

7

7

 

2

2

 

3

5

3

 

5

 

2

1

 

 

6

 

 

3

 

1

1

4

 

4

 

 

1

 

 

 

Reference no: EM131043914

Questions Cloud

Assume interest payments are semiannual : A 7.10 percent coupon bond with 26 years left to maturity can be called in nine years. The call premium is one year of coupon payments. It is offered for sale at $1,086.35. What is the yield to call of the bond? (Assume interest payments are semiannu..
How much does the dealer make or lose if rates do not rise : Suppose a dealer uses the repo market to earn a spread on a matched book. He feels rates will rise over the next 180 days. He borrows collateral one week at a time at 10.00% initially from a money market fund and then she lends the collateral to an S..
Marketing channels to get the product : Examine one of your favorite products, and describe how the manufacturer utilizes the marketing channels to get the product to you, the end user. Evaluate the company's distribution channels. What changes would you make (list at least two) and wh..
What is the yield to call of the bond : A 6.55 percent coupon bond with 25 years left to maturity can be called in six years. The call premium is one year of coupon payments. It is offered for sale at $1,105.45. What is the yield to call of the bond?
How fork and vfork unix system calls work : Explain the difference between how fork() and vfork() UNIX system calls work, from Virtual memory managementprospective.
Earnings and dividends are expected to grow at rate : Snyder Computers Inc. is experiencing rapid growth. Earnings and dividends are expected to grow at a rate of 15% during the next 2 years, at 13% the following year, and at a constant rate of 6% during Year 4 and thereafter. Its last dividend was $1.1..
Strategic philanthropy for organizations : Research a Fortune 500 company, but do not use the same company you used for the Week 1 "Social Responsibility" assignment. Examine the company's strategic philanthropy and how it impacts profits, brand, image and turnover, as well as society as a..
What is the american mindset about families : What is the American mindset about families? How are families defined in American society, and how does this influence what social workers do with families?
Annual premium for an insurance policy : You own a house worth $400,000 that is located on a river. If the river floods moderately, the house will be completely destroyed. This happens about once every 50 years. If you build a seawall, the river would have to flood heavily to destroy your h..

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  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.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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