Umar Ali 0 Newbie Poster

Hi guys

I'm familiar with exec() and fork() commands and their working, but I don't know how the wastage of resources problem is avoided in modern operating systems. Please help me with following question.

The POSIX fork() system call creates a new process by creating a near-­‐exact duplicate of a process that invokes the system call. The most common reason to create a new process is when executing another program, which is achieved by the child process
invoking the POSIX exec() system call which replaces the invoking process with
the image of another program. Clearly taking the time to copy all of the resources
of the parent process is wasted computation in this situation. How do modern operating
systems minimize/avoid this waste?

Thanks in advance