TweetFollow Us on Twitter

August 91 - Re: Segments from Outer Space

Re: Segments from Outer Space

Jeff Alger

Jeff Alger replies to Kent Sandvik's "Children of the DogCow-Segments from outer space", which appeared in the June 1991 issue of FrameWorks.

Kent,

I'm writing to take issue with two things said regarding segmentation vs. VM in your otherwise excellent article on segmentation in the June Frameworks. Just setting the record straight.

First, you mentioned Unix thrashing is due to page after page being loaded as a thread of function calls is followed. As someone who has worked with Unix systems for almost 15 years now, that is the least likely reason for a thrash-and when it does occur, it is a symptom, not the disease. In almost all Unix thrashing, the problem is simply that you are trying to run too many applications with too big a cumulative space requirement at once. If you were using a Mac, you couldn't even make the attempt, so it is poor sportsmanship to knock Unix for at least trying.

The Mac forces you to partition the memory space, with fixed-size allocations per process, while Unix allows the VM hardware to allocate memory across applications as demand shifts. A classic prescription for this kind of thrashing in Unix is to use shared libraries, something that segmentation actually discourages (jump tables are application-specific, as are the memory spaces used to load the segments). In short, Unix does thrash, but only after it has far surpassed the Mac scheme's ability to juggle the same load.

The second thing that I wanted to comment on is your claim that segmentation solves tight memory problems better than VM. If someone at Apple has been able to prove this with real numbers or some sort of statistical model-quick! nominate them for a Turing Award. Maybe he or she can next develop a generalized sorting algorithm with better than n*log(n) performance. If asked, I'll certainly back the nomination.

Humor aside, the only reasons that segmentation is a better strategy than VM for the Mac are backward software compatibility, compatibility with non-VM Macs, and the fact that a reliable VM kernel is more difficult to implement than simply forcing applications to do their own housekeeping.

Performance of a segmented system must be worse than a VM system for so many reasons, I don't know where to begin: segmentation results in less efficient allocation of memory across the whole machine, since process sizes are fixed, while VM automatically balances memory usage among competing processes; segmentation results in larger swaps than the standard 4K page size of VM; VM allows seldom-used data to be swapped, while segmentation deals only with code; segmentation is a software-only solution, while VM is implemented in low-level hardware (in on-chip hardware for 68030's and 040's); segmentation is not suited to interrupt-time swapping, or for that matter, interrupt-driven multitasking, since it only applies at the start of a function call, while VM allows swap-outs to happen any time without damage; segmentation leads to the need for larger reserves of space-worse, larger reserves for each process-since memory is used less efficiently and an entire segment must be loaded in order to recover from a fault; less efficient use of space also results in more swapping, fewer processes, or both; segmentation works against sharing code across applications and creating truly integrated object-oriented operating systems and applications, since it forces an application, rather than system, perspective on memory usage… I'm out of breath.

Kent, I'm not unloading on you personally, but I am getting tired of the lack of justification from Apple for segmentation vs. VM. At first, I sat back and waited for a good explanation, but none has come out in the couple of months this issue has been thrashed out (if you'll excuse the pun) on MacApp.Tech$. Just recycled potshots. Does anyone have any real numbers, or is this just a "let's trash Unix because we didn't invent it"-party?

Your article was great otherwise, and I learned a lot from it. Keep up the good work, in FrameWorks and in your responses to MacApp.Tech$. You're doing a good job of filling Keith's shoes.

Regards-Jeff

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Combo Quest (Games)
Combo Quest 1.0 Device: iOS Universal Category: Games Price: $.99, Version: 1.0 (iTunes) Description: Combo Quest is an epic, time tap role-playing adventure. In this unique masterpiece, you are a knight on a heroic quest to retrieve... | Read more »
Hero Emblems (Games)
Hero Emblems 1.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: ** 25% OFF for a limited time to celebrate the release ** ** Note for iPhone 6 user: If it doesn't run fullscreen on your device... | Read more »
Puzzle Blitz (Games)
Puzzle Blitz 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Puzzle Blitz is a frantic puzzle solving race against the clock! Solve as many puzzles as you can, before time runs out! You have... | Read more »
Sky Patrol (Games)
Sky Patrol 1.0.1 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0.1 (iTunes) Description: 'Strategic Twist On The Classic Shooter Genre' - Indie Game Mag... | Read more »
The Princess Bride - The Official Game...
The Princess Bride - The Official Game 1.1 Device: iOS Universal Category: Games Price: $3.99, Version: 1.1 (iTunes) Description: An epic game based on the beloved classic movie? Inconceivable! Play the world of The Princess Bride... | Read more »
Frozen Synapse (Games)
Frozen Synapse 1.0 Device: iOS iPhone Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: Frozen Synapse is a multi-award-winning tactical game. (Full cross-play with desktop and tablet versions) 9/10 Edge 9/10 Eurogamer... | Read more »
Space Marshals (Games)
Space Marshals 1.0.1 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0.1 (iTunes) Description: ### IMPORTANT ### Please note that iPhone 4 is not supported. Space Marshals is a Sci-fi Wild West adventure taking place... | Read more »
Battle Slimes (Games)
Battle Slimes 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: BATTLE SLIMES is a fun local multiplayer game. Control speedy & bouncy slime blobs as you compete with friends and family.... | Read more »
Spectrum - 3D Avenue (Games)
Spectrum - 3D Avenue 1.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: "Spectrum is a pretty cool take on twitchy/reaction-based gameplay with enough complexity and style to stand out from the... | Read more »
Drop Wizard (Games)
Drop Wizard 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Bring back the joy of arcade games! Drop Wizard is an action arcade game where you play as Teo, a wizard on a quest to save his... | Read more »

Price Scanner via MacPrices.net

Deal Alert! Mac Studio with M4 Max CPU on sal...
B&H Photo has the standard-configuration Mac Studio model with Apple’s M4 Max CPU in stock today and on sale for $300 off MSRP, now $1699 (10-Core CPU and 32GB RAM/512GB SSD). B&H also... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.