Path: utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: cheung@mathcs.emory.edu (Shun Yan Cheung) Newsgroups: comp.sys.sun Subject: Question about context switching on SPARC Keywords: Miscellaneous Message-ID: <622@brchh104.bnr.ca> Date: 5 Dec 90 02:00:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 23 Approved: Sun-Spots@rice.edu X-Original-Date: 26 Nov 90 19:35:05 GMT X-Sun-Spots-Digest: Volume 9, Issue 391, message 1 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu I have two questions about the Sparc assembly instructions: 1. When is the WIM updated ? It seems to me that SAVE and RESTORE should mark and unmark a window as used and unused respectively. In Cypress Sparc User's guide, it seems to imply that one can implement many ``windowing policies'', which means that the OS is responsible for maintaining WIM on window over and underflow. Is this guess right ? 2. I want to save context myself to implement a process based simulation system, but there do not seem to be any user instructions for doing that. To save context, I have to know how many windows are used by reading the CWP in PSR, but RDPSR is privileged. What the deal here ? Or is there a trap that I can call to save my register windows ? If so, is that 0x3 (ST_FLUSH_WINDOWS) ? What exactly does this trap do ? Other the one line in the Sun 4 assembly language manual, I can't find other reference to this trap. Thanks in advance for any help. Shun Yan Cheung | cheung@mathcs.emory.edu Internet Emory University | {rutgers,ogicse,gatech}!emory!cheung UUCP Dept of Math and CS | cheung@emory.bitnet BITNET Atlanta, GA 30322 | (404) 727-3823