|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (9 bit)
|
hey guys got some question about Unix programming. what is fork()? what does it use for? what is wait()? what is it used for? what is pipe()? what does it use for? can u give me some information coz, i have to write a simuation program which simulate a call center which a customer call in we direct the call to the call center
|
|
|
|
|
|
#2 |
|
Member (4 bit)
Join Date: Aug 2002
Posts: 10
|
Hi,
Well to answer your questions u need to learn Unix. But anyway here's some light. - fork(): in the Unix world we say fork a process meaning dividing into two. In other words the OS (Unix/Linux) recreates a process in another memory location with a different process ID. The old process is called the parent and the new one is called the child. Keep in mind that the OS does not copy the code section ir simply shares with other instances. Imagine opeing five instances of your browser at the same time they are all sharing the code section but have different data i.e pages to dispaly. Nest when an OS forks a new process it exec() 's the new one meaning replacing the orginal data with new data. - wait(): is concept in threads and process terminlogy meaning that the parent process cannot terminate until the child terminates. S the parent simply waits. Check Unix / Linux reference or serach for a tutorial in Google. or start with: http://www.uwsg.indiana.edu/usail/index.html |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|