dongle

Broadband Wireless Dongles

Wireless broadband dongles work by communicating with a mobile mast and mobile network rather than connecting to another wireless device like the normal wireless dongle. This means that you can wirelessly connect to the internet from any location that has a mobile signal.

How Does it Work

Wireless dongles work by transmitting and receiving a wireless signal to another device that is listening for the signal transmission.

word

InĀ computing, word is a term for the natural unit of data used by a particular processor design. A word is basically a fixed-sized group of bits that are handled as a unit by the instruction set and/or hardware of the processor. The number of bits in a word (the word size, word width, or word length) is an important characteristic of any specific processor design or computer architecture.

modern general purpose computers usually use word size of 32 or 64 bits.

stack and heap

lots of good things including examples and pictures to help: http://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap

  • The stack is the memory set aside as scratch space for a thread of execution. When a function is called, a block is reserved on the top of the stack for local variables and some bookkeeping data. When that function returns, the block becomes unused and can be used the next time a function is called. The stack is always reserved in a LIFO order; the most recently reserved block is always the next block to be freed. This makes it really simple to keep track of the stack; freeing a block from the stack is nothing more than adjusting one pointer.

The heap is memory set aside for dynamic allocation. Unlike the stack, there’s no enforced pattern to the allocation and deallocation of blocks from the heap; you can allocate a block at any time and free it at any time. This makes it much more complex to keep track of which parts of the heap are allocated or free at any given time; there are many custom heap allocators available to tune heap performance for different usage patterns.

Each thread gets a stack, while there’s typically only one heap for the application (although it isn’t uncommon to have multiple heaps for different types of allocation).

The OS allocates the stack for each system-level thread when the thread is created. Typically the OS is called by the language runtime to allocate the heap for the application.

  • (in C++, everything created by and only by “new” method orĀ malloc() is on the heap, other things are on the stack; that means all objects are on the heap too because the constructor new will be called.)
  • Any local variables inside a function is put on the stack; it goes away after you return from the function.

enter image description here

 

class Thingy;

Thingy* foo( ) 
{
  int a; // this int lives on the stack
  Thingy B; // this thingy lives on the stack and will be deleted when we return from foo
  Thingy *pointerToB = &B; // this points to an address on the stack
  Thingy *pointerToC = new Thingy(); // this makes a Thingy on the heap.
                                     // pointerToC contains its address.

  // this is safe: C lives on the heap and outlives foo().
  // Whoever you pass this to must remember to delete it!
  return pointerToC;

  // this is NOT SAFE: B lives on the stack and will be deleted when foo() returns. 
  // whoever uses this returned pointer will probably cause a crash!
  return pointerToB;
}

difference between threads and processes

Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.

http://wiki.answers.com/Q/What_is_the_difference_between_processes_and_threads

The memory space, where a given application is executed is called – process. A Process is the memory set aside for an application to be executed in.
Within this process the thing, which is really executed is the thread.
The key difference is that processes are fully isolated from each other; threads share (heap) memory with other threads running in the same application.
Threads share the address space of the process that created it; processes have their own address.
Threads have direct access to the data segment of its process; processes have their own copy of the data segment of the parent process.
Threads can directly communicate with other threads of its process; processes must use inter-process communication to communicate with sibling processes.
Threads have almost no overhead; processes have considerable overhead.
New threads are easily created; new processes require duplication of the parent process.
Threads can exercise considerable control over threads of the same process; processes can only exercise control over child processes.

A Process can have multiple Thread.

threads within a process use the same Memory Space, but these threads each have their own Stack. Other words to say, Thread can be accessed through a reference to the same Object, but local variable is independent. (Meaning threads within a process share the same HEAP memory space, but use different stacks.)