HNHacker News
TopNewBestAskShowJobs

johndoe0815

2,010 karma · joined October 20, 2019

https://multicores.org https://github.com/michaelengel
submissionscomments
johndoe0815··on HP Ink Fiasco: Printer manufacturers shouldn't sell ink or toner
Nowadays, hp is an ink company that happens to sell printers…
johndoe0815··on Ask HN: Who names/renames products at Microsoft?
Probably the .biz team :)
johndoe0815··on There is any logical theory to why life exist?
“In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.” [Terry Pratchett]
johndoe0815··on StarFive VisionFive 2: A RISC-V SBC for the Masses?
From TFA: "Up to 8GB DDR4/3, LPDDR4/3 at 2133/2800 Mbps (directly included in the chip, as far as I understand)"

It's a separate chip - in fact, the one labeled "cxmt" in the picture with a close-up shot of the JH7110 SoC. AFAIK, the 2GB version is not in production right now, so the only options are 4GB and 8GB.

If you're in Germany, there's a significantly cheaper option than the 123€ amazon.de link given in the article: 106€ at https://www.rasppishop.de/StarFive-VisonFive (yes, that's a typo in the URL, but it works... they also offer the 4GB version).

johndoe0815··on -O1 enables frame pointer push to move around on x86_64
...in 2012 with gcc 4.7.2... marked as RESOLVED WONTFIX. Why is this relevant now?
johndoe0815··on Ask HN: Source to purchase box with memory that has in-built processor?
I assume you're thinking of in-memory or near-memory computing devices. You can try upmem (https://www.upmem.com) for memory modules which integrate thousands of data processors (DPU) uniquely positioned within the DRAM memory chips and next to the data.
johndoe0815··on Niklaus Wirth has died
I would add Jochen Liedtke (unfortunately he passed away already more than 20 years ago) as inventor of the L4 microkernel.

Several research groups continued work on L4 after Liedtke's death (Hermann Härtig in Dresden, Gernot Heiser in Sydney, a bit of research at Frank Bellosa's group in Karlsruhe and more industrial research on L4 for embedded/RT systems by Robert Kaiser, later a professor in Wiesbaden), but I would still argue that Liedtke's original work was the most influential, though all the formal verification work in Sydney also had significant impact - but that was only enabled by the simplicity of the underlying microkernel concepts and implementations.

johndoe0815··on Niklaus Wirth has died
Niklaus Wirth's death was also announced (by Andreas Pirklbauer) an hour ago on the Oberon mailing list:

https://lists.inf.ethz.ch/pipermail/oberon/2024/016856.html

johndoe0815··on 37C3 video shows hardcoded backdoor on Apple ARM chips
FUD. Read the facts: https://social.treehouse.systems/@marcan/111655847458820583
johndoe0815··on Finnish Museum of Games
That’s a great location, I enjoyed my visit in 2022!
johndoe0815··on Ask HN: New Year's Resolutions
2560x2880 thanks to the LG DualUp 28MQ780-B :)
johndoe0815··on The startups we lost in 2023
So what was the money wasted on (if you detect sarcasm, please let me know...)?

* $10 million for shared wallets

Hm, why would you want to share a wallet if there are (at least in some countries) apps available that enable the quick and free transfer of money (like Vipps in Norway or Swish in Sweden)?

* $1 billion for a digital freight broker

Wait, was all this done with pencil and paper so far? Logistics is one of the most digitized applications already, so one would need a radical new approach to make inroads here. Seems that this startup didn't have the ideas...

* $20 million for a LGBTQ+ banking platform

Supporting LGBTQ+ is certainly great, especially in the current political climate, but why does a person's sexual orientation or gender identity matter for banking?

* $80 million for pet care telehealth

This will certainly work as soon as my dog is able to tell me where it hurts...

* $200 million for an event organizing social app

People are doing this using regular social networks right now, why would you use yet another, separate social app for this use case?

* $400 million for an unspecified "once-promising cybersecurity startup"

Founded by former NSA director Keith Alexander but insufficiently nasty for the NSA, I assume?

* $17 million for a concert livestreaming platform

Competing with the large established video platforms on the Internet is certainly a great idea...

* $597 million for a real estate developer turned tech-enabled prefab homebuilder

Lowering the cost of constructing housing is a good idea, but the current situation (at least what I observe here in Germany) is that there are no affordable plots, too much bureaucracy, and a significant lack of qualified craftsmen. Prefab houses themselves are a pretty old idea, so it's not clear what benefits "digital" may offer here (the article is extremely low on details...).

* $121 million for an Indian fintech underwriting small ticket loans to first-time internet customers

Small loans for people who want to open a shop, restaurant, etc., sounds like a good idea - especially in developing countries. However, it didn't really work out the last time it was tried around 2010: https://www.bbc.com/news/world-south-asia-12035909

and, amazingly, CloudNordic, founded in 2007(!), in included in the list. They succumbed to a ransomware attack, but where's the relation to startups?

johndoe0815··on [dead]
Oh my, it seems that this kid took the wrong drugs. Just incoherent rants from what sounds like a gamer kid. Save yourself the time...
johndoe0815··on Rehabilitate Nixon
Right-wing drivel by Axel Springer-owned Politico (publisher of the infamous "Bild" tabloid in Germany) trying to rewrite history. Flagged.
johndoe0815··on Multiple microprocessors as a single CPU (not multiprocessing)
Here's an interesting discussion thread in comp.sys.apollo from 2003:

https://groups.google.com/g/comp.sys.apollo/c/55dqpf11hEw/m/...

The setup was more complex than I described, as the second 68000 did not simply wait for a page fault to happen but was executing regular code (unclear if application only or also OS kernel, but the code was not allowed to raise page faults, user processes usually ran on one CPU, see the last quote below) and only handled the fault on the other CPU when interrupted by the MMU.

Unfortunately, the only versions of Aegis/DomainOS available online seem to be 10.x (on bitsavers), but support for the "sau1" 68000-based systems (DN100/DN400/DN416) ended with version 9.x, so we can't have a look at the code implementing this feature.

Interesting quotes from the thread:

"The two processors were called "A" and "B" and processes could be marked runnable on A or on B or both. It was almost a multiprocessor, except that you couldn't run anything that might take a page fault on both at the same time." (by Jim Rees, who runs the Apollo archive at https://jim.rees.org/apollo-archive/)

The answer to the following question was posted by Dave Tweed, a former Apollo engineer who worked on the MMU design for later Apollo workstations (see his resume at http://www.dtweed.com/resume2.html):

"> Hmm. So how did CPU B know that this was needed? It sounds like they > weren't running the same code, after all.

No, of course not. The MMU was external to both CPUs, and when one CPU encountered a page fault, the MMU would interrupt the other CPU to handle the exception.

The CPUs shared the main memory, so in that sense they were running the same code -- e.g., there was only one copy of the exception handler that either CPU could run. But they were not lock-stepped the way the OP described. I can't even imagine how you'd accomplish that in general."

However, from another thread, also by Jim Rees (https://groups.google.com/g/comp.sys.apollo/c/GzEtBHVHEvA/m/...):

"Back in the good old days, the 68000 was the only Motorola processor available. It did not have restartable instructions, so you couldn't do VM with them. Early Suns didn't have VM, they squeezed everything into real memory, like a pdp-11. Early Apollos had an ingenious VM system. There were two processors, the 'A' and the 'B'. One of them would run until it took a page fault, then it would go into a memory wait while the other one brought the page in.

It's not really parallel in the usual sense of the word, but there were certain things that could run on either processor, and in fact you could have both of them running at the same time. Normal user processes only ran on one."

What a fascinating rabbit hole...

johndoe0815··on Multiple microprocessors as a single CPU (not multiprocessing)
Swapping (in the context of old Unix) is always replacing (copying) an entire process address space (or at least the non-shareable read-write segments such as .data), out to the swap device, or back, in one go.

Paging is more advanced as it allows to keep only a part of the memory required by a process in RAM and contents can be loaded or moved to secondary storage on the granularity of single pages (typically 4 kB, but larger pages are also common nowadays). So a typical exec(2) system call in Unix could set up a new page table which contains no single byte of the executable in the beginning and then jump to the executable's entry point. This, in turn, results in a page fault, in turn, the OS can then load the requested page into RAM.

Paging is more efficient since control/data flow analyses show that something similar to the Pareto rule (or 80/20 rule) also applies to programs which are executed - 80% of the time, only 20% of the address range (for instructions and/or data) is used. With paging, the OS won't need to load any code or data from disk that is never used (and can load it on demand later).

What's probably confusing is that the area reserved on disk for storing RAM contents (a partition or a file) is still called "swap partition/file". This is an old term that refuses to die, I guess...

johndoe0815··on Multiple microprocessors as a single CPU (not multiprocessing)
Please note that I can't confirm that Apollo used this approach - the earliest Apollo workstation I know (the DN300) used a 68010 already. I would love to hear more details on this...

I'm also not sure which approach early SGI workstations used (the Iris 1000 series), documentation on those is extremely hard to find.

johndoe0815··on Multiple microprocessors as a single CPU (not multiprocessing)
Another not quite that interesting approach (more of an I/O coprocessor) was used when you put a Z80 CP/M "Softcard" into a (6502-based) Apple II.

Steve Wozniak's floppy controller was very simple on the hardware side (more or less only a state machine implemented in a PROM), so most of the data serializing/deserializing and GCR de/encoding was done in software on the 6502. This was very timing-critical, so implementing this in Z80 code for CP/M instead would have been a challenge.

Instead, the Z80 on the Softcard called 6502 routines to handle disk (and other) I/O. Usually, the 6502 is stopped when running Z80 code, but it had to be woken up frequently not only for I/O accesses, but also to ensure that the 6502 did not lose its register values, which are stored in dynamic memory cells in the (non-CMOS) 6502.

johndoe0815··on Multiple microprocessors as a single CPU (not multiprocessing)
I hope it's ok to answer here instead of on vcfed.org since I don't want to create yet another account...

Sun workstations did not use the dual 68000 approach to handle VM. The problem with the 68000 was that it didn't save enough information on the stack when an exception occurred (e.g. a page fault), so a faulting instruction could not be recovered/re-executed in all cases.

Sun solved this by using "harmless" instructions such as "tst" that did non have to be recovered in case of a page fault. The OS could then kick in, load the contents to memory and just skip the failed instruction. This required changes to the compiler, e.g. when creating a new stack frame that would have required to extend the stack size. For paging, this approach would cause significant overhead. However, the first versions of SunOS which ran on the Sun 1 workstations were based on 7th Edition Unix and used only swapping.

The 68010, used in the Sun-2 workstation, fixed the restarting problem by saving sufficient state to the stack, so SunOS could switch to an early BSD release as its basis.

AFAIK, the dual 68000 approach was used by early Apollo workstations instead. The way I understand it is that the second processor was idling until a page fault occurred. The 68000 has an asynchronous bus which requires an explicit acknowledge (/DTACK) to indicate that data (e.g. from slow memory) has arrived. This feature was used by the Apollos - the second 68k would kick in while /DTACK on the first 68k was deasserted, handle the required virtual memory operations, and then indicated that the first CPU can continue working. So here, no bus error was indicated (which would have caused the restarting problem), but the virtual memory behaved like a very slow physical memory. Apollos were able to perform remote memory accesses to other machines over the TokenRing interface (which was about as fast as memory accesses - 12 Mbit/s IIRC), so this feature was much more useful for DomainOS than for early Unix systems.

johndoe0815··on Albania to use ChatGPT for translating EU laws to Albanian
...what can go wrong? :O
johndoe0815··on Why so many new immigrants are leaving Canada?
"This Article is Exclusive to Subscribers"
johndoe0815··on Coherent: The affordable Unix-like PC OS from over a decade before Linux 0.01
Compiled binaries (gcc and more) and VMs with Coherent 4.2 installations can be found on Udo Munk's site: https://www.autometer.de/unix4fun/coherent/ftp/
johndoe0815··on Coherent: The affordable Unix-like PC OS from over a decade before Linux 0.01
Coherent was published by Mark-Williams, who also had their own C compiler (MWC), which was also available for CP/M86 and the Atari ST. It's a K&R compiler, so expect some trouble with compiling modern code (unprotoize might help a bit here).

The final releases of Coherent (4.2 is the last one IIRC) also fully supported the iBCS COFF binary standard, so binaries compiled for e.g. SCO Unix might work.

You could also try to build an old gcc version with the provided K&R compiler: https://www.autometer.de/unix4fun/coherent/coh_prog.html

johndoe0815··on Fixed the UART Interrupt and Platform-Level Interrupt Controller (Ox64 BL808)
The site seems to be down, but it was successfully mirrored at archive.org:

https://web.archive.org/web/20231209230622/https://lupyuen.c...

Edit: up and running again...

johndoe0815··on Ask HN: After Charles Petzold's Code and Nand2Tetris, What Next?
If you want to continue learning about computer architecture, I would recommend David Harris' and Sarah Harris' book "Digital Design and Computer Architecture", available in MIPS, ARM and RISC V editions.

https://pages.hmc.edu/harris/ddca/

An interesting second book that makes the connection to the software side is Bryant/O'Hallaron "Computer Systems: A Programmer's Perspective"

https://csapp.cs.cmu.edu

...and, more on the theory side, both books by Hennessy and Patterson ("Computer Architecture: The Hardware/Software Interface" and "Computer Architecture: A Quantitative Approach").

On the OS implementation side, I still like Comer's "Operating System Design: The Xinu Approach" quite a lot. While this book is quite old, I learned OS design from Comer (and am still teaching this at university level 30 years later...).

https://xinu.cs.purdue.edu

A good complement would be Cox/Kaashoek/Morris "xv6: a simple, Unix-like teaching operating system" (free download)

https://pdos.csail.mit.edu/6.S081/2020/xv6/book-riscv-rev1.p...

A useful addition on OS theory is Remzi and Andrea Arpaci-Dusseau's "Operating Systems: Three Easy Pieces" (also free)

https://pages.cs.wisc.edu/~remzi/OSTEP/

If you want to dig into programming languages, I would recommend Cooper/Torczon "Engineering a Compiler" (unfortunately published by Elsevier) and "Crafting Interpreters" by Nystrom (free)

https://shop.elsevier.com/books/engineering-a-compiler/coope...

https://craftinginterpreters.com

Finally, if you're interested in virtualization (system and bytecode level), I can recommend Smith/Nair "Virtual Machines"

https://www.sciencedirect.com/book/9781558609105/virtual-mac...

I use many of these books in my courses and recommend them to my students - so far, they seem to like the books:

(My OS course at NTNU) https://multicores.org/tdt4186_22/

(My Compiler Construction course at NTNU) https://multicores.org/tdt4205_21/

I hope this helps a bit. Learning all of this will be quite a challenge but also bring a lot of fun! :)

johndoe0815··on Is Henry Kissinger a War Criminal?
One of the rare questions in a headline that you can answer with certainty with yes...
johndoe0815··on [dead]
"This post is for paid subscribers." Flagged.
johndoe0815··on MacBook Pro 'Dustgate' Problem Is Breaking Apple Laptop Displays
Only late x86-based Macbooks seem to be affected according to the article. Time to upgrade to Apple Silicon? :)
johndoe0815··on Computer History books most relevant to today?
Two interesting books about Unix might be interesting - one was written by Peter Salus almost 30 years ago and the other one was written in 2019 by Brian Kernighan for Unix' 50th anniversary:

Salus, Peter H. (1994). A Quarter Century of UNIX. Addison Wesley. ISBN 978-0-201-54777-1.

Kernighan, Brian W. (2019). UNIX: A History and a Memoir. Independently published. ISBN 978-1695978553.

johndoe0815··on I solved SAT (boolean satisfiability), what now?
Prove it…
← PreviousPage 7 of 26Next →