The sentence that is correctly written without commas because it contains a restrictive clause is:
The pen that ran out of ink is mine.
In this sentence, "that ran out of ink" is a restrictive clause that specifies which pen is being referred to, so it does not need commas. The other sentences contain non-restrictive clauses, which require commas.