1
$\begingroup$

I'm not major in science at all and would like to verify whether my understanding is correct or not.

I just did some googling about the definition of protocol, such as in this, this one, this one and more.

And, I would like to know:

  1. is a protocol a pack of algorithms and programming source codes? (in both the computer and network)

  2. regarding the previous question, if so, does that mean that the operating systems/network nodes/applications/hardware indeed have such packs of codes inside their body to perform communications to each other that follow the same protocols? (such as TCP/IP, smb, secure shell, SMTP...)

$\endgroup$
1
  • $\begingroup$ What is a "pack" of algorithms? $\endgroup$
    – dkaeae
    Commented Jul 15, 2019 at 12:44

1 Answer 1

3
$\begingroup$

is a protocol a pack of algorithms and programming source codes? (in both the computer and network)

No. A protocol is an abstract description of how systems communicate. Source code could be an implementation of a protocol, but the protocol is not the same as its implementation. Basically, a protocol tells a programmer "the messages should be formatted like this and you should respond in this way to this message", but it is up to the programmer to decide how to implement this in an algorithm and/or source code.

regarding the previous question, if so, that means the operating systems/network nodes/applications/hardware indeed have such packs of codes inside their body to perform communications to each other that follows the same protocols? (such as TCP/IP, smb, secure shell, SMTP...)

Yes, operating systems and other hardware do contain code (or sometimes specialized hardware) that implements protocols. However, the way a protocol is implemented may (will) be different between different operating systems and pieces of hardware. The protocol sets standards for how the system should behave to the outside world, but not for how this is implemented internally.

$\endgroup$
3
  • $\begingroup$ so, if a programmer combines a low-efficiency algorithm with a protocol, it is still acceptable and the rest of the problem will be the performance?right? $\endgroup$
    – user53815
    Commented Jul 16, 2019 at 2:54
  • $\begingroup$ A protocol may specify performance requirements, such as that a response must happen within X milliseconds or data must be transmitted at a given rate. In that case, an inefficient implementation may fail to meet the protocol's requirements. $\endgroup$ Commented Jul 16, 2019 at 11:36
  • $\begingroup$ oh! so if I want to invent an OS that follows the TCP/IP protocol then I should write codes/ use algorithms in this OS to make it process data into packets that TCP/IP protocol defines, right? $\endgroup$
    – user53815
    Commented Jul 17, 2019 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.