1. Develop a program to do the follows. (40pts) a) Create a pipe. b) Fork() a child process. c) Let the parent process w

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1. Develop a program to do the follows. (40pts) a) Create a pipe. b) Fork() a child process. c) Let the parent process w

Post by answerhappygod »

1. Develop a program to do the follows. (40pts) a) Create a
pipe. b) Fork() a child process. c) Let the parent process write 20
integers between [1, 50] to the pipe. Use random() function to
generate the integers. d) Let the child process read the 20
integers from the pipe and write them to a message queue. Let the
child process create the message queue, and then do the writing.
Assign type 1 to odd integer, and assign type 2 to even integer
when writing them to the message queue.
Subject: Systems Programming
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply