The court may make orders of contribution among legatees or devisees to accomplish an abatement in accordance with the provisions of section 3541 (relating to order of abatement), and may determine whether the amount thereof shall be paid before distribution or shall constitute a lien on particular property which is distributed.