Basic CS [Redpine Infotech Placement]: Sample Questions 4 - 5 of 13

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 4

Edit

Describe in Detail

Essay▾

Difference between re-entrance and recursion.

Explanation

Difference between Re-Entrance and Recursion
Re-entranceRecursion
A re-entrant function can be safely executed concurrently.A recursive function calls upon itself until a given condition is met
Re-entrant function does operations like protect/lock static state.Recursive functions do not need to protect/lock access static state.
Re-entrant function needs able to handle concurrent execution with different threads.Recursive able to handle entry while it is running, but it access controlled manner and not other thread.
Re-entrant recursive functions are thread-safe.Recursive functions are not thread-safe
Re-enter functions cannot modify static variablesRecursion functions can modify static variables.

Question 5

Basic CS
Edit

Describe in Detail

Essay▾

What is the use of ARP in TCP/IP stack?

Explanation

  • TCP/IP network has two addresses, one is physical and other is logical.
  • TCP/IP network has two addresses, one is physical and other is logical.
  • ARP provides bridge between these two addresses.
  • Address resolution protocol (ARP) maps an internet protocol address (IP address) to a physical machine address.
  • The ARP helps the IP directing datagrams to the exact receiving host by mapping the Ethernet addresses to known IP addresses.
  • ARP is a dynamic resolution protocol used to match IP addresses to data link layer addresses.
  • Lies in between data link layer and internet layer.
  • Physical machine address is recognized in the local network.
  • ARP is used as network layer protocol in the TCP/IP internet protocol.
  • It is an important address resolution protocol.
  • TCP protocol support is not always required in embedded uses of Internet technologies.
  • The ARP protocol is just one component of a TCP/IP.

Developed by: