for Robot Artificial Inteligence

18.Graph Terminology

|

Graph Terminology

  • Vertex (vertices) – A point on the graph. We have called these “nodes” in the past. Usually represented as letters or numbers in theory.

  • Edge – A connection between to vertices. Represented by naming the two vertices. So (A,B) would be the edge between Vertex A and Vertex B.

  • Set - A group of items that have no importance or order to them. So {A,B,C} is equivalent to {B,C,A} and {C,B,A} etc. The order doesn’t’ matter. They are just a group of items that share something in common.

  • Cyclic – A directed graph which has at least one cycle. A cycle is where you can start at one vertex, and arrive back at that vertex through the graph. So A->B->C->A. This path starts at A, and ends at A.

  • Ayclic – A directed graph which doesn’t have any cycles. Once you touch a vertex, there is no way to get back to that vertex.

  • Connected – A graph in which each vertex is connected to together by some path. So from any node, one could follow the edges and make it to every other node.

  • Disconnected – A graph in which every single vertex is not connected. This could be a single vertex by itself or a bunch of smaller connected graphs. The point is atleast one of these vertices are not connected with the rest.

  • Adjacency(邻近距离) – When two vertices are connected to one another. So if we have the edge (A,B), A and B are adjacent to one another

Comment  Read more

12. Random Access Memory(RAM)

|

RAM - Random Access Memory

  • the RAM is a temporay storage area for programs being executed by the CPU. the data may not be stored in a contagious(感染力) memory locations inside the RAM

  • the memory consist number of addressable memory units(bytes) where the data is stored. depending upon the data type, the operating system allocates the memory.

  • RAM is essential component of every computer system which plays a crucial role in functioning of a computer system. the random-access memory(RAM) is a type of temporay storage(volatie) for computer systems that make it possible for CPU to access the data very quickly in random order.

  • RAM is a vital resource and it is managed by the operating system by allocating and de-allocating the RAM to the different program being executed.

  • the size of the RAM available in a computer system plays a very crucial role in the over all system performance and adequate RAM size is critical for optimizing the CPU performance.

  • inadequate(不充分的) Ram size can adversely(反对地) affect overall system performance resulting a very slow program execution.

  • the RAM size is measured in terms of “Bytes” and the usual size of the RAM modules is 512MB or 1GB(1024). the PC RAM size can suitably modified by adding more RAM modules placed in slots available on the motherboard.

  • the RAM modul consist of number of Memory IC chips placed on a PCB strip which effectively function as RAM modules.

    • Byte = 8 bits
    • 1025 bytes = 1KB
    • 1025 Kb = 512Mb
    • 1024 MB = 1GB

  • RAM is the tpye of memory installed inside a computer and fitted in to slots provided on the mother board. we can increase the RAM memory size of our computer by adding more RAM chip circuits depending upon the operating system(32bits/ 64bits) limits.

  • As the technology progressed, the RAM chips have become faster with the advent of new technology. However, the RAM compatibility must be checked before its installation to a compatible motherboard.

  • the maximum size of the RAM supported by a computer system also depending upon the type of the operating system(32bits/64bits). for example the maximum addressable RAM supported by a 32 bit operating system is 4GB whereas 64bit OS can support very high RAM size.

  • in computer architecture, a computer system makes the use of different types of memories and these memories can be classified depending upon the proximity to the CPU, access speed, memory size and cost of the memory.

  • the CPU in a computer system essentially performs two types of operations
    • reading from the memory
    • writing to the memory.
  • the user commands the operating system to run a specific program by double clikcing with mouse on the program executable file which instructs the operating system to initiate the program exeuction.

  • Every program must be first loaeded in the RAM in order to execute the program. the operating system loaeds the program’s exeuctable file from a source drive (CDROM/Hard Disk) to the RAM and allocates the required memeory for program exeuction.

  • the program execution starts with the program code in binary machine code is copied from permanent disk memory to the volatile main memory RAM.

  • this consist of machine code instructions directly exeuctable by the CPU

  • THe comtrol unit inside the CPU initiates the process of program execution by loading these instructions one by one from RAM to the CPU with instruction cycle consisting of steps
    • Fetch -> decode -> Execute -> store
  • the operating ststem(OS) splits the program into number of manageable units called processes. the operating system manages these processes by allocating the CPU processing time which is known as process management. the CPU can execute many processes simultaneously.

  • the data is again sent to the RAM after being processed by the CPU. however the RAM being volatile memory cannot permanently retain the data. the data in the ram is lost if the system is turned off.

  • therefore, the data present inside the RAM must be stored in any permanent storage device such as hard dist else the data will be lost if program is terminated without saving the data.

Types of RAM

  • there are two basic types of RAM:
    • Dynamic RAM(DRAM)
      • Dynamic RAM is the more common and needs to be refreshed thousands of times per second.
    • Static RAM(SRAM)
      • Static RAM does not need to be refreshed making it a lot faster but also much more expensive as compared to DRAM.
  • the computer system makes use of both static RAM and dynamic RAM at the same time, but it uses them for different reasons because of the cost and size difference between the two types.

DRAM

  • DRAM is more commonly used for personal computer memory and SRAM chips are preffered when energy efficieny is a concern, such as in cars, household appliances, and handheld electornics devices.

  • the Dynamic RAM(DRAM) is the most common type of memory in use today. inside a dynamic RAM chip, each memory cell holds one bit of inoramtion and is made up of two parts
    • a transistor and a capacitor.
    • these are extremely small transistors and capacitors so that millions of them can fit on a single memory chip.
  • the capacitor holds the bit of inoframtion(0 or 1). the transisotr acts as a switch that lets the control circuitry on the memory chip read the capacitor or change its state.

  • the problem with dynamic RAM chipes is that the capacitor leaks enery very quickly and can hold a charge for only a fraction of a second. A refresh circuit is needed to maintain the charge in a capacitor and retain the information.

  • this refreshing process takes place hundreds of times every second and requires that all cells must be accessed, even if the information is not needed.

  • As each line of cells is read, the computer’s CPU re-writes each bit of information and recharge the capacitor as needed.

SRAM

  • The static RAM chips, on the other hand use a different technology by using flip flop which doesn’t need refreshing to retain data.
  • the biggest drawback to SRAM is space. each transistor on a dynamic RAM chip can store one bit of information, but four to six transisotrs are required to store a bit using SRAM.
  • this means that a dynamic RAM chip will hold at least four times as much memory as a static RAM chip of the samze size, making SRAM much more expensive.

difference between SRAM and DRAM

insturction cycle and Main Memory - RAM

  • An insturction cycle ( also called a fetch-decode-execute-store cycle) is the baisc operational process of a computer.
  • it is the process by which a computer retrieves a program instruction from its memory, determines what actions the instruction dictates (强行规定) and carries out those actions.

  • this cycle is repreated continously by a computer’s CPU, from boot-up to when the computer is shut down.

  • the operating system loads the executable copy of the program from disk memory into the RAM for cput to initiate execution. the program consist of machine code instructions directly executed by the CPU.

  • the program instructions are typically arranged sequentially in memory.

  • each instruction occupies one or more memory words(memory location).

  • to execute any program, the CPU has to contentiously perform instruction cycle which consist of for steps
    • Fetch - Decode - Execute - Store
  • the CPU executes the progam by fetching program insturction one by one from the main system memory RAM.

  • the CPU stores the data and instructions in to the various CPU registers which are Temporary internal storage memory areas. the out put is again sent to the RAM.

Comment  Read more

11. Read Only Memory(ROM)

|

ROM- Read only Memory.

  • in computer architecture, a computer system makes the use of different types of memories and these memories can be classified as volatile and non-voltaile memory depending upon the ability of the memory to retain the data when system power supply is swithced off.

  • the ROM stands for Read Only Memory which is a non-volatile memory that menas the contents of the ROM will not be lost even if the computer system supply is switched off.

  • the ROM chip is type of IC(integrated Circuit) chip in which the data and program is embedded by the chip manufacturing company. Example: A BIOS chip which BIOS routines used in botting process.

  • the data stored in the ROM cannot easily modified or with some difficulty. therefore the ROM chips are mainly used to distribute the data and programes very closely tied to the specific hardware.

  • the ROM has data written permanently on it and is not reusable. However, there are certain kainds of ROM that can be rewitten and they are called EPROM(erasble Programmable Read Only Memory). these are generally in the form of CD-ROM or Floppy Dist that can be used to load the OS to the RAM.

  • A firmware refers to Read-only Memory(ROM) chips that store permanent instructions. Mainly used to boot up computerized or digital devices. As ROM chips are non-volatile, meaning that they do not require a power source to hold thier contents.

  • This differentiates it from Random Access Memory(RAM) which loses stored data at shutdown, for example: perhaps the most familiar example is the BIOS chip(basic input-output system.)

Comment  Read more

10. instructions and Memory Management

|

instructions and Memory Management

  • the computers use memory(RAM) to hold the program being executed and the data that these programs use. it is helpful to understand how data is organized in memory.

  • the memory is organized in cells and each cell has a unique memory address.

  • A memory cell is the smallest addressable unit which consist of 1 Cell= 8 bits = 1 Bytes.

  • the program execution starts when it is loaded in to the RAM by the operating system which allocates the required memory for program to run.

  • the program loaded in the RAM is a set of machine instructions in binary.

  • the memory(RAM) is composed of bits, grooups of 8 bits which form a 1 byte.

  • each byte can be addressed with unique memory address number and hence byte is a smallest addressble memory unit.

  • A word is defined as specific number of bits which can be processed together(i.e in one attempt) by the processor.

  • Alternatively, we can say that word defines the amount of data that can be transferred between CPU and RAM in a single operation.

  • the memory is generally organized as array of bytes(1 bytes = 8 bits) and each byte represents a memory location with its unique memory address.

  • the memory can also be organized as word addressble and each word with unique memory address. however the memory address numbers for each word will be decided depending upon the word size(23bit word OR 64 bit word.)

Comment  Read more

9. Computer Architecture

|

Computer Architecture

  • the bit size of the CPU dictates(强行规定) the maximum permissible(许可的) size of the RAM. for a 32bit CPU and 32bit OS the maximum RAM supported is 4GB and a 64bit CPU and 64bit OS can support any size of main memory RAM.

  • in computer Architecture, the CPU is responsbile to process the data sa per the program instruction. the CPU can execute the program instruction at a very high speed. A gigahertz, the most common measure of processor speed and it means that one billion clock cycles can be completed per second.

  • however, the permanent memory(disk memory/ hard disk) of the system cannot transfer the data to the cpu to match the processing speed of the cpu. this slows down the processor speed and therefore we need intermidiate memory such as RAM, cache where the access speed is relatively much faster as compared to the disk memory.

  • therefore, in computer Architecture, in order to optimize on the cpu performance different types of memories are placed between the CPU and the disk memory. thses memories are placed in a hierachical order depending upon the data access speed, size and distance from the cpu. this significantly improves the system performance.

Memory Hierarchy

  • the hierarchical arrangement of the various memory storages in computer architecture is called the memory hierachy(하이러키). the memory hierachy in a computer system is designed to optimize on the CPU performance.

  • the hierachical arrangement of memories is based on the access speed, distance of the memory from cpu, memory size required and the cost consideration.

  • as we go up in the hierachy, each level of the memory hierachy is of higher speed, lower latency (潜伏) and is of smaller size than lower level.

  • the registers are the fastest in access speed, closest to the cpu, smallest in size and also expensive. the disk memory is slowest in access speed, farthest from the cpu, largest in size and relatively inepxensive.

  • the CPU doesn’t directly access the main memory and the dist memory.

  • the CPU will first look for the data from the cache memory. thus the data is copied from disk memory to RAM(main memory) and from RAM to the cache memory where CPU can quickly access.

types of Memory in Computer System

  • the computer memory is mainly devided in to two types based on the data retention(保持) by the computer when power is switched off to the system:
    • primary(volatile(易变的)(휘발성)(벌러타일)) Memory
      • Temporary Memory or voltatile memory or main system memory.
    • Secondary(Non-Volatile(비 휘발성)) Memory
      • permanent memory or Non Volatile Memory

  • Primary Memory
    • the primary memory in computer system in also called as main memory(RAM- Random Access Memory) of the system which is volatile memory.
    • every program first must be loaded in the RAM to start its execution by the processor.

  • the primary memory(RAM) is a volatile memory and it can retain data only till the time the system is powererd on.
  • the data stored in the RAM will be lost once the system is switched off. therefore, data to be retained must be copied to the permanent storage(disk memory/ secondary memory)

  • the CPU can process the data and instructions at very high speed as compared to the speed of the data that can be accessed by the CPU from the disk(permanent/secondary) memory which limits the CPU performance. therefore intermidiate high speed memories are placed in between the CPU and the disk memory

  • the data / instruction are copied from disk memory to RAM(Main Memory) and from RAM to the Cache memory(L3->L2->L1) where CPU can access relatively at high speed.

Secondary memory(permanent Memory) in computer system

  • the secondary memory is known as non-voltatile or permanent memory because it can retain the data when the computer system power is switched off

  • the secondary memory is also known as permanent memory it can retain the data even if the power supply is switched off. the data is stored in to the permanent storage devices can retain the data without any power supply to the system.

  • the secondary memory is also alternately referred as permanent memory/ Non Volatile memory/ disk memory is used to store the program and data on a long-term basis. Common secondary storage devices are the hard disk and optical disks.

  • the storage capacity of the hard disk is very high as compared to the RAM. the common size of the RAM is generally 4GB to 16GB where as the common hard disk size is 250 GB to 1(1024GB) TB. However, the access speed of the disk memory is vary slow as compared to the RAM speed.

  • during the program execution, large blocks of data are copied from disk memory into main memory(RAM). this operation is slow but lots of data is copied. throughout the program execution, the processor is continously read and write small sections of the data in main memory. when it is done, a large block of data is written to the disk memory for permanent storage

  • the operation system is responsbile to mange the memory operation and optimially use the RAM.

  • Optical storage devices are any sotrage methods that use a laser to store and retrieve data from optical media.

  • Optical storage media includes CD-ROM, DVD-ROM, DVD-RAM, WORM cartridges, erasble optical catridges and removeable mass storage media, which includes flash drives and removeable disks.

Comment  Read more