Dormitory ships are seaworthy or formerly seaworthy vessels which provide as their primary function floating living quarters. They serve as conventional land-based dormitories in all respects except that the living quarters are aboard a floating vessel, most often moored in place near their host facility.
Dormitory ships may serve as temporary or permanent housing for such enterprises as academic institutions, naval bases, and off-shore oil drilling operations. An analogue is the prison ship, which provides a floating space for incarceration.
Vessels that contain living quarters as ancillary support to its primary function — such as providing hands-on maritime training at sea — are more appropriately categorized as training ships.