Design Overview
Chapter 2 Design overview of 4.38Rh
6. Simulating output tabs with appropriate numbers of spaces
?. Pmviding translatiolr Mr uppercase-only terminals
8, Displaying echoed nongraphic ASCII characters as a two-character S e qtierice ot
character related to the control character)
9. Generating an EOF indication to the process reading from the terminal
response to a particular input character sequence
2.12 What is the diflefence between a pipe and a socket?
lated process Nnn: n.
2.12
A pipe provides a unidirectional byte stream to a related process running on the
same machine. A socket provides a bidirectional endpoint of communication that
may be connected to any interested process on any machine accessible on the
network.
2.13 Describe how to create a group of processes in a pipeline.
A pipeline is created in several steps:
1. Me parent process, usually a shell, creates a pipe using pipe.
2. Me parent process creates the first process in the pipeline usingjork.
3. Me first process, still running with the executable of its parent, closes its
standard output and the reading end of the pipe, (hen uses dup2 to copy the
writing end of the pipe to the standard output descriptor. The first process then
uses erecve to replace itself with the first program in the pipeline.
4. Me parent closes the writing end of the previous (incoming) pipe, creates a
new (outgoing) pipe using pipe, and then creates the next process in the
pipeline using tork.
5. The process created in step 4 closes the reading end of the new outgoing pipe,
closes both its standard input and standard output, then uses dup2 to copy the
reading end of the previous incoming pipe to its standard input and the writing
end of the new outgoing pipe to its standard output. Finally, it uses execve to
replace itself with the program to be mn.
6. Me pipeline continues to be built up using steps 4 and 5 until the last process is
to be created. For the last process, the parent closes the writing end of the
incoming pipe then creates the last process in the pipeline usingjork.
7. Me last process closes its standard input, then uses dup2 to copy the reading
end of the incoming pipe to its standard input. Finally, it uses execve to replace
itself with the final program to be run.
* 2.14 Explain the dimrence between interprocess communication and
networking.
! nterprocess communicaEon refers to the set of services that processes use to
communicate. NUworEng refers to the services that support communication
6. Simulating output tabs with appropriate numbers of spaces
?. Pmviding translatiolr Mr uppercase-only terminals
8, Displaying echoed nongraphic ASCII characters as a two-character S e qtierice ot
character related to the control character)
9. Generating an EOF indication to the process reading from the terminal
response to a particular input character sequence
2.12 What is the diflefence between a pipe and a socket?
lated process Nnn: n.
2.12
A pipe provides a unidirectional byte stream to a related process running on the
same machine. A socket provides a bidirectional endpoint of communication that
may be connected to any interested process on any machine accessible on the
network.
2.13 Describe how to create a group of processes in a pipeline.
A pipeline is created in several steps:
1. Me parent process, usually a shell, creates a pipe using pipe.
2. Me parent process creates the first process in the pipeline usingjork.
3. Me first process, still running with the executable of its parent, closes its
standard output and the reading end of the pipe, (hen uses dup2 to copy the
writing end of the pipe to the standard output descriptor. The first process then
uses erecve to replace itself with the first program in the pipeline.
4. Me parent closes the writing end of the previous (incoming) pipe, creates a
new (outgoing) pipe using pipe, and then creates the next process in the
pipeline using tork.
5. The process created in step 4 closes the reading end of the new outgoing pipe,
closes both its standard input and standard output, then uses dup2 to copy the
reading end of the previous incoming pipe to its standard input and the writing
end of the new outgoing pipe to its standard output. Finally, it uses execve to
replace itself with the program to be mn.
6. Me pipeline continues to be built up using steps 4 and 5 until the last process is
to be created. For the last process, the parent closes the writing end of the
incoming pipe then creates the last process in the pipeline usingjork.
7. Me last process closes its standard input, then uses dup2 to copy the reading
end of the incoming pipe to its standard input. Finally, it uses execve to replace
itself with the final program to be run.
* 2.14 Explain the dimrence between interprocess communication and
networking.
! nterprocess communicaEon refers to the set of services that processes use to
communicate. NUworEng refers to the services that support communication
Thanks
Venkata Pilaka
Comments
Post a Comment