Flatland: Another Perspective Mac OS

Dock
Operating systemmacOS
Service nameDock.app
TypeTaskbar
  1. Flatland: Another Perspective Mac Os 8
  2. Flatland: Another Perspective Mac Os Sierra

Flatland: Another Perspective Mac Os 8

The Dock is a prominent feature of the graphical user interface of macOS. It is used to launch applications and to switch between running applications. The Dock is also a prominent feature of macOS's predecessor NeXTSTEP and OpenStep operating systems. The earliest known implementations of a dock are found in operating systems such as RISC OS and NeXTSTEP. iOS has its own version of the Dock for the iPhone and iPod Touch, as does iPadOS for the iPad.

  1. A Macintosh clone is a computer running the Mac OS operating system that was not produced by Apple Inc.The earliest Mac clones were based on emulators and reverse-engineered Macintosh ROMs.During Apple's short lived Mac OS 7 licensing program authorized Mac clone makers were able to either purchase 100% compatible motherboards or build their own hardware using licensed Mac reference.
  2. In the perspective view, click the left mouse button at the lower left and upper right corners to specify the X and Z grid dimensions of the base or top of the 3D grid— don’t press (Windows and Linux) or (Mac OS X) yet. Move the cursor into the front view or side view. Press the (Windows and Linux) or (Mac OS X) key to enter edit mode.
  3. Flatlandspider said: I think that was more because they had to handle resource forks for backwards compatibility to Mac OS 9. This, by now irrelevant. The next thing now is.
  4. Fez is an indie puzzle-platform video game developed by Polytron Corporation and published by Trapdoor.The player-character Gomez receives a fez that reveals his two-dimensional (2D) world to be one of four sides of a three-dimensional (3D) world.

The dock found in Mac OS X 10.1 to 10.4 removes the pinstripes, but otherwise is identical. Mac OS X 10.5 to 10.7 presents the applications on a three-dimensional glassy surface from a perspective instead of the traditional flat one, resembling Sun Microsystems' Project Looking Glass application dock.

Apple applied for a US patent for the design of the Dock in 1999 and was granted the patent in October 2008, nearly a decade later.[1] Any application can be dragged and dropped onto the Dock to add it to the dock, and any application can be dragged from the dock to remove it, except for Finder and Trash, which are permanent fixtures as the leftmost and rightmost items (or highest and lowest items if the Dock is vertically oriented), respectively. Part of the macOS Core Services, Dock.app is located at /System/Library/CoreServices/.

Overview[edit]

OpenStep Dock

In NeXTSTEP and OpenStep, the Dock is an application launcher that holds icons for frequently used programs. The icon for the Workspace Manager and the Recycler are always visible. The Dock indicates if a program is not running by showing an ellipsis below its icon. If the program is running, there isn't an ellipsis on the icon. In macOS, running applications have been variously identified by a small black triangle (Mac OS X 10.0-10.4) a blue-tinted luminous dot (Mac OS X 10.5-10.7), a horizontal light bar (OS X 10.8 and 10.9), and a simple black or white dot (OS X 10.10-present).

In macOS, however, the Dock is used as a repository for any program or file in the operating system. It can hold any number of items and resizes them dynamically to fit while using magnification to better view smaller items. By default, it appears on the bottom edge of the screen, but it can also instead be placed on the left or right edges of the screen if the user wishes. Applications that do not normally keep icons in the Dock will still appear there when running and remain until they are quit. These features are unlike those of the dock in the NeXT operating systems where the capacity of the Dock is dependent on display resolution. This may be an attempt to recover some Shelf functionality since macOS inherits no other such technology from NeXTSTEP. (Minimal Shelf functionality has been implemented in the Finder.)

The changes to the dock bring its functionality also close to that of Apple's Newton OSButton Bar, as found in the MessagePad 2x00 series and the likes. Applications could be dragged in and out of the Extras Drawer, a Finder-like app, onto the bar. Also, when the screen was put into landscape mode, the user could choose to position the Button Bar at the right or left side of the screen, just like the Dock in macOS.

The macOS Dock also has extended menus that control applications without making them visible on screen. On most applications it has simple options such as Quit, Keep In Dock, Remove From Dock, and other options, though some applications use these menus for other purposes, such as iTunes, which uses this menu as a way for a user to control certain playback options. Other Applications include changing the status of an online alias (MSN, AIM/iChat etc.) or automatically saving the changes that have been made in a document (There is no current application with this feature made available for macOS). Docklings (in Mac OS X 10.4 or earlier) can also be opened by using the right-mouse button, if the mouse has one, but most of the time either clicking and holding or control-click will bring the menu up.

Flatland: Another Perspective Mac Os Sierra

Stacks in grid view.

In Mac OS X Leopard, docklings were replaced by Stacks. Stacks 'stack' files into a small organized folder on the Dock, and they can be opened by left-clicking.Stacks could be shown in three ways: a 'fan', a 'grid', or a 'list', which is similar to docklings. In grid view, the folders in that stack can be opened directly in that stack without the need to open Finder.

In iOS, the dock is used to store applications and, since iOS 4, folders containing applications. Unlike the macOS dock, a maximum of 4 icons can be placed in the dock on the iPhone and the iPod Touch. The maximum for the iPad however is 16 icons (13 apps and 3 recently opened apps). The size of the dock on iOS cannot be changed.

When an application on the Dock is launched by clicking on it, it will jump until the software is finished loading. Additionally, when an application requires attention from a user, it will jump even higher until its icon is clicked and the user attends to its demands.

Design[edit]

The dock, as it appears in OS X 10.8 to 10.9

The original version of the dock, found in Mac OS X Public Beta to 10.0, presents a flat white translucent interface with the Aqua styled pinstripes. The dock found in Mac OS X 10.1 to 10.4 removes the pinstripes, but otherwise is identical. Mac OS X 10.5 to 10.7 presents the applications on a three-dimensional glassy surface from a perspective instead of the traditional flat one, resembling Sun Microsystems' Project Looking Glass application dock.[2] OS X 10.8 to 10.9 changes the look to resemble frosted glass with rounded corners. OS X 10.10 and later revert to a two-dimensional appearance, similar to Mac OS X 10.4, although more translucent and with a iOS 7 blur effect.

In iPhone OS 1 to 3, the dock used a metal look which looks similar to the front of the Power Mac G5 (2003-2005) and Mac Pro(2006-2012 or 2019-). iPhone OS 3.2 for iPad and iOS 4 to 6 adopted the dock design from Mac OS X 10.5 to 10.7 which was used until iOS 7, which uses a similar dock from Mac OS X Tiger but with iOS 7 styled blur effects.[citation needed] In iOS 11, the dock for the iPad and iPhone X is redesigned to more resemble the macOS dock.[3][4]


Related software[edit]

The classic Mac OS does have a dock-like application called Launcher, which was first introduced with Macintosh Performa models in 1993 and later included as part of System 7.5.1. It performs the same basic function.[5] Also, add-ons such as DragThing added a dock for users of earlier versions.

Microsoft implemented a simplified dock feature in Windows 98 with the Quick Launch toolbar and this feature remained until Windows 7, where it was replaced by the Superbar, which implements functionality similar to the macOS Dock.

Various docks are also used in Linux and BSD. Some examples are Window Maker (which emulates the look and feel of the NeXTstep GUI), Docky, and Avant Window Navigator, KXDocker (amongst others) for KDE and various other gdesklet/adesklets docks, AfterStep's Wharf (a derivation from the NeXTstep UI), iTask NG (a module used with some Enlightenment-based Linux distributions such as gOS) and Blackbox's Slit.

Criticism[edit]

Bruce Tognazzini, a usability consultant who worked for Apple in the 1980s and 1990s before Mac OS X was developed, wrote an article in 2001 listing ten problems he saw with the Dock. This article was updated in 2004, removing two of the original criticisms and adding a new one. One of his concerns was that the Dock uses too much screen space. Another was that icons only show their labels when the pointer hovers over them, so similar-looking folders, files, and windows are difficult to distinguish. Tognazzini also criticized the fact that when icons are dragged out of the Dock, they vanish with no easy way to get them back; he called this behavior 'object annihilation'.[6]

John Siracusa, writing for Ars Technica, also pointed out some issues with the Dock around the releases of Mac OS X Public Beta in 2000. He noted that because the Dock is centered, adding and removing icons changes the location of the other icons.[7] In a review of Mac OS X v10.0 the following year, he also noted that the Dock does far too many tasks than it should for optimum ease-of-use, including launching apps, switching apps, opening files, and holding minimized windows.[8] Siracusa further criticized the Dock after the release of Mac OS X v10.5, noting that it was made less usable for the sake of eye-candy. Siracusa criticized the 3D look and reflections, the faint blue indicator for open applications, and less distinguishable files and folders.[9]

Thom Holwerda, a managing editor OSNews, stated some concerns with the Dock, including the facts that it grows in both directions, holds the Trash icon, and has no persistent labels. Holwerda also criticized the revised Dock appearance in Mac OS X v10.5.[10]

See also[edit]

References[edit]

  1. ^tweet_btn(), Austin Modine 8 Oct 2008 at 19:02. 'Apple patents OS X Dock'. Retrieved August 8, 2017.
  2. ^Leopard dock resembles Sun's Project Looking Glass? - Engadget
  3. ^Tepper, Fitz. 'iOS 11 brings drag-and-drop, windows and a file system to iPad TechCrunch'. Retrieved August 8, 2017.
  4. ^Gartenberg, Chaim (June 5, 2017). 'iPad gets overhauled multitasking and other major software updates in iOS 11'. The Verge. Retrieved August 8, 2017.
  5. ^Moore, Charles (October 2, 2001). 'Using the Mac OS Launcher'. Archived from the original on July 27, 2014. Retrieved July 28, 2014.
  6. ^Tognazzini, Bruce (January 1, 2004). 'Top Nine Reasons the Apple Dock Still Sucks'. Retrieved December 20, 2006.
  7. ^John Siracusa (2000). 'Mac OS X DP3: Trial by Water'. Ars Technica. Retrieved February 28, 2008.
  8. ^John Siracusa (2001). 'Mac OS X 10.0 - User Interface'. Ars Technica. Retrieved February 28, 2008.
  9. ^John Siracusa (October 28, 2007). 'Mac OS X 10.5 Leopard: the Ars Technica review'. Ars Technica. Retrieved February 28, 2008.
  10. ^Thom Howlerda (October 17, 2007). 'Common Usability Terms, pt. VI: the Dock'. OSNews. Retrieved February 28, 2008.
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Dock_(macOS)&oldid=1001316901'

Memory usage

If you're reading this article for tips on how to improve your Mac OS X experience, now's the time to pay attention. Aside from purchasing a new Mac, the most important thing you can do to make Mac OS X more bearable is to buy more RAM. Go ahead, don't be shy. 512MB sticks are going for as little as $50 if you look hard enough.

Frequent readers may recall that both the G3/400 and the dual G4/450 had only 256MB RAM at the time of the 10.0 review. After using 10.0.x for a few weeks on the G4, I got sick of hearing my disk grinding constantly and upgraded to 512MB. The silence that followed was truly golden. It was a bigger improvement than any of the 10.0.x upgrades, by far.

(Although the G3/400 primarily runs Mac OS 9, I upgraded it to 384MB because, well, RAM was too damn cheap not to, I guess.)

After a few weeks at 512MB, the G4 started to get a little grind-happy again. I shuffled some RAM between machines to boost the G4 again to its current total of 768MB, and noticed a nearly linear boost in 'smoothness' in daily use.

What's going on here? Where is all this memory going? Is Mac OS X a black hole for RAM? In a word, yes. But that's actually a good thing...sort of. I talked about Mac OS X's virtual memory system as it relates to the user experience and the infamous 'minimum required system' in the 10.0 article. I'd like to take a short break from the 'review' portion of this article and go into more detail about Mac OS X's memory system (as requested by numerous readers). Feel free to skip ahead to the summary if you're only interested in the RAM usage performance of 10.1 relative to 10.0.x.

(Note: A lot of the information presented below is heavily simplified in an effort to reach as broad an audience as possible. If you're interested in the gory details, picking up a good book on the topic is your best bet.)

Virtual Memory Basics

Mac OS X manages memory very differently than classic Mac OS. The first key to understanding memory usage in Mac OS X is to be understand how a modern virtual memory system works.

In a virtual memory management system, there is a distinction between real, physical memory and 'virtual' memory. An application's virtual memory size is the amount of memory the application thinks it has allocated, but only a (possibly very small) portion of that memory may actually be stored in the real, physical RAM chips sticking out of your computer's motherboard at any given time. The rest exists on disk in some form, usually in one or more 'swap files.'

The operating system decides what portion of which processes exist in physical memory at any given time. This decision process is complex, and varies from OS to OS, but it usually uses recent usage statistics in its decision making process. A process that has not accessed a particular piece of (real, physical) memory for a long time may find that memory written out to disk so that another more active process can use that piece of physical memory. When a process has a large portion of its memory removed from physical RAM and placed on the disk, it is said to be 'swapped out.'

If a process needs a previously swapped-out piece of memory again, it will be transferred from disk back into physical memory—possibly in a different location than its earlier home in physical memory. When a previously swapped-out application becomes active again and causes a large portion of its memory to move from disk back to physical memory, it is said to be 'swapped in.'

To simplify memory management, the operating system deals with memory in uniform units of a minimum size (usually 4K) called 'pages.' Swapping out a page is also called a 'pageout', and swapping in a page is called a 'pagein.' The policy used by the operating system to control memory management is often called the 'paging algorithm.'

Memory pages may store almost anything: code, data, even pieces of files. In fact, one of the useful features of virtual memory is that entire files may be 'memory mapped': a file on disk may be accessed as if it's a series of memory pages that have been swapped out to disk.

Further optimization is possible by allowing processes that need access to the same information (code, data, files) to share memory pages. Only when one of the processes sharing a particular memory page chooses to modify that page is a private copy created. This behavior is aptly named 'copy-on-write', and it allows many processes to efficiently share memory, with only the 'differences' allocated separately.

Not all memory may be swapped out. Some pages are 'wired down', meaning they may never leave physical memory during their lifetime. The memory pages that contain the operating system code that control the paging algorithm can never be swapped out, for instance (think about it). In fact, much of the operating system kernel is usually wired down.

Each active process needs some minimum portion of its memory pages to exist in physical memory in order to function efficiently. This portion is called the 'working set.' When the working set of all the active processes cannot fit in physical memory, the operating system must constantly shuttle pages to and from physical memory and the disk in a sort of game of musical chairs gone terribly wrong. A computer in this state is said to be 'thrashing.' The only cure is to either decrease the number active processes or buy more RAM.

The Buffer Cache

The second most important factor in Mac OS X's memory usage behavior is the buffer cache. The buffer cache is meant to speed up access to files on disk. Every time a piece of data is read from the disk, it may (optionally) be stored in memory. If that same piece of data is needed again in the near future, it may still be available in (physical) memory, saving a trip to the disk. Mac OS X implements a 'unified buffer cache', meaning that the buffer cache and the virtual memory system are combined. A page is a page is a page in Mac OS X.

Advertisement

The buffer cache affects RAM usage in ways that a Mac user may not expect. Heavy file i/o can use a lot of physical memory very quickly, potentially thinning out the physical memory presence of running applications. Poorly written applications may exacerbate this problem by using cached file i/o when it is not necessary, or even useful. An application that reads and parses a large file a single time during start-up should probably not use caching i/o, since it is not likely that the application will need those memory pages again some time in the near future before they're evicted from physical memory by another active process.

The Window Server

The final major player in the Mac OS X memory ballet is, perhaps surprisingly, the window server. The window server orchestrates access to the screen, including both low-level drawing and higher-level concepts like the movement and layering of windows.

As discussed in earlier articles, the Quartz display layer (of which the window server is an important part) models the screen as a layered compositing engine much like the layers in a graphics application like Photoshop. Each pixel has a red, green, and blue components, plus a so-called 'alpha channel' which determines its transparency, from totally opaque to totally invisible. The appearance of each pixel on the screen is determined by the composite of all the applications that have a pixel in that position. The window server calculates the composite of those pixels based on the layering and visibility of the participating pixels.

This provides the infrastructure for many of the 'pretty' effects in Mac OS X: the transparent drop-shadows on the windows, the translucent menus and title bars, etc. Each individual application only needs to worry about its own pixels, without regard for anything in front of or behind it. The window server then composites those pixels and draws the result to the screen. This makes application development simpler, leaving the 'hard work' of creating those nice on-screen effects to the operating system rather than each application.

Things get tricky again something on the screen has to move or change color (or transparency). The window server must re-composite every pixel changed by an application before the change can become visible to the user. And the compositing calculation needs not only the value of the changed pixel, but also the values of all other pixels that contribute to that position.

Think about the calculations necessary to do something as simply as move a window in Mac OS X. Every pixel of that window must be re-composited with every pixel of every application in each location for each new position of the window. Imagine a 500x300 pixel window (about 24 rows of 80 column text) moved 100 pixels to the right, with 5 other application windows behind it. That's about 15 million compositing calculations, each with 30 operands (red, green, blue, and alpha values for each contributing pixel from each application), all for moving a small window a few inches.

But wait, there's more. When something changes on the screen (a window moves, appears, or disappears), pixels belonging to other applications are revealed. Those pixels must, of course, be composited before they can be displayed, and those compositing calculations need all the pixel values for each application that has a pixel in the newly revealed area. Adding the compositing calculations associated with the newly revealed screen area in the moving window example above (and accounting for the transparent drop-shadow on the window) brings the grand total to almost 17 million 20-30 operand calculations!

Of course, this is a worst-case scenario that would only happen in a very naive implementation. Many optimization are possible. Solid pixels can abbreviate the number and difficulty of the compositing calculations tremendously, especially if the front-most pixel is solid.

But there's no getting around the fact that the window server still needs access to all the pixels of all the windows on the screen at all times, since it never knows when one of them will be required in a compositing calculation. Furthermore, this access needs to be very fast, since no one wants to wait while the OS reads pixels from a slow medium like disk.

Mac OS X provides the window server with fast access to pixels by making all windows 'buffered.' All the pixels of a buffered window are stored in in memory. When one of those pixels is needed in a compositing calculation, the window server simply reads the memory location corresponding to that pixel. It does not have to 'ask' the application for the pixel. In fact, an application may be entirely frozen and unresponsive, but its window can still be moved around, hidden, and revealed without any participation from the application. When an application wants to change its window, the changes are all sent through the window server, which updates the window's buffer to reflect the changes.

This is a big change from classic Mac OS, where each application drew directly to the screen, and any newly revealed portion of a window had to be re-drawn by the application that owned that window. Window buffering and compositing had to be implemented explicitly by each application that wanted it, and it was totally independent of any other running applications.

From a development perspective, buffered windows make applications easier to code. Drawing only has to be done once, after which portions of the window may be hidden and revealed without triggering any custom redraw code in the application. From a user's perspective, window buffering allows newly revealed windows to 'just be there,' with no visible redraw. Buffering also provides smooth, flicker-free window movement. Mac OS X even goes so far as to synchronize screen drawing with the sweep of the electron beam on CRTs to avoid flicker and 'tearing.'

Quartz's buffering is generally a good thing. It improves the visual quality of on-screen elements and it makes application development easier. But what does all of this have to do with memory usage?

Advertisement

We've already seen the potentially tremendous number of calculations required to composite items on the screen. These calculations are all done by the CPU in Mac OS X, and are not off-loaded to a video card's GPU. But surprisingly, this is not as large a CPU hit as you might expect, thanks to both the common case of totally opaque pixels and the speed of today's CPUs (yes, even on Macs). A few million calculations every once in a while may cause a some instantaneous load on the CPU, but it is not really a factor in the long term. That said, it would be great to have the video card do these calculations rather than the CPU—something I'm sure Apple is working on. In pathological cases (e.g. the famous shaking transparent terminal window) the CPU load can briefly become significant.

But it's the memory usage that's the real killer. Classic Mac OS applications only need to retain the essential information about each window: its size, features, and contents. Mac OS X applications have to retain the same information, of course, but remember that the window server also has to retain a complete memory image of every pixel in the window! Repeat this for every single window on the screen, and it adds up very quickly.

Classic Mac OS requires only a few kilobytes to store the basic structures that define a simple, empty window. In Mac OS X, the total memory required for even a completely empty window is proportional to its size, regardless of the nature of its contents (if any).

In my daily work as a web programmer, this difference is very apparent. The nature of the work requires many windows to be open at once: text editors, web browsers, terminals, etc. In classic Mac OS, each text editor window, for example, would require only a small amount of memory for the window itself, plus whatever backing store the editor keeps for the (ASCII) text in each window. In Mac OS X, each simple text editor window becomes a giant 32-bit image (in addition to the other information, of course). Multiply this phenomenon across all the other applications, each with many windows of their own, and you quickly run into trouble.

Perspective

Take a look at this window list from a typical work day on my G4. The total memory used by window buffers alone is an astounding 120MB! And remember, this is before even accounting for things like, say, the memory required by the actual applications and the core OS itself!

(The possibility of decreasing the window server's memory usage—and, more importantly, decreasing memory bandwidth usage—by compressing inactive window buffers is intriguing, but this feature is not officially supported in 10.1.)

The window server uses the same virtual memory system as every other part of OS X, of course. That means that the memory that makes up each window buffer is eligible to be paged out just like any other piece of memory. This is where the real performance hit comes in. Attempting to manipulate a window that has had some or all of its window buffer pages swapped out is a painful, stuttering, disk grinding experience as the virtual memory system rapidly tries to bring those pages back into physical memory from disk (evicting other resident pages while doing so, of course).

I encounter this phenomenon on a grand scale every time I return to work on Monday, after a weekend spent connected to the G4 via the command line running non-GUI applications from the terminal. On those Monday mornings, almost every window buffer is likely to have been swapped out during the weekend. The disk grinding session that ensues when all the windows are paged back in as I start to use them again is quite spectacular.

And remember, this is a system with 768MB of RAM. But the OS doesn't care. My command line work over the weekend required significant memory (compiling, running web servers, etc.), and the OS provided it. None of the GUI applications were active over the weekend, so their pages were swapped out to disk to make way for the memory needs of the command line activity. This is to be construed as a feature.

So, buffered windows: friend or foe? In the end, they are a friend. The OS X window server provides a higher level of abstraction to applications. With more abstraction comes more resource usage. But 'increased abstraction' is essentially the definition of progress in the computer industry (otherwise we'd all still be programming in machine language). But like much of the rest of OS X, pervasive window buffering is slightly ahead of current state of hardware. Long-term, this is also a good thing, in my opinion. It's easier to wait for hardware to catch up to your ambitious (but clean) software architecture than it is to try to revamp your operating system in response to advances in hardware (just ask Apple ;-)

Swap File Optimizations

Since it is possible to use up almost any amount of physical RAM in OS X (I fill 768MB very quickly), further performance gains are still possible by moving the swap file(s) to a separate disk. No matter how much RAM you have, you will almost certainly hit the swap file eventually. The disk heads on the drive containing the OS and applications will already be scurrying around as they read and write application and OS code and data files. Making the swap file another stop on their frantic journey just adds yet another voice to the cacophony of disk grinding. Swap file access is especially painful since is usually interleaved with other disk operations: read a piece of application code from disk into memory, write an old memory page out to the swap file, read a piece of a data file into the buffer cache, write an old memory page out to the swap file, read a piece of application code from disk into memory...etc. etc. (Can you hear the grinding? :-)

Putting the swap file on a disk mechanism of its own allows the heads on that disk drive to benefit from better locality of reference (i.e. they don't have to move around as much), and frees the application and OS drive to concentrate on its tasks. There is no Apple-sanctioned way to move the swap file to another drive, and certainly no GUI for it. But brave users can follow the directions available on the web. Just be sure to make a total backup first, because you can potentially hose your entire system if you're not careful.

I only have one disk at work, but at home I've moved my swap file from the 12GB 5,400 RPM drive that houses OS X and all its applications to my 45GB 7,200 RPM Mac OS 9 drive. The reduction in disk grinding has been substantial.

Simply moving the swap file to dedicated partition on the same disk is of much smaller benefit (if any). The disk heads still need to make many trips to and from the swap partition and the rest of the disk. And since Mac OS X uses individual swap files (rather than a dedicated swap file system), a separate swap partition is only likely to make a significant difference if the previous swap files were heavily fragmented on disk. (Note: I'm talking about 'external' fragmentation, where pieces of each swap file are spread all over the disk. The swap files themselves are always heavily 'internally' fragmented, meaning difference pieces of memory are spread sparsely within each swap file.)