Tuesday, November 15, 2011

Chapter 14 - Program Profilers

Program Profilers

Profiling allows you to know where your program used time and what functions (and together with other functions) were enabled during its execution creating knowledge of the parts of the program that are slower than expected and may need to be rewritten for better efficiency.   It can also tell you which functions are being accessed more or less often than you expected which will pinpoint bugs that would have been overlooked otherwise.  The profiler uses information discovered  during the actual execution of the program;  it can be used on programs that are too large/complex to analyze by reading the source but how your program is run will affect the information that shows up in the profile data and will omit information for that feature.(1)

The three program profiler tools discussed in this writing use static instrumentation of programs to monitor dynamic behavior, but are different in certain ways.

 Gprof,  the most limited of the three; it is only capable of producing a call graph, and is language dependent but it is easier to use than the others, and is portable across CPU architectures and OSs.

ATOM and Etch are more flexible - users define their own instrumentation code and are not limited to a single function and are both language independent but unlike Gprof, they work at the binary level (confined to a particular OS/architecture). If only the final binary executable is used, then Etch is the only tool of the three of use. Though static instrumentation of individual binaries are powerful profile tools in runtime behavior it is limited and the other layers of the system, (operating system and hardware), effect program execution greatly.  Events (scheduling, cache misses, interrupt handling, etc.) can cause  poor system performance, but  need code in the OS itself to be determined, or with hardware monitoring.(2)


(1) <http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html#SEC1>. Web. 15 Nov.  2011.
(2) <http://www.cs.wustl.edu/~jain/cse567-06/ftp/sw_monitors2.pdf>. Web. 15 Nov. 2011.

CHAPTER 13 - CORBA

CORBA

A brief introduction to CORBA

CORBA  defines how distributed objects can interoperate and before the  World Wide Web, and in particular, the Java programming language, CORBA was basically a high-end, distributed-object solution primarily used by C++ developers.

The actual CORBA specification is controlled by the Object Management Group (OMG), an open consortium of more than 700 companies who together define open standards for object computing. CORBA objects can be written in any programming language supported by a CORBA software manufacturer (C, C++, Java, Ada, or Smalltalk) or in any platform supported by CORBA software manufacturers (Solaris, Windows 95/NT, OpenVMS, Digital Unix, HP-UX, and AIX, etc.). (1)


CORBA Services


CORBA Services entail specific interfaces defined by the OMG like security, persistence, transactions, query, object trading, naming, events, concurrency control, and collections and are constantly being defined although few appear in commercial products at present are not in Open Source or Freeware form but basic services (e.g., naming and events) are in  base CORBA implementation, and are noted where necessary. Stand-alone implementations are listed below.

JTrader
    JTrader is an implementation, in Java, of the COS Trading Object Service. Traders are objects that know about services and used to find an object by the type of service it offers. Graphical tools tmanage the service type repository, the service offers, and  performing queries but require ORBacus (OmniBroker) for operation and should be  portable to other ORB's. Itrader is used in Java, under the GPL.

CORBA Packages Guide

AdaBroker
    AdaBroker is a set of tools and libraries for applications in the Ada programming language; provided are an IDL parser, Ada code generator, the CORBA-defined Ada mapping support packages and released under the GPL.

ORBit
    ORBit is the ORB of choice (the Gnome project) and praised for very high performance when used locally (small footprint). The decision to pursue the development of ORBit followed poor experiences with three of the ORB's listed below (one had unacceptable licensing restriction/GPL'ed Gnome project, another was too fat/slow, and a third was missing critical "C" language bindings) but if you are doing GUI programming in Gnome, and want to write graphical plugins or controls use this ORB. Includes a variety of services, such as OAF for naming, and Bonobo for easy-to-use document and GUI programming interfaces.

OmniORB
    OmniORB from Oracle & Olivetti /explicit Linux port. Features a C++ IDL, uses IIOP and the IIOP has been tested with other ORB's, is multi-threaded, has a COS name server and OmniORB Source is GPL'ed.

        Commercial support

MICO
    MICO, the recursively named "Mico Is COrba", implements a C++ IDL, DII, DSI, IIOP, IR, a full BOA, a name server, support for "Any" types, support for loadable modules. Includes a graphical IR browser ( GPL'ed). Pre-compiled versions are available and current work is on a WinNT port.  Mico/E is an extension of mico (Eiffel programming language).

ORBacus (OmniBroker)
    The ORBacus (OmniBroker) from Object Oriented Concepts, Inc. includes Java and C++ IDL mappings, as well as IIOP, DII, DSI (Dynamic Skeleton Interface), COS, IR, nested method . Dynamic Any. Has an IDL-to-HTML converter - supports threads and naming service GUI. Third party tools include a COS Trading Object Service and a scripting language. Supports C++ threads. Source code is available. Free for non-commercial /commercial license with full support contracts.

OAK
    The OAK CORBA ORB from Paragon Software supports Objective-C bindings, a unique feature making it  suitable for use with NeXTStep/GnuStep. Supports IIOP, BOA, DSI, DII, IR, COS. Includes extensions for fault tolerance/load-balancing etc.   OAK is a commercially supported product; they offer a free trial evaluation period.

COOL ORB
    The COOL ORB form Chorus has a small footprint (50KB), real-time behavior and synchronization services
(use in embedded systems). Fully CORBAv2 compliant, offers IIOP, DSI, DII and IR. Inter-operates with the other Chorus embedded/real-time products; unlike most other ORB's listed here,  it is commercially supported. N.B. Chorus has been acquired by Sun.

ILU
    The ILU (Inter-Language Unification) ORB from XEROX -  support for IIOP, kernel threads, encryption, and "Any". Includes IDL compilers for C++, ANSI C, Python, Java, Common Lisp and Modula-3. ILU also includes a self-contained implementation of ONC RPC, making it possible to use existing RPC services as ILU objects. ILU includes  HTTP, allowing CORBA-based web servers/browser development -  highly customized - available as freeware.  Beware of the down-level code located on the Linux Sunsite (http://sunsite.unc.edu/pub/Linux/devel/corba/) repository; go to the main site for newest code.

Arachne
    Arachne  seeks reusable components for the medical domain;  continues and is evolving -  active use by the developers   Arachne runs on a variety of platforms, including 95/NT, Mac, SunOS, HP/UX, but Linux primarily -  includes a C++ ORB with DII, IR, Any, TypeCode, and IIOP -  includes a subset of COS, and an application development support framework/GUI components -  IDL language mapping is currently non-standard - predates CORBA-2 needs some update possibly. IIOP has been tested against Visigenics and ORBacus (OmniBroker) - possible python-based application authoring environment.

TAO
    The TAO (The Ace ORB)  definine real-time extensions to CORBA - TAO includes enhanced C++ IDL compiler, a BOA, and an implementation of standard IIOP on TCP/IPORB's from several vendors -  includes RIOP (Real-time IOP) extensions to GIOP, implemented on ATM and multi-gigabit hardware -  real-time event service, a real-time dispatcher/scheduler and an ROA (real-time object adapter). TAO is affiliated with the ACE (Adaptive Communications Environment),  experience with real-time communications in telecom and avionics environments. The code is currently (97) alpha-level, and runs on Linux, Solaris, and NT.

Electra
    The Electra Object Request Broker provides V2 CORBA support, including BOA, DII, a Tcl/Tk DII, IIOP, a fault-tolerant COS name server, a GUI availability monitor, and an event channel for C++/Java, allowing objects to subscribe to information servers - fault-tolerance emphasis and availability -  for reliable multi-cast & synchrony. Electra is not yet as of 97 stable on Linux.

COPE
    COPE is an ORB completely in Perl. It does not provide an IR (Interface Repository),- use third-party tools for that purpose (such as ORBacus (OmniBroker)).

JacORB
    The JacORB is a CORBA ORB completely in Java -  Java IDL compiler, supports threads, IIOP, IR, a COS compliant name service, and an alpha-level implementation of the COS Event service - run well under Linux - more standards-compliant than some of the big-name CORBA products - under GPL free.

Jorba
    Jorba is a CORBA implementation completely  in Java - includes the ORB, DII, DSI, and an IDL compiler -  states that this is alpha-level code, with many functions missing -   provided in source form under GPL.

CORBAPlus
    CORBAPlus from ExpertSoft - CORBAv2 - n Java - a Java IDL compiler, IIOP, DII, Any and typecodes. The licensing terms  unclear but freely available - LInus testing unsure - support contracts.

JavaIDL
    The JavaIDL is a  SunSoft's Java IDL compiler - a generic ORB core possibly run under Linux - requires porting ??. May require integration with an ORB core??

Jylu
    Jylu implements the Xerox PARC ILU CORBA core in Java - a Java IDL compiler - not talk IIOP, but does talk the ILU wire protocol (Sun RPC protocol??)..

Fnorb
    The Fnorb is an experimental ORB -  in Python - does not provide an IR (Interface Repository) - can use third-party tools for that purpose (such as ORBacus (OmniBroker)).

ROBIN
    ROBIN (RPC and Object Broker Interface)- a subset of the CORBAv2.1 spec. Supports an IDL and DII, does not currently support IIOP -  (data acquisition and control systems, including embedded computers).

DOME
    DOME from Object Oriented Technologies offers threading, callbacks, async operation, location brokering, as well as network monitors & tools. Strengths: runs on a large variety of platforms, and supports many different networking protocols. Weaknesses: -proprietary and non-portable. OOT offers a free version for Linux. Commercial redistribution appears to be prohibited, commercial in-house use appears not to be.(2)

Bionic Buffalo
    The Bionic Buffalo - basic ORB w/ C bindings- is a commercial product; A free version of the ORB, stripped of IIOP, is planned.
(1) <http://www.javaworld.com/javaworld/jw-10-1997/jw-10-corbajava.html>. Web. 15 Nov. 2011.
(2) <http://linas.org/linux/corba.html>. Web. 15 Nov. 2011.

Sunday, October 16, 2011

QUANTUM COMPUTERS/QUANTUM PROCESSING


Quantum Computers/Quantum Processing
A quantum computer is a device for computation that makes direct use of quantum mechanical phenomena, such as superposition and entanglement. Quantum computers are different based on transistors. The basic principle behind quantum computation is that quantum properties can be used to represent data and perform operations on these data.1  A theoretical model is the quantum Turing machine, also known as the universal quantum computer. Quantum computers share theoretical similarities with non-deterministic and probabilistic computers (e.g., the ability to be in more than one state simultaneously). The field of quantum computing began with Richard Feynman in 1982.2
Quantum computing is still new and experiments have been carried out in which quantum computational operations were executed on a very small number of qubits (quantum bits) and quantum computers are being developed for cryptanalysis.3
Large-scale quantum computers solve certain problems much faster than any classical computer by using the best currently known algorithms, like integer factorization using Shor's algorithm or the simulation of quantum many-body systems. There exist quantum algorithms, such as Simon's algorithm, which run faster than any possible probabilistic classical algorithm.4   However, in practice infinite resources are never available and the computational basis of 500 qubits, for example, would already be too large to be represented on a classical computer because it would require 2500 complex values to be stored.5
A classical computer has a memory made up of bits, where a quantum computer maintains a sequence of qubits. A single qubit can represent a one, a zero, or, crucially, any quantum superposition  with a pair of qubits in any quantum superposition of 4 states, and three qubits in any superposition of 8.  In general a quantum computer with n qubits can be in an arbitrary superposition of up to 2n different states simultaneously while a normal computer is only in one of these 2n states at any one time. A quantum computer operates a fixed sequence of quantum logic gates with quantum algorithm sequence of gates.
Integer factorization is unfeasible with an ordinary computer for large integers if they are the product of few prime numbers (e.g., products of two 300-digit primes).6   By comparison, a quantum computer could efficiently solve this problem using Shor's algorithm to find its factors. This ability would allow a quantum computer to decrypt many of the cryptographic systems in use today, in the sense that there would be a polynomial time (in the number of digits of the integer) algorithm for solving the problem.  The popular public key ciphers are based on the difficulty of factoring integers (or discrete logarithm problem which can also be solved by Shor's algorithm), including forms of RSA. These are used to protect secure Web pages, encrypted email, and many other types of data and breaking these codes would have significant ramifications for electronic privacy and security.  However, other existing cryptographic algorithms do not appear to be broken by these algorithms.7







Works Cited

2 Quantum computation. David Deutsch, Physics World, 1/6/92
3Quantum Information Science and Technology Roadmap for a sense of where the research is heading.
4Simon, D.R. (1994). "On the power of quantum computation". Foundations of Computer Science, 1994 Proceedings., 35th Annual Symposium on: 116–123.
5Nielsen, Michael A.; Chuang, Isaac L.. Quantum Computation and Quantum Information. p. 17.
6Arjen K. Lenstra (2000). "Integer Factoring". Designs, Codes and Cryptography 19: 101–128.
7 a b Daniel J. Bernstein, Introduction to Post-Quantum Cryptography. Introduction to Daniel J. Bernstein, Johannes Buchmann, Erik Dahmen (editors). Post-quantum cryptography. Springer, Berlin, 2009. ISBN 978-3-540-88701-0

MRAM


Magnetoresistive Random Access Memory (MRAM)
Magnetoresistive  Random Access Memory is a non-volatile computer memory (NVRAM) technology under development since the 1990s and the advantages over SRAM, DRAM, EEPROM, and flash are so overwhelming that magnetoresistive RAM will eventually dominate all types of memory, becoming a true universal memory.[

MRAM (magnetoresistive random access memory) uses magnetic charges instead of the electrical charges used by DRAM (dynamic random access memory) to store data.  By combining the high speed of static RAM and the high density of DRAM, MRAM significantly improves electronic products by storing greater amounts of data, accessed faster while consuming less battery power than existing electronic memory. 
·                     Storage Resources
Computer chips store information as long as electricity flows through them. Once power is turned off, the information is lost unless transferred to hard drive of disk storage.   MRAM, however, retains data after a power supply is cut off. Replacing DRAM with MRAM could prevent data loss and enable computers that start instantly without boot up.
The U.S. Defense Advanced Research Projects Agency (DARPA) funds private industry research into the potential of MRAM. IBM, Motorola, and Honeywell. Hewlett-Packard, Matsushita, NEC, Fujitsu, Toshiba, Hitachi, and Siemens also have invested in MRAM research.
Motorola Labs development allows the integration of several memory options within a single chip, resulting in a chip that uses less power. The chip is a three-volt MRAM with an address access time of about 15 nanoseconds. IBM and Infineon Technologies AG are worked on a proposed 256-megabit chip.
Development of MRAM basically followed two scientific schools: 1) spin electronics, the science behind giant magnetoresistive heads used in disk drives and 2) tunneling magnetic resistance, or TMR, which is expected to be the basis of future MRAM.2
In June of 2010 Hitachi and Tohoku University announced Multi-level SPRAM.3   SPRAM, the next-generation MRAM or memory that uses the magnetism of electron spin to provide non-volatility, with unlimited fortitude but difficult to manufacture in mass. Spin-transfer torque random access memory (STT-RAM) technology is a second-generation magnetic-RAM technology . It can solve some of the problems posed by conventional MRAM structures. STT-RAM technology can eventually replace DRAM, NAND and MRAM, said Grandis Inc, a developer of STT-RAM technology.4

Works Cited
1 Johan Ã…kerman, “Toward a Universal Memory”, Science, Vol. 308. no. 5721 (22 April 2005), pp. 508 - 510, DOI: 10.1126/science.1110549
2http://searchstorage.techtarget.com/definition/MRAM
3 Y. Huai, AAPPS Bulletin, December 2008, vol. 18, no. 6, p.33, "Spin-Transfer Torque MRAM (STT-MRAM): Challenges and Prospects."
4http://www.ciol.com/Semicon/SemiPipes/News-Reports/Hitachi-plans-SPRAM-RD-spin-off/137594/0/

Saturday, October 8, 2011

Data Representation/Boolean Logic


DATA REPRESENTATION/BOOLEAN LOGIC

How amazing is it that computers can play chess or balance a check book?  The answer to this is the very basis of something called Boolean logic.  It was used first by George Boole, the British born Irish mathematician, in the mid 1800’s and enables many things to be mapped into bits and bytes.  It really comes down to the very basis of computers when you want to explain how Boolean logic works and it is so simple.  It starts with logic “gates” and relays and becomes something useful.

A Primer in Boolean Logic can be explained in an Internet search of this vast computer database based on the principles of Boolean logic.  Boolean logic is the logical relationship of search terms.


Boolean logic consists of three logical operators:
  • OR
  • AND
  • NOT
Each operator can be visually described by using Venn diagrams, as shown below.

OR logic

college OR university

  • the shaded circle with the word college representing all the records that contain the word "college"
  • the shaded circle with the word university representing all the records that contain the word "university"
  • the shaded overlap area representing all the records that contain both "college" and "university"
OR logic is most commonly used to search for synonymous terms or concepts.   The more terms or concepts we combine in a search with or logic, the more results.
OR logic collates the results to retrieve all the unique records containing one term, the other term, or both of them.








AND logic

poverty AND crime
  • In this search, we retrieve records in which BOTH of the search terms are present
  • This is illustrated by the shaded area overlapping the two circles representing all the records that contain both the word "poverty" and the word "crime"
  • We do not retrieve any records with only "poverty" or only "crime"
The more terms or concepts we combine in a search with AND logic, the fewer results retrieved.
poverty AND crime AND gender
Some search engines use the proximity operator NEAR to determine the closeness of terms of a source document. NEAR is a restrictive AND.  Most search engines default to proximity.

NOT logic

cats NOT dogs
  • This search, we retrieve records in which ONLY ONE of the terms is present.
  • This is illustrated by the shaded area with the word cats - all the records containing the word "cats"
  • No records are retrieved in the area overlapping the two circles where the word "dogs" appears, even if the word "cats" appears there too
Here is an example of how NOT logic works:







NOT logic excludes from your search results. When you use NOT: the term you do want may be present in an important way in documents that will be excluded because you wish to avoid that word. For example, consider a Web page that includes the statement that " cats are smarter than dogs." The search NOT would exclude this document from your results.

Combined AND and OR logic

Question: I want information about the behavior of cats.
Search: behavior AND (cats OR felines)
You can combine both AND and OR logic in a single search, as shown above.
The use of parentheses in this search is known as forcing the order of processing. In this case, we surround the OR words with parentheses so that the search engine will process the two related terms as a unit. The search engine will use AND logic to combine this result with the second concept. Using this method, we are assured that the semantically-related OR terms are kept together as a logical unit.

Quick Comparison Chart:
Full Boolean vs. Implied Boolean vs. Search Form


Full Boolean
Implied Boolean
Search Form Terminology
OR
college or university
[rarely available]
any of the words
at least one of the words
should contain the words
AND
poverty and crime
poverty   crime
all of these words
must contain the words
NOT
cats not dogs
cats   -dogs
must not contain the words
should not contain the words
NEAR, etc.
cats NEAR dogs
N/A

http://www.internettutorials.net/boolean.asp