Question: 1. In UNIX, a program tries to run ls command. Describe the differences between the following two different approaches: (a) directly executing execvp() system call

1. In UNIX, a program tries to run ls command. Describe the differences between the following two different approaches:

(a) directly executing execvp() system call to run the ls command in the program and

(b) spawning a child process by executing fork() system call and have this child process call execvp() to run the ls command. (10 pts)

2. a) When you logon to the eve machine or any UNIX/Linux system, you are running a shell. What is a shell? (10 pts)

b) After you logon, you type ls command and hit "enter", who executes the ls command? what's happen to the shell? (10 pts)

3. In the UNIX canonical mode of the terminal driver, the translation happens between the tty and the process. What are the translations for the following:

(a) when you type Return (ASCII 13), what does the process see?

(b) when a program prints newline, what does tty see?

(c) the program see nothing until you type which key?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!