I have a question that has been puzzling me for a while now. I tried really hard to find an answer but never found the one, which would be satisfying enough. I am talking about using definite and indefinite articles with uncountable nouns and also in of-phrases. I would be very grateful if anyone could explain it to me. 

These two examples I found on the internet they refer to the usage of articles with uncountable nouns:

The position requires **a** knowledge of German.
**The** knowledge of computer software is very useful nowadays.

I am not sure why the first sentence uses the indefinite article while the second one the definite one. 

When it comes to **of-phrases** (I apologize for calling them this way, I don't know the proper name for this type of constructions).

For example: 

**A** chapter of a book. / **The** chapter of a book.

I found an article, which says that if the noun is followed by a prepositional phrase (of/in/to…), it is made definite and takes the definite article. Does it mean that the first noun always require the definite article even if it is the first mention of a noun? 
The chapter of a book. The name of a movie. etc. 

Thank you guys in advance! 
Kinds regards,
Alexander Chlebowski