Earlier quoted context omitted.
A range one might introduce boxing depending on the types being iterated.
Or use a language with reified generics :)
Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
41–50 of 50 posts
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#42Earlier quoted context omitted.
I don't see any reason in modern C to use int/short/long over explicit int32_t/int8_t/int64_t other than they're shorter to type.
Where can I read tips like that about modern C, would you have a book to recommend or a blog to follow? Thank you
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#43Earlier quoted context omitted.
I don't see any reason in modern C to use int/short/long over explicit int32_t/int8_t/int64_t other than they're shorter to type.
Where can I read tips like that about modern C, would you have a book to recommend or a blog to follow? Thank you
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#44Operating System Design: Internet Working With Xinu by Douglas Comer (1987) is a nice explanation with lots of C code of how to add a networking stack to an operating system, in this case his educational unix-inspired XINU.
"Operating System Design: The Xinu Approach" and also the books "Internetworking with TCP /IPvolumes1-3." Might you have a link to the title you are referencing here? I have read the Internetworking series which is excellent.
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#45Earlier quoted context omitted.
Or use a language with reified generics :)
Go maps are reified generics, and very efficient ones at that.
Oh ... you actually need it to be a red-black tree, or a custom hash function ? Tough.
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#46For those that rather learn how to implement it in a safer language, Fuchsia's TPC/IP stack is written in Go. https://fuchsia.googlesource.com/third_party/netstack/
Isn’t garbage collection going to introduce jitter?
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#47Operating System Design: Internet Working With Xinu by Douglas Comer (1987) is a nice explanation with lots of C code of how to add a networking stack to an operating system, in this case his educational unix-inspired XINU.
I actually can't find the book you are referencing. I do see: "Operating System Design: The Xinu Approach" and also the books "Internetworking with TCP /IPvolumes1-3." Might you have a link to the title you are referencing here? I have read the Internetworking series which is excellent.
It looks the the second volume that goes with "Operating System Design".
I can't be 100% certain, as I didn't find a table of content for either of the 1st edition books, but the 2nd edition of "Operating System Design" includes a section in implementing ethernet, so perhaps the two volumes got combined into one for the second edition.
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#48Earlier quoted context omitted.
I actually can't find the book you are referencing. I do see: "Operating System Design: The Xinu Approach" and also the books "Internetworking with TCP /IPvolumes1-3." Might you have a link to the title you are referencing here? I have read the Internetworking series which is excellent.
This seems to be the book - https://www.amazon.com/Operating-System-Design-Vol-Internetw... It looks the the second volume that goes with "Operating System Design". I can't be 100% certain, as I didn't find a table of content for either of the 1st edition books, but the 2nd edition of "Operating System Design" includes a section in implementing ethernet, so perhaps the two volumes got combined into one for the second…
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#49Earlier quoted context omitted.
GC will always introduce jitter. You can choose not to use it and allocate statically etc, but that does not mean that use of a GC does not introduce jitter. Also don't confuse high performance with latency-sensitive. Highly performance-optimised code will still have issues with GC jitter if you or someone else is causing it. There is a reason why the GC-enabled OSs aren't used for anything in reality. BTW: There sho…
> GC will always introduce jitter. > You can choose not to use it and allocate statically etc, but that does not mean that use of a GC does not introduce jitter. It only introduces jitter if it runs at all. If one really wants to be drastic in performance critical code, in most GC runtimes it is possible to just turn it off. On Go's case a runtime.SetGCPercent(-1) will take care of that. > There is a reason why the G…
I'm not talking about GC-enabled runtimes such as a JVM or ObjC/Swift runtime, they're application-level.
Both Mach(IOS) and Linux(Android) are non-GC-enabled OSs.
Re: Let's code a TCP/IP stack, 1: Ethernet & ARP (2016)
#50Earlier quoted context omitted.
I actually can't find the book you are referencing. I do see: "Operating System Design: The Xinu Approach" and also the books "Internetworking with TCP /IPvolumes1-3." Might you have a link to the title you are referencing here? I have read the Internetworking series which is excellent.
This seems to be the book - https://www.amazon.com/Operating-System-Design-Vol-Internetw... It looks the the second volume that goes with "Operating System Design". I can't be 100% certain, as I didn't find a table of content for either of the 1st edition books, but the 2nd edition of "Operating System Design" includes a section in implementing ethernet, so perhaps the two volumes got combined into one for the second…