Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nec207

macrumors 6502
Original poster
Mar 21, 2011
429
0
I'm looking for information on the OS layer.I think it goes some thing like this .


The user interface talks to application layer the application layer talks to the OS the OS talks to the Kernel the Kernel talk to the hardware.

But I'm not sure where user level and system level is or why have a user level and system level at all.

Also I was saying that Lion has a new Shell but one of the members was saying it is not:eek::eek: The API is little different. The finder API is little different.
 

Shawnpk

macrumors 6502
Jan 13, 2011
350
0
Los Angeles, CA
Look at this. Scroll down to where it says "How Cocoa Fits into Mac OS X" and you'll see a graphic of what you're looking for. (I think)
 
Last edited:

nec207

macrumors 6502
Original poster
Mar 21, 2011
429
0
Here is post from apple on OS X structure and OS layer.

Very intresting.

http://developer.apple.com/library/...ocoaFundamentals/WhatIsCocoa/WhatIsCocoa.html

Cocoa is an application environment for both the Mac OS X operating system and iOS, the operating system used on Multi-Touch devices such as iPhone, iPad, and iPod touch. It consists of a suite of object-oriented software libraries, a runtime system, and an integrated development environment.

This chapter expands on this definition, describing the purpose, capabilities, and components of Cocoa on both platforms. Reading this functional description of Cocoa is an essential first step for a developer trying to understand Cocoa.

Can some one explain what is in bold above what it does .

Also when people say application environment is this the same as desktop environment ie GUI?


In the 90's apple used other desktop environment or GUI before OS X came out.Also Lion ues a different GUI than snow leopard.
 

Shawnpk

macrumors 6502
Jan 13, 2011
350
0
Los Angeles, CA
runtime system - A run-time system (also called runtime system or just runtime) is software designed to support the execution of computer programs written in some computer language. The run-time system contains implementations of basic low-level commands and may also implement higher-level commands and may support type checking, debugging, and even code generation and optimization.

object-oriented software libraries is pretty self explanatory.
 

nec207

macrumors 6502
Original poster
Mar 21, 2011
429
0
runtime system - A run-time system (also called runtime system or just runtime) is software designed to support the execution of computer programs written in some computer language. The run-time system contains implementations of basic low-level commands and may also implement higher-level commands and may support type checking, debugging, and even code generation and optimization.

object-oriented software libraries is pretty self explanatory.

OS X does not use DLL files like windows that loads it self every where.
 

munkery

macrumors 68020
Dec 18, 2006
2,217
1
nec207 said:

Referring to user and system level is a model to explain permissions in relation to discretionary access controls. There is no reason to fit other levels into creating a model to explain permissions.

Other models are used to explain how operating systems function in general. The separation of layers in those other models has no relationship to permissions. Various parts in each layer have restricted permissions while others do not.

I think you are confused due to trying to blend these different models together.

What function of the operating system are you trying to understand?

If you want to understand permissions, read about Unix permissions and discretionary access controls.

If you want to understand how an operating system functions in general, read about the OSI model.

You have to keep in mind that how the various APIs and OS components are layered in the OSI model is independent of what permissions are applied to each item.

Typically, APIs and components that are in lower layers of the OSI model have restricted permissions if discretionary access controls are enabled.
 

nec207

macrumors 6502
Original poster
Mar 21, 2011
429
0
First I think I'm confused with Aqua vs Cocoa/Carbon . And that is why the very old thread I made called Cocoa/Carbon a GUI .Saying the finder got new look and feel to do Cocoa now using Carbon .So there is confused there.


Also I'm confused what API or toolkits do.


Second I think I'm getting confused with desktop environment that Linux and Unix calls it where windows and OS X calls it GUI.

When you read stuff above like ''Cocoa is an application environment for both the Mac OS X operating system and iOS ''

I'm still not sure what object-oriented software libraries or libraries do with Cocoa or Carbon.
 

old-wiz

macrumors G3
Mar 26, 2008
8,331
228
West Suburban Boston Ma
"software libraries" or "libraries" are generally an interface between applications layer and system layer. For example, if you write an app that does a call like "Open" or "read" then the app merely makes a call to an object called "open" which converts the call into something the lower layer can deal with.

This is very generalized, and the terminology can change between *Nixes.

These whole layers were built up from the distant past when you had to know exactly how to program specific devices from your application. If you wanted to read from the console, you needed to know what low level instructions were needed to read from the console and how to check for busy or errors and when to stop reading. This was very tedious and fraught with problems, especially if you wanted to move your code to a different machine.

Nowdays, the layers insulate the applications from what's going on down below.

Hope this is somewhat helpful
 

munkery

macrumors 68020
Dec 18, 2006
2,217
1
First I think I'm confused with Aqua vs Cocoa/Carbon . And that is why the very old thread I made called Cocoa/Carbon a GUI .Saying the finder got new look and feel to do Cocoa now using Carbon .So there is confused there.

Cocoa and Carbon are APIs which applications use to interact with the rest of OS X.

Aqua is both the GUI and desktop environment of OS X that is used by applications, which use Cocoa and Carbon.

Also I'm confused what API or toolkits do.

APIs and toolkits (library or framework) provide a interface for the applications to function. Without APIs, applications would be unable to interact with the rest of the operating system.

I'm still not sure what object-oriented software libraries or libraries do with Cocoa or Carbon.

Apple's proprietary programming language, called Objective-C, is an object-oriented programming language.

Understanding the difference between Objective-C and C programming languages is not really important to understanding how APIs and libraries function.

A library is a collection of programming functions that serves one particular purpose.

A framework is a collection of libraries that are used by an application to produce the functions of the application.

An API is an interface for other parts of the operating system to interact with the application.
 
Last edited:

nec207

macrumors 6502
Original poster
Mar 21, 2011
429
0
What is application environment than say desktop environment .

I thought Linux and Unix calls it desktop environment and windows and OS X calls it GUI.

Also why does OS X ,Linux and Unix have no DLL files but windows does?And windows loads DLL files every where. with you install new software.
 

munkery

macrumors 68020
Dec 18, 2006
2,217
1
What is application environment than say desktop environment.

Application environment = consists of APIs, frameworks, and libraries. This is an interface related to the interaction of applications with the operating system.

Desktop environment = is the GUI. This is an interface related to the interaction of the user with applications and the operating system.

I thought Linux and Unix calls it desktop environment and windows and OS X calls it GUI.

Desktop environment and GUI are interchangeable terms. Both refer to the same thing.

The term GUI can be used to refer to a subset of the desktop environment as well. For example, the specific GUI of a single application is referred to as a GUI but it is not a desktop environment.

Desktop environment refers to the entire set of GUIs represented within the operating system.

Also why does OS X ,Linux and Unix have no DLL files but windows does?And windows loads DLL files every where. with you install new software.

DLLs are shared libraries. Shared libraries are used by more than one application.

OS X, Linux, and most other OSs have some implementation of shared libraries.

OS X shared libraries are called dylibs. The dylibs are loaded into a single binary called dyld. Dylibs are not typically installed via third party software. This is because OS X uses app bundles that are self contained by having required libraries included in the bundle.

Windows does not load dlls into a single binary. DLLs are commonly installed by third party software. Windows does not typically use a portable applications format, such as the app bundle architecture used in OS X.
 
Last edited:

nec207

macrumors 6502
Original poster
Mar 21, 2011
429
0
DLLs are shared libraries. Shared libraries are used by more than one application.

OS X, Linux, and most other OSs have some implementation of shared libraries.

I thought DLL files was reason for so much error messages and malware in windows . Why would Linux and OS X use it?


OS X shared libraries are called dylibs. The dylibs are loaded into a single binary called dyld. Dylibs are not typically installed via third party software. This is because OS X uses app bundles that are self contained by having required libraries included in the bundle.

sorry I do not understand .I thought windows comes with most DLL files and other DLL files you get when one installs the software.

This is why one should not move app around in windows or install or remove apps in windows with out using the installer.


If you move apps around in windows as windows makes DLL files and registry entry and moving it will break it.Also Microsoft wants people to use shortcuts and moving apps will break the shortcuts of path of the files.Most of the time there is a shortcuts on the desktop and start menu.

So is it not in the best intrest for programmers to use DLL files and the registry as you can get error message and malware not to say you cannot move apps around or install or remove apps with out using the installer.

I hear some small apps not the practice of big apps in windows are going this way where you do not have to install or unstall the apps it is a self contained bundle
 

munkery

macrumors 68020
Dec 18, 2006
2,217
1
I thought DLL files was reason for so much error messages and malware in windows . Why would Linux and OS X use it.

Shared libraries are not a problem in OS X because users do not typically install or modify the shared libraries in OS X. OS X avoids this using self contained app bundles.

Linux avoids many issues related to shared libraries via using curated repositories as a source to get software for installation.

OS X and Linux have fewer shared libraries than Windows as well. This reduces the likelihood of issues due to shared libraries.

The install location of shared libraries is protected via DAC if DAC is enabled. DAC is much more easily bypassed in Windows and earlier versions of Windows do not have DAC enabled by default.

More user modification of the system level and weaker DAC are the primary reasons that DLLs are related to more errors and malware issues in Windows.

Also, the manner in which DLLs are loaded into memory doesn't allow applications in Windows to be fully position independent executables (PIE). Not having full PIE makes bypassing security mitigations easier in Windows.

sorry I do not understand .I thought windows comes with most DLL files and other DLL files you get when one installs the software.

This is true. OS X avoids the user installing more shared libraries by using app bundles.

This is why one should not move app around in windows or install or remove apps in windows with out using the installer.

If you move apps around in windows as windows makes DLL files and registry entry and moving it will break it.Also Microsoft wants people to use shortcuts and moving apps will break the shortcuts of path of the files.Most of the time there is a shortcuts on the desktop and start menu.

App bundles are the reason that this is not an issue in OS X. Another factor is that few third party applications are installed in the system level of OS X.

But, Windows requires the user to modify the system level of the OS to install most applications.

So is it not in the best intrest for programmers to use DLL files and the registry as you can get error message and malware not to say you cannot move apps around or install or remove apps with out using the installer.

The use of DLLs can be avoided.

But, I think developers are stuck with using the registry. Not sure about this.

Regardless if developers avoid the registry, MS will continue use the registry so most issues with the registry will remain.

I hear some small apps not the practice of big apps in windows are going this way where you do not have to install or unstall the apps it is a self contained bundle

Don't know of too many apps that are doing this. The only example that I can think of is Chrome.
 

nec207

macrumors 6502
Original poster
Mar 21, 2011
429
0
On site note Lion got new UI change and this as nothing to do with Cocoa or Carbon .

Did Apple change Aqua little bit ? To get new UI change in Lion?
 

munkery

macrumors 68020
Dec 18, 2006
2,217
1
On site note Lion got new UI change and this as nothing to do with Cocoa or Carbon .

Did Apple change Aqua little bit ? To get new UI change in Lion?

Apple does make subtle changes to the Aqua interface across different versions of OS X.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.