Our BAM files are created according to a "lossless" alignment procedure  from the Broad Institute
GATK documenation and involves re-adding the unaligned/unmapped reads into an aligned BAM, using Picard's
@HD VN:1.6 SO:coordinate
MarkDuplicates handle the unmapped reads of a BAM file containing both unmapped and mapped?
MarkDuplicates seems to normally take the BAM's ordering into account, namely, it accepts arguments such as
--ASSUME_SORT_ORDER X. However it's not specified whether reads without a position are ignored, or have to be compared with all other possible reads.
Disclaimer: I initially posted this question on the GATK forum , but I'm reaching out to hopefully a broader audience.