I may well ahve mentioned this paper before, but take look at: 'Creating Host Compliance in a Portable Framework: A Study in the use of Existing Design Patterns' P.M.Yelland, pp18-30, OOPSLA'96 Conference Proceedings, ACM SIGPLAN Notices Vøl.31, Number 10, ISBN 0-201-92109-X which is a pretty good paper on how this was tackled by the VanGogh project at ParcPlace. Lots of useful ideas and possibly some warnings on what not to do. Basically describes a three layer structure:- portable window code (protocol and implemetation) bridge code (portale api, platform specific implementation) system call code (platform specific all the way) and the ways of swapping layers in and out, where state has to go etc.
Of course, if you can find another paper on the same area, then it becomes research rather than any sort of plaigarism :-)
tim