The relative gaps in between you and your cohort effect how your "internal exam marks" are distributed.
Generally, just do your best in everything and ensure you get the highest rank in school, so you receive the highest internal mark (and hopefully external as well)
If your cohort is very good, and the gaps are very close together, then everyone gets a higher mark.
If your cohort is very dispersed, and the gaps are "far apart", then there will large gaps in between each respective rank.
I hope that answers your question well enough. I don't want to get into the whole marks system too much, so that's the briefest and most general overview I can provide
(note: someone please correct me if I'm wrong!)