Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fork()
- The purpose of fork() is to create a new process, which becomes the child process of the caller. After a new child process is created, both processes will execute the next instruction.
- It takes no arguments and returns a process ID
- If fork() returns a negative value, the creation of a child process was unsuccessful.
- fork() returns a zero to the newly created child process.
- fork() returns a positive value, the process ID of the child process, to the parent. A process can use function getpid() to retrieve the process ID assigned to this process.
- Why Threads?
- multitasking
- #Second n third paragraph
- https://pages.mtu.edu/~shene/NSF-3/e-Book/FUNDAMENTALS/threads.html
- https://way2java.com/multithreading/java-made-simple-what-is-thread-in-java-why-threads-required/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement