Lunduke
News • Science & Tech
Make Computers Fun Again - Linux, UNIX, Alternative Operating Systems, Computer History, and Retro Computing. Also dad jokes.
Interested? Want to learn more about the community?
September 19, 2022

I got a mad idea, and I blame DOS week for. The background for this is special_snowflake, the FOSH computer I've been building/writing for the last 5 years. Without going into all the details (because then I'll be here for two days), its new CPU is registerless and directly reads and writes into main memory for all instructions. To make it performant, the "main memory" is 0.5-8 KiB is size and treats the actual RAM as expanded memory, copying bits of it in and out. Like a disk. Now, that leaves me with the question of organization of this expanded memory. I decided I won't go the normal route and I won't implement a virtual memory system. Which leaves me with the question of what to do.

And then it occured to me yesterday. What IF you treated your expanded memory as a literral disk and put FAT on it? To allocate memory, processes create a file of some size. Processes can pass memory objects to each other by passing filesystems paths around. All memory objects are dynamically sized. Some implementations of FAT (DR-DOS 6.0 and others) track user&group ID as well as access permissions for them. You could literally implement the well-understood-by-sysadmins Unix filesystem permissions model for all memory! Super important: a single categorization unites ALL of memory which means ALL of memory is always accounted for. Modern systems have all kinds of weird kinks. Inodes, sysfs, procfs, netlink, ioctl, device nodes, semaphores, muliple kinds of sockets, multiple namespaces for all those kinds of sockets, acl, quotas, memory maps, process trees, uids and guids, mounts, etc, etc... If you put all of those into a filesystem, you suddenly make them all observable and manipulable. Another benefit: it's now possible to dump the entire contents of memory to real disks and examine them or change them. Messing with system internals is now easier than ever! And the best part? Both the running memory and the disk image of it can be manipulated with normal filesystem tools!

This can be made to play real nice in a microkernel design with lots of system daemons offering services. I already checked the extensive Wikipedia article on FAT and I found that it practically nativelly supports being used for this purpose. You would need to repurpose some fields from what Microsoft uses them for, but this is a long and time-honoured tradition. The article (linked below) lists several mutually incompatible standards for various data structures that were all used in parallel by several operating systems from several vendors.

Besides breaking the Microsoft's non-standard on FAT, there are two other problems I can see. The first is that my CPU is big-endian and FAT is used on little-endian machines which means the multi-octet fields will be messed up. That can be lived with - this will only come into effect if somebody attempted to mount the memory image on a little-endian machine, but that can be fixed by the appropriate filesystem driver.

The much bigger problem - and the only serious problem I've so far seen - is that FAT keeps track of file contents in a singly linked list. That's.... inapropriate for quick access. :) Since the use of this scheme implies there is only one daemon which manages the memory filesystem for all other applications, and since this is the only place where file handles (or whatever) is handed out, this limitation can be worked around. The filesystem daemon could keep a special structure for all open files/assigned file handles which has a map to all clusters that are part of the file. So if you want to randomly access parts of a large file, the FS daemon doesn't have to read the entire FAT from the start, it can just read from its map. But the problem is that, since this is a memory management scheme, most files can be expected to be open. Which would mean most files would have an associated fast-access map. But then the question is why have the FAT, if most access is going through the map?

Another mitigation strategy is to take care to have the memory defragmented, and then try to assign memory in large contiguous blocks of clusters. That way, if the random access happens inside such a large block, working out the sector (=page) that is to be accessed should be straightforward. The access map cache from the previous paragraph then only needs to keep track of starts and lenghts of blocks. The scheme is simpler, requires less overhead, and should benefit from the last four decades (!) of improvements to FAT drivers and algorithms.

This manage-memory-as-a-filesystem idea can BTW also be implemented on normal registered CPUs, by having some pages (in the reserved section between the sector 0 and the first FAT table xD ) function as faux main memory for currently running processes and the rest used in the FAT.

Wikipedia page on FAT: https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system

Interested? Want to learn more about the community?
What else you may like…
Videos
Podcasts
Posts
Articles
GIMP 3.0 RC Released!

20 years after the release of GIMP 2.0, version 3 has a "Release Candidate" available!

00:08:52
Mozilla Foundation Mass Layoffs, Axes Advocacy

With nosediving marketshare, upcoming loss of Google funding, & a shift to advertising... this was inevitable.

00:21:18
November 04, 2024
Will Voting Machines Get Hacked? Almost Certainly.

Huge number of targets, high value, & many exploits makes voting related hacking a certainty.

00:28:10
November 22, 2023
The futility of Ad-Blockers

Ads are filling the entirety of the Web -- websites, podcasts, YouTube videos, etc. -- at an increasing rate. Prices for those ad placements are plummeting. Consumers are desperate to use ad-blockers to make the web palatable. Google (and others) are desperate to break and block ad-blockers. All of which results in... more ads and lower pay for creators.

It's a fascinatingly annoying cycle. And there's only one viable way out of it.

Looking for the Podcast RSS feed or other links? Check here:
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

The futility of Ad-Blockers
November 21, 2023
openSUSE says "No Lunduke allowed!"

Those in power with openSUSE make it clear they will not allow me anywhere near anything related to the openSUSE project. Ever. For any reason.

Well, that settles that, then! Guess I won't be contributing to openSUSE! 🤣

Looking for the Podcast RSS feed or other links?
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

openSUSE says "No Lunduke allowed!"
September 13, 2023
"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044

This episode is free for all to enjoy and share.

Be sure to subscribe here at Lunduke.Locals.com to get all shows & articles (including interviews with other amazing nerds).

"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044
It’s Nerdy Q & A time!

You know the drill. Ask me a question. Any question at all. Just make sure it’s good and nerdy.

(Retro computers, programming, modern computing, tech news, advice, hypothetical, you name it.)

Post that question in the comments of this post on Locals.

Then give the thumbs up to your favorite questions.

I’ll sort by “most liked” and answer as many as I can.

Aaaand… GO.

Okay, so I'm still very much in the great country, behind the great wall, but there is so much tech to talk about!

Of course that is not why I am in the country, but since the other part is my wife's private matters I'll just report on the tech :)

First of all, the Chinese cars are amayzing. We take Didi (chinese Uber) everywhere, and for under 10 yuan (€1.25) you have a 1 mile ride in the inner city.
The cars themselves all look like fancy minimalist teslas on the inside, with huge dashboard computers and often neon lighting.

The e-hailing system reports on the arrival time of your ride, but also shows where it is, and the amount of seconds it is stuck behind a red light (live countdown). My wife loves it. During the ride you can check your app if the driver is following the agreed route as well.

Authentication of the ride is by license plate, authentication of yourself is by communicating the last four digits of your phone number. This functions as a password for the didi mini-app to confirm ...

Just sitting in the car on a pseudo smoke break (I don't smoke) and working on a personal project using the Mattbook. I just love this thing. It is partially because we made it ourselves but also because it is just such a good little computer. I mean it is really not that LITTLE but I think this is a good point. I mean UMPCs of the past have been glorious but really it was a novelty factor that was the main pull. Trying to do real work using them was an exercise in stress that was also (if I am being completely honest) kind of fun. Still I think the Mattbook size is near perfect. The chonk is unfortunately not that perfect. BUT this is what is required to make it repairable and upgradable and for me this is a worthwhile compromise.

I don't squint to see the screen. I don't get finger cramps to type on the keyboard. I have a full up 13th gen i7 with 64gb of RAM in here. I can do everything on this computer. It could be my only computer. To me this just feels like success.

With Intel ...

November 03, 2024
post photo preview
Last week at The Lunduke Journal (Oct 20 - Nov 2, 2024)
Linux v. Russia! Internet Archive Weirdness! RISC OS Web Browsing!

Ok, first off: I totally forgot to publish a "week in review" article last week.  Woops.  My bad.  So this article covers the last two weeks.

Second: Over the last 14 days, apparently there's been 16 shows.  Hot dang.

And the news has been all over the map!  The big story, obviously, was the "Linux v. Russia" craziness.  The really wild part of that story is that it's still ramping up.  The next month is going to see some wild stories relating to open source software and sanctions compliance.

Oh!  Oh!  And the Internet Archive stuff!  Insane!

But, you know what my absolute favorite news story was for the last two weeks?  The one about RISC OS having WiFi and a modern web browser now.  That story just made me happy.  It's nice to know that, even when various software companies and organizations are losing their darned minds... there's still bright spots of nerdy joy out there.

The Shows

The Articles

Read full Article
November 02, 2024
post photo preview
Apple Removes Ability to Run Unsigned Apps in macOS 15.1
Big Tech's war against "sideloading" continues.

On Monday, October 28th, Apple released the macOS 15.1 update.  And, with that update, Apple has ratcheted up their war on "sideloading" by completely disabling the ability to run unsigned macOS software.

And signing software, of course, requires an Apple Developer Connection subscription.  Which, for most people, is a costly thing.

 

Every Few Months, A Little Less Freedom

 

Just a little over one month ago (September of 2024), the initial release of macOS 15.0 brought with it a new round of restrictions on running non-signed (also called "non-notarized") applications.  With 15.0, users could still run non-signed software... but they needed to jump through a few extra hoops by openning the System Settings and manually enabling each application they wanted to run.

 

 

This change made running unsigned software on macOS a bit more annoying -- additional steps to do something that used to be a simple "double click on the darned icon" process.  Annoying, to be sure.  But, luckily, all software could still be run.

That all changed -- less than 45 days later -- as Apple released the 15.1 update to macOS, which included the removal of the "Click around in System Settings" option to allow unsigned apps to run.

Now, in 15.1, when you attempt to run a non-notarized piece of Mac software, you will be greeted by a simple error message: "The application 'Finder' does not have permission to open '(null)'."

 

 

No option to run the software whatsoever.  Effectively banning all non-signed software (such as those developed by a hobbyist).

 

The War on Sideloading Continues

 

This isn't exactly a surprising move by Apple.  Over the last few years, all of the Big Tech operating system companies (Microsoft, Apple, and Google) have pushed -- with increasing intensity -- to lock down what software users are allowed to run on their computers.

Increasingly restrictive "application signing" systems, and the removal of "features" which allowed non-signed applications to run, have been a stated goal of all three corporations.

All in the name of a war on, what Big Tech has termed, "Sideloading".

What is "Sideloading", you ask?

"Sideloading" is most simply defined as "The act of installing software on a real computer."  And Apple, Google, & Microsoft are determined to stop people from doing that.

 

 

These companies haven't exactly been quiet about their goal to stop people from installing software on their computers (outside of approved, heavily restrictive mechanisms).  Back in 2021, Apple published a whitepaper entitled "Building a Trusted Ecosystem for Millions of Apps - A threat analysis of sideloading".

 

 

That's right.  Apple considers you having the freedom to install whatever software you want on the computer you own -- something every real computer (including those made by Apple) have done since the dawn of Personal Computing -- to be a "threat".

With macOS 15.1, Apple is taking significant steps to neutralize that "threat".

No software freedom for you.

 

The Last Workaround

 

As of now -- with macOS 15.1 -- there remains one final way to work around these draconian and artificial restrictions.

To do so requires the complete disabling of "Gatekeeper", the system which verifies downloads and restricts the running of non-signed applications.

This can be done via a fairly simple terminal command run as root:

 

sudo spctl --master-disable

 

However, it should be noted that with Apple's ever increasing requirements of application "notarization" -- and increasing reliance on the Mac App Store for software distribution (which ties into Gatekeeper) -- the full disabling of "Gatekeeper" seems likely to cause issues going forward with "Apple approved" methods of installing software.

Likewise, at Apple's current rate of attacks against "sideloading", the ability to turn off Gatekeeper may not be long for this world at all.

 

Don't Laugh, Google & Microsoft Users

 

While the news, today, is focused on Apple (their fight against the most basic freedoms of computing -- the ability to run software)... both Microsoft and Google have made it clear that they are all in on the war against sideloading.

Case in point: Google is migrating Android software away from "APK" application packages... to the far more restrictive "AAB" application bundles.  Microsoft, likewise, is pushing for a reliance on their online store.

So users of Android, ChromeOS, & Windows shouldn't laugh.  You're next.

Users of a variety of open source, alternative operating systems (such as Linux, BSDs, and many others), however, can laugh all they want.

Read full Article
November 02, 2024
post photo preview
Funny Programming Pictures Part LXII
Number 7 will SHOCK you!

No Ctrl-C's were harmed in the making of this post.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read full Article
See More
Available on mobile and TV devices
google store google store app store app store
google store google store app tv store app tv store amazon store amazon store roku store roku store
Powered by Locals