If you have 4 party members (including your PC) and 1 of the NPCS in your party is death, he will get all the exp equally divided among 4 (20000 : 4 = 50000 experience points for every single member, death or alive)
Its the precise amount of experience they would get, no matter how long they are death.
When you ressurrect them, they will instantly get all the exp. they should get... so they won't level up when they are death.. but when you bring them back to the living they can level up due to the exp they earned while they were death.