I used to check complex commercial PCBs specially those of graphics cards to see how professional PCB designers do their layout and learn from their techniques.

When I checked the card shown below I noticed two things regarding the placement of vias:

(A higher resolution image is shown here).


The PCB is surrounded by stitching vias all around the edges. What's the role of all of these? I think they're connected to ground to act as a shield, if that's true, I can't understand technically how by this placement they achieve this shield?
By looking closer to the mounting holes, I noticed they added vias all around the pad, why? 




Ground Ring

Surrounding the PCB, and sometimes areas within the PCB, is surrounded by a ring of traces that is connected to GND.  That ring exists on all PCB layers and is connected together with a bunch of vias.

To explain what this does, I need to describe what happens when you don't have the ground ring.  Let's say that on Layer 2 you have a ground plane.  On layer 1 you have a signal trace that goes all the way to the edge of the ground plane, and runs for several inches along the edge.  This signal trace is technically directly over the ground plane, but right at the edge.    In this case that trace will radiate more EMI than other traces, also the trace impedance would not be as well controlled.  Simply moving the trace in, so it is not at the edge of the ground plane, will fix the problem.  The more "in" you move it the better, but most PCB designers will move it in at least 0.050 inches.

There are similar issues when you have a power plane.  The power plane should be moved back from the edge of the GND plane.

Enforcing these rules, that traces can't be within 0.050" of the edge of a plane, is difficult in most PCB software packages.  It's not impossible, but most PCB designers are lazy and don't want to set up these complicated rules.  Plus, this means that there are areas of the PCB that are simply empty of useful traces.

A solution to this is to put in a ground ring and tie it all together with vias.  This will automatically prevent other signals from going into that area of the PCB, but also provide better EMI prevention than simply moving the traces back.  For the power plane, this also forces the power plane back from the edge (since you just put a GND trace there).  

Mounting Holes

In most cases you want to connect your mounting holes to GND.  This is for EMI and ESD reasons.  However, the screws are really bad for PCB's.  Let's say that you have a normal plated through hole that is connected to your ground plane.  The screw itself can destroy the plating inside the hole.  The screw head can destroy the pad on the surface of the PCB.  And the crushing force can destroy the GND plane near the screw.  The odds of any of this happening is rare, but many EE's have had enough problems with this to come up with fixes.

(I should note that destroying the plating and/or the pad usually results in metal flecks getting loose and shorting out something important.)

The fix is this:  Add vias around the mounting hole to connect the pads to the GND plane.  Multiple vias gives you some redundancy and reduces the inductance/impedance of the whole thing.  Since the via is not under the screw-head it is less likely to get crushed.  The mounting hole can then be unplated, reducing the chance of loose metal flakes shorting something out.  

This technique is not foolproof, but does work better than a simple plated mounting hole.  It seems like every PCB designer has a different method for doing this, but the basic thinking behind it is mostly the same.
