Fco Basic Structure

download Fco Basic Structure

of 11

Transcript of Fco Basic Structure

  • 7/24/2019 Fco Basic Structure

    1/11

    Basic Structure of Computers

    Basic Structure of ComputersComputer is a fast electronic calculating machine that accepts digitized input

    information, processes it according to a list of internally stored instructions, and

    produces the resulting output information.

    There are four types of computer.

    1. Personal or Desktop Computers:

    This is found wide use in homes, schools and business offices. Personal

    computers have processing and storage units, visual display and audio

    output units and a keyboard that can all be located easily on a home or

    office desk.

    The storage media include hard disks, CD-!"s and diskettes.

    2. Notebook Computers:

    These are compact version of the personal computer with all of the

    components of personal computer packaged into a single unit of the size ofa thin briefcase.

    3. Workstation:

    These have high resolution graphics input#output capability, although still

    retaining the dimensions of desktop computers. These have significantly

    more computational power than personal computers. These are often used

    in engineering applications, especially for interactive design work.

    4. Enterprise sstems an! Ser"ers:

    These are a range of large and very powerful computer system. These are

    used for business data processing in medium to large corporations that

    re$uire much more computing power and storage capacity thanworkstation. %ervers contain sizable database storage units and are capable

    of handling large volumes of re$uests to access the data. %ervers are widelyaccessible to the education, business, and personal user communities. The

    re$uest and responses are usually transported over internet communication

    facilities.

    #. Super computers:

    These are used for the large scale numerical calculations re$uired in

    applications such as weather forecasting and aircraft design and simulation.&n enterprise systems, servers and super computers, the functional units,

    including multiple processors, may consist of a number of separate andoften large units.

    1 $ semester %C&

    P'm

    (pes of Computer

  • 7/24/2019 Fco Basic Structure

    2/11

    Basic Structure of Computers

    )unctional *nits

    There are five basic independent functional units in a computer. 'ach

    performs different functions.

    The functional units are1. $nput unit

    2. %emor unit.

    3. &rit+metic an! ,o'ic unit

    4. Control unit.

    #. -utput unit.

    $nput *nit:

    Computer accepts coded information through input units which read the

    data. &nput units are keyboard, mouse and (oystick and touch screen monitor.

    )hen a key is pressed on the input key the corresponding letter is automaticallytranslated into its binary code and transmitted over cable to either memory orcontrol unit. "icrophones can also be used as input unit which converts audio into

    digital codes.

    %emor *nit:

    "emory unit is used to store programs or data or both for very short period

    of time or permanent as permitted by the user.There are two types of storage* they are Primar stora'eand Secon!ar stora'e

    . Primar stora'eis a fast memory that operates at electronic speeds. )hen

    e+ecuting the programs must be stored in the memory up to certain time till theprogram gets e+ecuted.

    The memory unit is made up of semiconductor storage cells each capable of

    storing one bit of information. These cells are rarely read or written as individualcells but instead are processed in groups of fi+ed size called words. The number of

    bits in each word is often referred to as the word length of the computer.

    "emory in which any location can be reached in a short and fi+ed amount of time

    after specifying its address is called random access memory ". The time

    re$uired to access one word is called the memory access time. This time is

    independent of the location of the word being accessed and is fi+ed.Secon!ar stora'eis used to store large amount of data. %econdary storage

    devices are magnetic disks, magnetic tapes and optical disks CD-D/D-!"s.

    0sing secondary storage we can transfer large amount of data from one computer

    to the other computer.

    &rit+metic an! ,o'ic *nit:

    2 $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    3/11

    Basic Structure of Computers

    The operations like addition, subtraction, multiplication and division and

    other mathematical operations which take in computer are processed by rithmetic

    and 1ogic unit. )hen two numbers are to be multiplied or subtracted they are

    brought to the &,*and the process is carried and then it is stored in the memory.

    10 is one of the fastest device connected the computer.

    Control *nit:

    'very operation which is carried out in the computer is controlled or

    signaled by control unit. &t can be called as the nerve centre of the computer. &t

    receives and sends appropriate signal from and to every unit of the computer. ll

    these are carried through timing signals. Timing signals are signals that determine

    when a given action is to take place. large set of control lines or wires carries the

    signals used for timing and synchronization of events in all units.

    -utput *nit:

    The function of the output unit is to send processed results to the outside inthe form of soft copy using monitor or hard copy using printer.

    !utput units are printers, monitors graphic displays.The total operations of the functional units are as follows2

    The computer accepts information in the form of programs and data

    through an input unit and stores it in the memory

    &nformation stored in the memory is fetched, under program control,

    into an arithmetic and logic unit, where it is processed.

    Processed information leaves the computer through output unit.

    ll activities are monitored and controlled by the control unit.

    Basic -perational Concepts

    program consist of instructions, these instructions are brought down to

    the memory and from memory into the processor, where the e+ecution takes place.

    typical instruction may be

    dd 1!C,3

    This instruction adds the operand at memory location 1!C to the operand in aregister in the processor, 3, and places the sum into register 3. The original

    contents of 1!C are preserved where as those of 3 are overwritten several

    times.

    Transfers between the memory and the processor are started by sending theaddress of the memory location to be accessed to the memory unit and issuing the

    appropriate control signals. The data are then transferred to or from the memory.

    The figure below shows how the memory and the processor are connected. &t also

    shows the operational details of the processor.

    3 $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    4/11

    Basic Structure of Computers

    The processor contains a number of registers used for different purposes.

    The instruction register & holds the instruction that is currently being

    e+ecuted.

    The program counter PC is a specialized register which keeps the track of

    the e+ecution of a program. &t contains the memory address of the ne+t

    instruction which is to be fetched and e+ecuted.

    The memory address register " holds the address of the location to beaccessed.

    The memory data register "D contains the data to be written into or

    read out of the addressed location.

    There are n general purpose registers which stores the contents.

    '+ecution of the program starts when the PC is set to the point to the first

    instruction of the program. The contents of the PC are transferred to " and

    a read signal is sent to the memory and the contents are loaded into the "D.

    4ow the contents of "D are transferred to & where the instruction is ready

    to be decoded and e+ecuted. &f this instruction involves an operation to beperformed by the 10, its re$uired operands are fetched by sending its address

    to " and initiating a read cycle. 4ow the operand has been read from the

    memory into the "D and transferred to 10 to perform desired operation.

    4ow the result of this operation is sent to "D and stored in the memory. The

    address of the location where the result is to be stored is sent the " and a

    4 $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    5/11

    Basic Structure of Computers

    write cycle is initiated. During the e+ecution of these instructions at some point

    of time the PC points to the ne+t instruction to be e+ecuted. Thus as soon as the

    current instruction is completed a new instruction fetch may be started. The

    process is repeated until the program gets terminated.

    Bus Structures group of lines that serves as a connecting path for several devices is

    called a bus. )hen a word of data is transferred between units, all its bits are

    transferred in parallel i.e. bits are transferred simultaneously over many wires

    or lines, one bit per second.

    The simplest interconnection between functional units is done by using singlebus.

    5ere all units are connected to a single bus because of which the bus can be

    used for one transfer at a time i.e. only two units can actively use the bus at any

    given time.

    %ingle bus structure is vastly used because of its low cost and its fle+ibility forattaching peripheral devices."ultiple bus structure systems achieve more concurrency in operations by

    allowing two or more transfers to be carried out at the same time which leads

    to better performance at an increased cost.

    The single bus structure is as shown above. Consider the transfer of an encoded

    character from processor to a character printer.

    The processor sends character over the bus to the printer buffer.

    6uffer is an electronic register which holds the information during

    the transfer of data.

    fter the buffer gets loaded the printer can start printing without

    future intervention by the processor

    The bus and the processor are no longer needed and can be released

    for other activity. The printer continues printing the encoded character which is in the

    buffer.

    The printer in not available for further transfers until the previous

    task is completed.

    # $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    6/11

    Basic Structure of Computers

    During this time the processor can go for any other instruction with

    other devices.

    The system bus has three parts.

    Data bus:This is used to carry data from input devices or memory

    to the processor and vice versa to output device. 5ence it is called

    bi-directional.

    &!!ress bus:The processor uses this bus to access the memory or

    any ! device connected to it.

    Control bus:These lines are needed to conduct various activities

    like read, write, reset etc.

    Softare

    %oftware is a collection of programs that are e+ecuted as needed to perform

    and manage some functions such as

    eceiving and interpreting user commands

    'ntering and editing application programs and storing them as files

    in secondary storage devices.

    "anaging the storage and retrieval of files in secondary storage

    devices.

    unning standard application programs such as word processor,

    spreadsheets or games, data supplied by the user.

    Controlling ! units to receive input information and produce

    output results.

    Translating programs from source from prepared by user into ob(ectform consisting of machine instructions

    1inking and running user-written application programs with e+isting

    standard library routines, such as numerical computation packages.

    The basic operation of an operating system is to manage time. 1et us consider a

    system with a processor, a disk and a printer. 4ow let us discuss how a document

    is printed and role played by operating system in this process.

    7irst the program is complied from a high level language into

    machine level language and stored in the disk.

    4ow the file is transferred to primary memory.

    4ow the e+ecution of the program is started which involves reading

    a data file from the disk into the memory, performing some

    computation on the data and print the result.

    / $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    7/11

    Basic Structure of Computers

    )hen the e+ecution reaches the point where the data file is needed,

    the program re$uests the operating system to transfer the data file

    from the disk to the memory.

    The !% performs this task and passes e+ecution control back to the

    application program, which then proceeds to perform the re$uiredcomputation.

    fter the computation is completed the result is ready to be printed.

    The application program sends a re$uest to the operating system and

    a !% routine is e+ecuted to cause the printer to print the results.

    During the time period t3to t8 an !% routine loading the application program from

    the disk to memory is carried out. similar activity occurs during the period t9 to

    t: and during the period t; to t< the result gets printed. )hen the result gets

    printed during the time period t; to t

  • 7/24/2019 Fco Basic Structure

    8/11

    Basic Structure of Computers

    The performance of a system by calculated by the formula

    ( N S

    )here T = Processor Time

    4 = 4umber of machine language instructions.% = verage number of basic steps re$uired to e+ecute one machine

    instruction

    = Processor clock rate in cycles per second.

    Performance can be improved by reducing the memory access time of the CP0.

    This can be done by placing high speed memories to store data. %uch a memory is

    called cac+ememory which is built within processor 18 cache or can be placedbetween memory and the CP0 19 cache. The size of cache memory is small

    compared to primary and secondary memory. This can store only instructions and

    data which are re$uired by the processor in the immediate ne+t se$uence. s thee+ecution proceeds new set of programs can be loaded into the cache by swapping

    the previous contents back into the main memory. 5ere the CP0 fetches the

    instructions and data directly from cache instead of accessing main memory everytime.

    C$SC an! $SC

    %ome processor may have large number of instructions which are e+ecuted

    in small number of steps. &ndividual instructions perform more comple+operations than fewer instructions. This leads to lower value of 4 and large value

    of %. ccording to the instruction set, computers can be generally classified intotwo categories2 C&%C and &%C.

    C$SC:Comple+ &nstruction %et Computers.

    0se "icro programmed control

    >oal is to provide a single machine instruction for each statement

    written in 511.

    Direct manipulation of operands residing in memory.

    7re$uent memory access.

    /ariable length instruction formats.

    /ariety of addressing modes. &nstruction cycles are different.

    4o need for specialized compiler design

    Comple+ decoding circuit is necessary.

    $SC:educed &nstruction %et Computers.

    5 $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    9/11

    Basic Structure of Computers

    0se 5ardwired control.

    >oal is to have faster e+ecution.

    ll !perations done on the CP0 registers.

    "emory access is not fre$uent and is limited to ?1oad@ and ?%tore@

    instructions

    7i+ed length instruction formats which are easily decodable.

    7ew addressing modes.

    %ingle cycle instruction e+ecution, hence faster.

    'fficient and optimized compiler design re$uired.

    %mall chip area needed for instruction decoding and se$uencing

    control.

    %emor &!!resses

    'very information we store in the computer is stored in memory unit.

    "emory is organized such that a group of n-bits can be stored or retrieved in asingle operation. 5ence n is called a word length and group of n-bits is referred to

    as word of information. )ord length can vary from A to B; bits. &f the word length

    is :9-bits, then a memory word can store a :9-bit signed integer or four %C&&

    characters.ccessing the memory for reading or writing an item re$uires distinct addresses

    for each location. &f k is the number of address lines, then 9kaddresses constitute

    the address space of the computer

    &f k=93, we re$uire an address space of 993 = 8" 8 mega and if k=:3, the address

    space is 9:3 = 8> 8 giga locations.

    epresentation of memory is shown below.

    6 $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    10/11

    Basic Structure of Computers

    Bte &!!ressabilit

    "emory is arranged in such a way that successive addresses refer to

    successive byte locations. 'ach location contains one byte of information which is

    called byte addressability. &f the word length is :9 bits, then they are divided into ;

    bytes and stored in ; consecutive address locations. %uccessive words are located

    at addresses 3, ;, A. with each word having ; bytes.

    %emor &ssi'nment

    6yte addresses are arranged in two ways, 8. 6ig-endian assignment.

    9. 1ittle-endian assignment.

    Bi'7en!ian assi'nment:5ere the byte of data is stored at lower address and low

    byte of data at higher address. This is used in "otorola and Power PC processor.

    18 $ semester %C&

    P'm

  • 7/24/2019 Fco Basic Structure

    11/11

    Basic Structure of Computers

    ,ittle7en!ian assi'nment:5ere lower addresses contain low order bytes of data.

    This is used in &ntel processors.

    To access a number in memory, its word address is specified.

    To access character string of variable length, the beginning of the string is

    indicated by giving the address of the first character. The length of the string inbytes can be saved in a memory location processor register. 1ength of the string

    can also found by using special control character as the last character in the string

    with the meaning end of stringE.

    11 $ semester %C&

    P'm