When Duncan I took the Scottish throne, his grandfather had the blood of several relatives on his hands, having murdered the way clear for Duncan.
With such ill feeling as there must have been, Duncan would have been wise to pacify his remaining family, especially his senior cousin Thorfinn the Mighty, Earl of Orkney, his uncle, MacBeth, and the person closest to his throne, Queen Gruoch, wife of MacBeth.
By 1040, however, he had been murdered and the crown belonged to MacBeth. MacBeth, his name meaning Son of Life, reigned over Scotland through a period of peace and prosperity.
His time was ended by Malcolm III (Canmore), who first invaded with an army from England in 1054, then returned with them to kill MacBeth at Lumphanan in 1057.