Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

klh10 - Kn10-kl cpu usage on Linux when running Tops-10 guest. #38

Open
wgs777 opened this issue Apr 10, 2022 · 8 comments
Open

klh10 - Kn10-kl cpu usage on Linux when running Tops-10 guest. #38

wgs777 opened this issue Apr 10, 2022 · 8 comments

Comments

@wgs777
Copy link

wgs777 commented Apr 10, 2022

Just wanted to ask if anyone is using klh10 on Linux to run a guest operating system Tops-10, and experiencing very high CPU usage on the Linux process: kn10-kl.

There is information about this in the file: doc/dvhost.txt, with a tops10 clock1.mac patch needed.

[1] Has anyone installed that patch successfully.
[2] Does the latest [klh10-2.0h] offer any other fixes for this high cpu usage so perhaps the patch is no longer needed?

Thanks in advance for your reply.

Bill

@larsbrinkhoff
Copy link
Member

https://github.com/PDP-10/klh10/ should include all updates, but I don't recall hearing anything about high CPU usage.
@Rhialto, have you?

@Rhialto
Copy link
Member

Rhialto commented Apr 11, 2022

@wgs777 I don't recall any reports on tops-10, no. Personally I tried tops-10 maybe once or twice and mostly used the panda edition of tops-20. That one surely has the kind of patch that's mentioned.
As to your second question, apart from the idle device, I don't think there is anything in klh10 to limit cpu usage.

@larsbrinkhoff
Copy link
Member

Oh, that's right. KLH10 does not attempt to automatically detect an idle operating system. You have to patch your monitor somehow to insert a special instruction in its idle loop.

SIMH, on the other hand, does this automatically. It added KL10 emulation not too long ago, if that's your preferred hardware.

@larsbrinkhoff
Copy link
Member

@wgs777, I invited you to the PDP-10 group here on GitHub.

@wgs777
Copy link
Author

wgs777 commented Apr 16, 2022

Thank you all for reasponding. I just wanted to provide an update. I patched the Tops-10 monitor with some help from Rich Alderson and that brought the klh10 cpu usage from 100% of 1 core down to 0.08% of 1 core. So problem is solved.

I'll post the details on the patch here in case anyone is interested in doing it themself:

#Patch of :system.exe[1,4] Info at: https://alt.sys.pdp10.narkive.com/UCpN700h/how-to-rebuild-tops10-rel
#Replace "SOJG 6,1" to "CONO 740,1"
LOGIN 1,2
SET TTY VT100
.copy tops10.exe=dskb:system.exe[1,4]
.r filddt
File: tops10.exe/p
[Patching file DSKB:TOPS10.EXE[1,2]]
[36539 symbols loaded from file]
[ACs copied from CRSHAC to 0-17]
NULCOD+1/ SOJG W,P CONO 740,1
^Z
.rename [1,4].=tops10.exe
Files renamed:
DSKB:TOPS10.EXE
.kjob
^
quit

Notes: While on same line, after it displays: SOJG W,P
type in on same line without pressing spacebar: CONO 740,1
hit enter, CTRL Z to save and exit.

Add this to your klh10 startup ini:
vi twonky2.ini, and add this line after the last devdef:
;To keep host cpu% for kn-10, apply the patch and use this line below.
devdefine idler 740 host

Then apply patch everytime you boot up by typing TOPS10.EXE at the first BOOT>
./kn10-kl twonky2.ini
KLH10> go
Starting KN10 at loc 0703667...
BOOT V4(100)

BOOT>TOPS10.EXE
[Loading from DSKB:TOPS10.EXE[1,4]]

@wgs777
Copy link
Author

wgs777 commented Apr 16, 2022

I was hoping someone might know of a downloadable pre-built tops-10 disk image that is fully loaded with SOS editor, all the major compilers: Cobol, Fortran, Algol, BASIC, APLSF, BLISS, along with some add on's like Pascal, Lisp, C, and some games too like the kind of fully loaded Tops-10 system that would have been found at most major Universities in the 1980's.

I downloaded and am running the prebuilt system on github at: https://github.com/gewtnet/tops10-disks which includes a 3rd disk named TSU. But the compilers don't seem to be installed on that disk image.

devdef dsk0 rh0.0 rp type=rp06 sn=1024 format=dbd9 path=disks/T10-RP06.0-dbd9
devdef dsk1 rh0.1 rp type=rp06 sn=1026 format=dbd9 path=disks/T10-RP06.1-dbd9
devdef dsk2 rh0.2 rp type=rp06 sn=1028 format=dbd9 path=disks/tsu

If anyone knows of a fully loaded Tops-10 disk image, please let me know.

Thanks,
Bill

@Rhialto
Copy link
Member

Rhialto commented Apr 16, 2022

@wgs777 First, thanks for writing up the procedure to patch TOPS-10. I'd like to add this to one of the documentation files. Is that ok with you?

I guess you're aware of the "twonky" TOPS-10 set at http://klh10.trailing-edge.com/ . I think that's the one I tried at some point. ANd there is stuff at http://pdp-10.trailing-edge.com/ but that's un-installed tape images, mostly. I'm mentioning it on the off-chance that you hadn't seen it.

@wgs777
Copy link
Author

wgs777 commented Apr 16, 2022 via email

Rhialto added a commit to PDP-10/klh10 that referenced this issue Apr 16, 2022
Thanks to wgs777 who summarized how to patch a TOPS-10 monitor to use
the host device in the null task to save host CPU usage.
See issue PDP-10/-READ--THIS-#38.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants