Socket programming in unix using c programming

Assignment Help Operating System
Reference no: EM13336556

Q1. Using the program below, identify the values of pidat lines A, B, C, and D. (Assume that the actual pids of the parent and child are 2600 and 2603, respectively.)

1883_program.png

Q2.Including the initial parent process, how many processes are created by the program shown below?

492_program1.png

Q3.Using the program shown below explain what the output will be at Line A.

2474_program2.png

Echo server

An echo server echoes back whatever it receives from a client. Forexample, if a client sends the server thestring "Hello there!"the serverwill respond with the exact data it received from the client-that is,Hello there!

Write an echo server using socket programming in UNIX using C programming. (both, client side and server side).

The server willloop, performing the following steps:
• Read data from the socket into a buffer.
• Write the contents of the buffer back to the client.

The client will
• Read data from the user into a buffer.
• Send the contents of the buffer to the server.

- This programming assignment is to be completed individually.Your code must compile and run.
- Remember to include the necessary documentation in the source code and in the output.
- Hand in a copy of the source code and the copy of the output.Review the grading algorithm before you submit your work!
- Remember that all Homework/Assignments are to be completedindividually. All violations of the TAMUK honor code will be reported.

Reference no: EM13336556

Questions Cloud

Determine the angular speed of the merry-go-round : A 6.2-m radius playground merry-go-round with a moment of inertia of 2400 kg·m2 is rotating freely with an angular speed of 1.5 rad/s. What is the angular speed of the merry-go-round right after the two people have stepped on
How much time elapses before it attains its greatest speed : A simple pendulum is made from a 0.60-m-long string and a small ball attached to its free end. how much time elapses before it attains its greatest speed
Karen and wayne need to buy a refrigerator because theirs ju : Karen and Wayne need to buy a refrigerator because theirs just broke
Determine the work done on the sled by the tension : Several children are on a sled pulled by a four-wheeler across a level snow-covered field. determine the work done on the sled by the tension in the rope in 10.0 s
Socket programming in unix using c programming : Identify the values of pidat lines A, B, C, and D and write an echo server using socket programming in UNIX using C programming.
Determine how fast will the disk be turning : A playground merry-go-round has a disk-shaped platform that rotates with negligible friction about a vertical axis. how fast will the disk be turning
Derive from uncertainty principle formula for spectral line : Derive from the Uncertainty Principle a formula for the relative spread of the spectral line that corresponds to the longest wavelength of the Lyman series.
What is the stress on the cervical vertebra : The bullet lodges in the forehead of the victim and comes to a rest. If the victim's head has a mass of 5 kg and was at rest before impact, what is the stress on the cervical vertebra
What would be the ratio of the persons actual kinetic energy : If a 68.3 kg person were travelling at 0.960c (where c is the speed of light), what would be the ratio of the person's actual kinetic energy to the person's classical kinetic energy

Reviews

Write a Review

Operating System Questions & Answers

  Handling the situation as a system administrator team leader

While working with the System Administration group, they tell you that a huge part of the administrator's duties focus on troubleshooting troubles within the network.

  Drawbacks and benefits of wireless networking

As wireless networks obtain popularity there is an rising number of households using them for their home networking requirements.

  Memory management activities performed by os

What are the advantages and disadvantages of having a small number of sectors per disk cluster and describe the process management and memory management activities performed by the Operating System.

  Explain how a race condition is possible

the wife calls deposit (). Describe how a race condition is possible and what might be done to prevent the race condition from occurring.

  Difference between a formal and an informal system

Explain the main reasons that firms implement intranets and one major obstacle to obtaining these benefits also explain the difference between a formal and an informal system.

  Currently the atm is idle

Currently the ATM is idle. Find the probabilities that, in 3 minutes, the ATM will be idle; will be serving one customer with no one in the queue; will be serving one customer with one customer waiting in the queue

  Crontab script for various jobs

Construct a crontab to perform tasks given below at the frequencies specified. Run a backup script named local-backup from the /usr/local/adm directory every weekday at 11:30pm.

  Write a short report on page replacement algorithms

Select one of two possible short reports,  Subject 1. Page Replacement Algorithms and Block Caching,  Subject 2. Storing Blocks and Remembering Where You Stored Them

  Pattern matching

Question 1 In sed, when you do pattern matching, the largest pattern is always matched first, left to right.

  Explanation of osi model

Determine what if someone designs a communication methodology that does not comply with OSI but is compatible with the application layer and the physical layer.

  How many page faults are generated using lru replacement

How many page faults are generated by the following arrayinitialization loops, using LRU replacement, and assuming page frame 1 has the process in it, and the other two are initially empty.

  Write down the reference string if page size is given

Consider following sequence of memory references from 460-byte program: 10, 11, 104, 170, 73, 309, 185, 245, 246, 434, 458, 364. Write down the reference string, assuming page size of 100 bytes.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd