Perfect and Imperfect Markets under Barriers to Entry