PPRuNe Forums - View Single Post - AF 447 Thread No. 7
View Single Post
Old 13th Nov 2011, 15:08
  #180 (permalink)  
airtren
 
Join Date: Jul 2011
Location: Northern Hemisphere
Posts: 195
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by DozyWannabe;Post=171
For starters, I'll identify myself as a software engineer (which is a fancy way of saying computer programmer trained in traditional engineering discipline).
Software engineer is quite generic nowadays, doesn't tell much. It's like saying I am a pilot. Without more info... doesn't say much. The type of programming, or software, the programming languages, and depending on that, the processors one has programmed for, would be more descriptive...
.... The analogy I like to use is that modern home computers are like a highly-tuned racing engine, and the computers in your aircraft are more akin to an old pick-up truck engine, or possibly a marine diesel or something.
I will make some additions, and a different analogy - I don't know what "highly-tuned racing engine" or "home computer" you had in mind, as I particularly don't think that a "highly-tuned racing engine" fits the home computer reality.

A.
Using motor vehicles for the analogy, I would say a home computer is rather like a small size sedan, you can use it at many basic things around the home for the family. Depending on how recent it is, it may have a few more horse power than a previous instance of the model, and a bit more room in the trunk, or more comfortable seats.

The car has many generic components that are used in an entire family of cars.

The central piece that make the home computer usable, is the operating system - the OS - which is a very special set of software programs which brings usability to the hardware. The programs of this set are completely different from the general software used on the computer. Some of these software programs, and their modules, are extremely specialized for one or a few tasks. A very critical subset of modules is grouped into what may be called "kernel", or "core", which is always active on the home computer, and any problems with it result in a crash of the entire computer, requiring a complete reboot. The operating system is separated from the rest of the software through sort of a "virtual fence", to ensure the unaltered functionality, reliability, and security. The OS on a home computer is of a "general use OS" category. The rest of the software on the computer is applications software, and is more general in nature, in terms of how the software is written, and computer resources they have access to. Applications interact with the OS through an interface, called Application Programming Interface (abbreviated API), which allows a controlled passing through the "virtual fence". In general, each application software may provide certain specific functions, or functionality to the users. There may be several applications that provide the same functions, for instance, one may have several Internet browsers, or several text processing applications installed on a home computer - for instance Notepad, Wordpad, and MS Word. The separation, or the "virtual fence" between the operating system and applications allow installing new applications, or new versions of existing applications, or removing applications without affecting the operating system, or the other applications. Furthermore, the malfunction of one application is different than the malfunction of the OS. While the malfunction of the OS can result in a computer crash, affecting the entire computer, the malfunction of an application results in an application crash, which affects only that application and immediate use at the time of its malfunction, and does NOT affect the rest of the computer (rest of applications and OS). After such an application crash, one can just restart, or activate again the application. Each application has a user interface, which allows a direct interaction with the user. An application may process different data, depending on its type, and the user's needs. For instance a Spread Sheet program may process financial data for a user, or the small shop inventory for another user. The "user interface" of the application is using OS functions - through the API - for accessing specific hardware components tasked for interfacing with the user, like keyboard, mouse (input), and screen (output). The application may use the OS "file system" functions - through the API - for storing or retrieving data from a 'hard disk", "external disk", or "memory card", a "CD", or "DVD". Furthermore, the application may use the OS "data networking functions" - through the API - for interacting over the data network - Internet - with other applications - for instance a browser would be in this category. Some applications are present but run seldom, or not run at all.

B.
The computers used in a modern a/c are more like a very specialized very rugged type of vehicle used by some police/fire/rescue departments for intervention in very special and adverse conditions, for instance mountain trail conditions. They could not be used for a family's daily errands, or for going to a pic-nic, or vacation. The extreme reliability requirements translate into the use of components that are well known, well understood, verified by time, use, and abuse, but also manufactured for functioning at different specs than the generic ones - for instance temperature, pressure, humidity, radio interference, etc... .

The software running on these computers is in the "real-time", or "critical response-time" category, while it is also in the "dedicated" category, as opposed to "general use". The operating system is very specialized, and performs only a few tasks that are necessary for the functions of that computer. It can be regarded as a small subset of a home computer operating system. As response time is critical, the software is supposed to be highly efficient, and therefore is written following very specific requirements in terms of using the computer resources, or processor mechanisms - this makes sure that time consuming ways of using/programming the processor are excluded. It is likely that the computer would have only one or a few application programs installed. An application provides a very specific function, or small set of functions. It starts when the computer is turned ON, and runs permanently, as long as the computer is ON. It does not have a user interface, it always accepts as input, processes, and provides as output the same type of data. The line of separation between the operating system and applications is totally blurred or not existent - installing a new version of the the application if ever it is done by installing one new block of software, which contains the OS. A malfunction of the application is unacceptable, but if happens, it brings the entire computer down. A computer crash is in general "unacceptable".

Lastly, the algorithms that the application is programmed to perform are designed and specified in general separately from the software. The software application is only a materialization of the algorithm. Therefore a bug or a malfunction in the software is completely different than, and should not be confused with a bug or malfunction of the algorithm.

Originally Posted by DozyWannabe;Post=171
... if that wasn't enough, there's an implementation of the same specification running on the other computer with entirely different code, and the two implementations are constantly checked against each other.
This protects against "software bugs/problems", but NOT against "algorithm bugs/problems". An algorithm "bug" is materialized in both implementations, and unfortunately is railing each of the two implementations into the same "bogus" behavior.

Last edited by airtren; 13th Nov 2011 at 15:23.
airtren is offline