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

When a command is typed at the terminal, the shell forks off a new process, which then executes the command

the simple case of an exec call that refers to a binary executable. Later, when we discuss implementation of

Each step consists, in turn, of yet smaller steps, some of which can fail. For example, there might be

A more subtle issue is whether the executable file fits in the virtual address space. The problem is that

To avoid the overhead of multiple messages to read all these pieces, a com- pletely different strategy has

Environment array 0 HOME = /usr/ast Argument array 0 g.c f.c -1 Is 10 ts a 52 T r S u 48 7 = EM 44 H10 C 40

the initial stack, as shown in Fig. 4-38(b). This stack is eventually copied intact to the PM during the

calling convention, last parameter first. With one integer and two pointers, the three parameters are

push ecx push edx push eax call push eax call_exit hlt main ! push environ ! push argv ! push argc !

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Operating Systems Design And Implementation

ISBN: 9780131429383

3rd Edition

Authors: Andrew Tanenbaum, Albert Woodhull

Question Posted: