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...
-
When Time, Inc., and Warner Communications merged, it represented one of the largest busi ness combinations of all time. Since then the company has reported consistent net losses despite relatively...
-
What was the net impact on Jensen Companys 2009 income as a result of this fair value hedge of a firm commitment? LO9 a. $0. b. $680.30 decrease in income. c. $300 increase in income. d. $980.30...
-
First Printing and Copy Center has 4 more jobs to be scheduled, in addition to those shown in Example 3 in the chapter. Production scheduling personnel are reviewing the Gantt chart at the end of day...
-
Oriole Company earns 12% on an investment that will return $470,000 10 years from now. Click here to view the factor table. (For calculation purposes, use 5 decimal places as displayed in the factor...
-
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?
-
Polish Company issued \(\$ 100,000\) face value of bonds on January 1, 2011. The bonds had an 8 percent stated rate of interest and a five-year term. Interest is paid in cash annually, beginning...
-
In this scenario you are the Manager of a Home and Community Care organization in Victoria. Your organization provides oversees support services for individuals in their homes. The individuals that...
-
find the wind speed and direction for the following parcels. Important note: To determine the arc tangent using the Google calculator, click the box marked "Inv" so that it is a light gray instead of...
-
As consumers we're connected to an instant feed or live updates, breaking news, and messages. We believe that when we post something on social media, we will get instant feedback from friends. What...
-
Describe the process for screening candidates for ethics. Outline which job candidate factors are illegal to consider when hiring. Explain how to obtain accurate behavior information from resumes,...
-
In relation to Operation management, sustainability and supply chain management explain the following terms; What is the overall objective of scheduling? What is JIT? What is a Lean producer? Discuss...
-
Nico is Omega Corporation's majority shareholder. He owns enough stock in Omega that if he were to sell it, the sale would be a transfer of control of the firm. Discuss whether Nico owes a duty to...
-
In Problem 8.43, determine the smallest value of for which the rod will not fall out of the pipe. IA -3 in.-
-
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?...
-
Discuss American History
-
Your firm has developed a new lithium ion battery polymer that could enhance the performance of lithion ion batteries. These batteries have applications in many markets including cellphones, laptops,...
-
Need help analyzing statistical data 1. ANOVA) True or false: If we assume a 95% confidence level, there is a significant difference in performance generally across all groups. 2. (t-test) True or...
Study smarter with the SolutionInn App