In some cases, dwarves will take the stone that was most recently mined, but with stonecrafters and masons, I think they take the nearest stone. Two points that you need to keep in mind, though: One, they take the stone nearest to the dwarf when the dwarf takes the job. If the dwarf has just finished drinking some booze when he takes the carve stone craft job, he'll likely grab a stone out of the booze storage room, if there is one. Two, pathfinding is not used when determining which stone is nearest. Rather, naive distance based on the X, Y, and Z coordinates is used. Thus, if there is a stone five z levels below the dwarf, and there is a stone 10 tiles to the right of the dwarf, the dwarf will choose first stone, even if the actual path to get there is really long. I tend to design my fortresses accordingly, using stockpiles for stone that are immediately above or below the workshops, rather than to the side of them.
Edit: Barricading would work, because pathfinding is used to ensure that the stone that is thought to be nearest is indeed accessible. If the stone cannot be reached, then another stone is tried until the nearest accessible stone is found. At least, this fits the pattern of stone usage that I have witnessed.
[ May 18, 2008: Message edited by: Exponent ]