In informatics I often come across a sentence of the type (with or without commas):
"The data is read from, and written to, disk by the operating system."
I don't know whether the use of commas is correct in this case. I've read a few resources online but found nothing conclusive. One of the first hits I got when searching was this one and I was thinking the sentence fits with
Rule #3: Use a comma to set off nonessential elements.
A nonessential element is a word, phrase, or clause that is not needed to complete a sentence. In other words, it can be removed and the sentence still makes sense and is grammatically correct. If removing the element changes the meaning of the sentence, it is essential. Nonessential elements need to be offset with commas, both before and after.
However, both reading/writing are essential operations---from a functional perspective---when it comes to a hard disk.
What would be the correct approach, commas or no commas?