Critical Path != Critical Section

I always get the concepts “critical path” and “critical section” confused.

The “critical section” is the part in your algorithm which you must hold a lock for; whereas the “critical path” is an idea from hardware design which relates to the time taken for the longest combinatorial logic that needs to be processed during a clock cycle, thus limiting the frequency you can run your clock at.

Although the terminology “critical path” came from hardware, the same terminology is used in software. ChatGPT has a fairly good write-up on the two uses of the term “critical path”.

I learned a little more about this in Introduction to VHDL for FPGA and ASIC design.

CRC

I watched Ben Eater’s videos How do CRCs work? and Checksums and Hamming distance (the full course is Learn about error detection) then found the Wikipedia page: Cyclic redundancy check.

Also of interest:

Keyspace on the back of an envelope

One question that always plagues me: should I use 32-bit or 64-bit keys. I can never make a firm decision on this point. But I’ve just done some back of the envelope calculations in thinking about it.

If you issued one identity per second, every second of every day, it would take 136 years to exhaust the keyspace.

If you issued one thousand identities per second, it would take 50 days to exhaust the keyspace.