In Sec. 4.7.5, it was pointed out that on an exec call, by testing for an adequate
Question:
In Sec. 4.7.5, it was pointed out that on an exec call, by testing for an adequate hole before releasing the current process’ memory, a suboptimal implementation is achieved. Reprogram this algorithm to do better.
Data from Sec. 4.7.5
Transcribed Image Text:
When a command is typed at the terminal, the shell forks off a new process, which then executes the command requested. It would have been possible to have a single system call to do both fork and exec at once, but they were provided as two distinct calls for a very good reason: to make it easy to implement I/O redirection. When the shell forks, if standard input is redirected, the child closes standard input and then opens the new standard input before executing the com- mand. In this way the newly started process inherits the redirected standard input. Standard output is handled the same way. Exec is the most complex system call in MINIX 3. It must replace the current memory image with a new one, including setting up a new stack. The new image must be a binary executable file, of course. An executable file may also be a script that must be interpreted by another program, such as the shell or perl. In that case the file whose image must be placed in memory is the binary of the interpreter, with the name of the script as an argument. In this section we discuss
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 75% (4 reviews)
plaintext 1 Check permissions Ensure that the file is executable 2 Read the header to get the segmen...View the full answer
Answered By
Akash Goel
I am in the teaching field since 2008 when i was enrolled myself in chartered accountants course
Since then i have an experience of teaching of class XI, XII, BCOM, MCOM, MBA, CA CPT.
5.00+
1+ Reviews
10+ Question Solved
Related Book For
Operating Systems Design And Implementation
ISBN: 9780131429383
3rd Edition
Authors: Andrew Tanenbaum, Albert Woodhull
Question Posted:
Students also viewed these Computer science questions
-
In Sec. 4.8.4, it was pointed out that it would be better to search for holes for the text and data segments separately. Implement this improvement. Data from Sec. 4.8.4 The code for exec follows the...
-
On p. 43 it was pointed out that mass and energy are alternate aspects of a single entity called mass-energy. The relationship between these two physical quantities is Einstein's famous equation, E =...
-
It was pointed out that two advantages of using multiple threads within a process are that (1) less work is involved in creating a new thread within an existing process than in creating a new...
-
In seawater, the pressure p is related to the depth d according to 33p - 18d = 495 where d is in feet and p is in pounds per square inch. (a) Solve this equation for p in terms of d. (b) The Titanic...
-
Multiple Choice Questions 1. Lucas Foods has outstanding 600 shares of 7% preferred stock, $100 par value, and 1,600 shares of common stock , $30 par value. Lucas declares dividends of $15,800. The...
-
Find the smallest positive root of the function (x is in radians) x 2 |cos x| = 5 using the false-position method. To locate the region in which the root lies, first plot this function for values of...
-
On July 1, 2020, West Company purchased for cash, eight \(\$ 10,000\) bonds of North Corporation to yield \(10 \%\). The bonds pay \(9 \%\) interest, payable on a semiannual basis each July 1 and...
-
(One Temporary Difference, Future Taxable Amounts, One Rate, No Beginning Deferred Taxes) Starfleet Corporation has one temporary difference at the end of 2010 that will reverse and cause taxable...
-
RESEARCH TASKS 3 TESTLET 1 0:00:14 123 X TIME ? END TEST ELAPSED CALC. EXCEL AUTH. LIT. OVERVIEW HELP 1 2 Find the proper citation that provides guidance on the measurement of an impairment loss for...
-
In Fig. 4-9, the page field of the virtual address is 4 bits and the page field of the physical address is 3 bits. In general, is it permitted for the number of page bits of the virtual address to be...
-
A computer system has enough room to hold four programs in its main memory. These programs are each idle half the time waiting for I/O. What fraction of the CPU time is wasted?
-
Show a boxplot for a set of data. In each case: (a) Indicate whether the distribution of the data appears to be skewed to the left, skewed to the right, approximately symmetric, or none of these. (b)...
-
Evaluate the limit using the following table 23-8 x2+ 32-9 2.1 0000 2.01 2.001 2.0001 2.00001 2.000001 From the numerical estimation table, we conclude th lim 23 - 8 -12+ 3-9
-
One of the most popular phone accessory companies, Metlock, has a reputation for unique designs for its phone cases. Its cases fit any version of all the prominent manufacturers' phones. The...
-
A gas has the following pressure-volume dependence: p = C(V - Vo) where C = 1Pa/m and V = 12m. If the gas starts out at an initial volume of 5.00m and expands to a volume of 6.00m, what is the work...
-
Apply the knowledge gained in earlier units and the first learning objective of this unit by thinking about starting a new business and how they will structure it. What are the fixed and variable and...
-
Grenoble Enterprises had sales of $50,000 in March and $60,000 in April. Forecasted sales in May, June, and July are $70,000, $80,000, and $100,000, respectively. On May 1, the company has a cash...
-
Visit the website for the Congressional Budget Office (www.cbo.gov), follow the link to Budget and Economic Information, and look up the most current Monthly Budget Review. What is the CBOs estimate...
-
In a system with light damping (c < cc), the period of vibration is commonly defined as the time interval d = 2/d corresponding to two successive points where the displacement-time curve touches one...
-
When processor designers consider a possible improvement to the processor datapath, the decision usually depends on the cost/performance trade-off . In the following three problems, assume that we...
-
Problems in this exercise assume that logic blocks needed to implement a processors datapath have the following latencies: 1. If the only thing we need to do in a processor is fetch consecutive...
-
For the problems in this exercise, assume that there are no pipeline stalls and that the breakdown of executed instructions is as follows: 1. In what fraction of all cycles is the data memory used?...
-
Subject: Economics Course: 14: ECON Your question The demand curve for British pounds (in terms of U.S. dollars) is. A. downward-sloping because a higher dollar price of pounds means British goods...
-
Monopolies tend to produce market. of a good at a price than firms in a competitive Answers A. more, higher B. less, lower C. less, higher D. more, lower
-
146) According to the World View titled "Global Inequalities," the percentage of income going to Japan's richest tenth is A) second only to that of the United States. B) more than that of China. C)...
Study smarter with the SolutionInn App