Why does this use of "the" seem wrong?

Solution 1:

Within a thread block, [the] threads are divided into warps of 32 threads. These warps can synchronize, using barriers, in order to communicate through [the] shared memory.

First [the]:

If you include the, you're talking about a specific set of threads. My guess about this paragraph is that it is giving a general description, not a description of a particular piece or weaving.

If you were aiming to be specific, you might well also use the here: "Within the thread block."

Second [the]:

In some languages, you say (this is an unnatural, word-for-word translation), "I like the physics." But in English that doesn't work. To describe your likes and dislikes you'll need to say, "I like physics."