Cache memory basics of raid decrement operator relational operator logical operators

 Cache memory  basics of raid decrement operator relational operator logical operators  flow control statements break and continue loop control statements eapcet material

CACHE MEMORY :

It is an interface memory in between processor and the main memory

Always cache memory state is zero

It holds the data when the processor and ram is buzy

RAM is volatile

Characteristics of memory:

Location , capacity, unit of transfer, Access method ,  performance, physical type ,physical characteristic ,organization

Location : cup storage (memory unit)

                  Internal storage (main memory)

                  Processor registers

                  External storage(HD)

Capacity : number of words are  transmitted per second either in data bus or

                  system bus

                  word (code word or data word)

unit of transfer :  it is used to identify the destination point of memory

Access methods :

1.     Serial access

2.     Random

3.     Dynamic

Performance : number of cycles per second (to identify)

Physical type : to identify the memory(physical location of the memory)

Physical characteristic : volatile or non volatile

Organization ----- location same

Locality of reference :

A data which is available on the main memory

The main memory address for the file is called as locality reference

Is is a temporary address

Ram memory address

Loops and sub routines related to locality reference

Nearby memory

BASICS OF RAID :

Redundant array of independent disks

(Inexpensive disks)

It is used to implement mirror copy’s identical to the permanent storage

It works with placing data on multiple disks

Raid works with raid controller

It can be used as level of obstruction between the os and the physical disks

MODES OF I/O DATA TRANSFER

Transferring of information between internal storage and external input and out put devices

Programmed input and out put

Interrupted input and out put

Direct memory access

Programmed input and out put :

Cpu requests I/O

IO Module perform operations

It is used to implement sets start bit for the resources

Note:

There are two states for every device

0 and 1 0-off      1   ready

Cpu checks start bits periodically for all devices

Each device contains 1 unique identifier number

Cpu commands contains unique identifier

Which of the following operation of I/O data transfer checks for the start bit of the devices

Programmed I/o

Which operation is used to identify the unique identifier number for cpu commands

Programmed I/O

INTERRUPTED DRIVEN I/O :

Cpu issues read command to the devices

It gets data from the peripherals

Cpu requests for data

The module uses identify the interrupted   instructions/devices

Which operation is used to requests data and gets the data from the peripherals --- interrupted driven I/O

DIRECT MEMORY ACCESS :

Transfer rate is limited

Cpu is tied up for manageing data transfers

Dma module must use the bus only(system bus)  when the processor(cpu) does not need it

DMA OPERATION :

Read and write operations

RECOGNIZE AND ALLOCATE DEVICE ADDRESS :

It sets the amount of data to be transferred

Pcb control receives signal/request from the client/user or some other device who will allocate address --- dma

General key points :

Cpu carry’s the signals from dma/receivers

Dma controller sends system call to cpu

In what type of situations dma will sends system call to processor?

When dma receives instruction from other client/user

Main functionality of dma controller ----it acts as an interface between main memory and the processor

Key points :

All IO operations are connected to IO bus

One chip set is required to transfer the data from all IO devices to the mother board

IOP also called as scsi

SCSI : small computer system interface

DECREMENT OPERATOR :

 To decrease the value by 1

Main ()

{

Int i=5;

Pf(“id”,i--)

Main()

(

Int i=5

--i

=4

RELATIONAL OPERATORS:

 To implement conditions

Ex : >,<,>=,<=,==,!=

Ex : 10>20

The written value in the relational operator either true or false

What is association of data in comparison operator?

Left to right

Which of the following is true about the relational operators?

It is an operator used to implement conditions

LOGICAL OPERATOR :

Logical operators are used to implement multiple conditions in a single expression

Ex : logical and (&&)

        Logical or

        Logical not(!)

                                        Ip1          ip2

                                             T          T                        T

                                             T             F                       F

                                               F            T                       F

                                              F                 F                  F

LOGICAL AND

All i/p are true then o/p true

If the input 1 is negation of negation of true N(N(T)

N(n(t) and i/p 2 is n(t) then what is the o/p of logical and

 

OR GATE :

Logical OR

Any one is true or all are true

                                                I1         i2                        o/p

                                               T             T                        T

                                               T             F                       T

 

                                               F             T                        F

 

                                               F            F                       F 

If the i/p 1 is not a true and o/p is false then

What is the o/pof or gate false

OR gate : Logical OR

Any one is true or all are true

                     I1                          I2                        O/P

                     T                           T                             T

                     T                           F                             T

 

                     F                        T                             T

 

                     F                           F                        T

If the i/p 1 is not a true and o/p is false then

What is the o/p of or gate false

Note :     T---F      F---T

Conditional operators :

To implement conditionals statements

Ex: int x = (10>20)?   10 : 20

The o/p of conditional statement is 20

FLOW CONTROL STATEMENTS :

IF                            IF ELSE IF                                  SWITCH

IF  ELSE                         NESTED IF

IF :

Single condition code block

Only one state output

If

(cond)

{

------

--------

}

Single condition code block identified in ----- if

HINT :

Identifier is always greater than zero

If(x<0)

{

Printf(“hello”);

}

IF ELSE :

It is a single condition block based on

T OR F OR else output

If(cond)

{

---------------

-----------------

}

Else

{

---------

}

Ex : if (10>20)

        Printf(“digital assistant”);

         Else

        Printf(“ap”)

Else block is called as false statement

Which of the following is the false block in if else -------------else

What are the condition states of if else ? a b both either a or b

When the false block is executed

Condition is not true

Condition is false

IF ELSE IF

Some times it is called as else if ladder

It is based on multiple conditions & multiple true statements

Multiple false statements

Last else is called as false

If cond(1)

True stmt 2

Else cond 2

True stme 2

Else if cond n

NESTED IF :

Arrange the if conditions in AND gate

All the conditions are based on only one block

If (cond 1)

If (cond 2)

If(cond n)

True (stmt)

There is no separate else block

Multiple condition blocks are based on single statement or single o/p

Is called as nested if

In nested if last block is called as true statement or block out put

SWITCH

It is identified by the switch block

Switch()

It can be devided into individual blocks named as cases

Case 1  case2 ….. casen

The syntax is related to if else if

Last else is called as default

Each case block terminated by the break statement

Switch(expr)

{

Case (i)

------

Break

}

Case (i)

------

Break

}

Case n

………

}

Break

Default

…….

}

Break statement is used to terminate the case blocks

Swith syntax is related to if else if

BREAK AND CONTINUE:

Terminate from code block

How to terminate the cursor from the method

How to terminate cursor from the loop

Ans : break

 

To terminate the cursor from the conditional code block break

Note : block statement is used on condition

Int x = 2

Void display()

{

If(x==3)

Break ;

Printf(“hello”);

CONTINUE :

 To move the cursor from its continuous statement to previous

 

Note :

No statements are executed after continue

Void display ()

{

Continue

Printf(“test”);

}

o/p : emply or blank

GOTO

Abnormal conditional implementation

It is used to implement unconditional code block based on “label”

Programme label is called as block identifier

Label is identified by the (:) operator

Main()

{

Test:

Printf(“Guntur”);

Go to test ;

}

How to implement abnormal condition loop --------------goto

How to implement unconditional code block -------------------goto

Label is called as block identifier

Goto is based in label

LOOP CONTROL STATEMENTS

LOOP CONTROL STATEMENTS

Toexecute the statements more than once

Continuous execution of statements based on specified condition

1.     Terminated loop---- inner loop , outer loop

2.     Unterminated loop – goto,break,continue

FOR               WHILE                          CONTINUE

 

FOR :

It is a multi statement loop

It is also called as statement loop code block

PARTS OF FOR LOOP

Initialization

Test condition

Increment or decrement

INITIALIZATION

To identify the booting index of the loop or initial index or starting index of the loop

L bond of the loop initialization

Initialization default value zero

TEST CONDITION

It is used to find the last index of loop

To find terminated index, to find last inded

To increase value by 1 or decrease value by 1

REALLOC:

To resize the declare(already allocated buffer)

Syntax :

<ptr location> =<type declaration>realloc(buffer size);

Already declare buffer

Ptr =<int *>realloc(size of(int));

The ptr already declared(existing ) buffer

FREE

To release the already allocated memory

Free (<ptr name>);

Free(ptr);

 

C TOKENS

IDENTIFIERS                                ALPHABETS

KEYWORDS                                 NUMBERS

CODE BLOCKS                             SPECIAL OPERATORS

STATIC CLASSES

AUTO                                        STATIC

EXTERN                                     REGISTER 


No comments:

Post a Comment

Ap Eapcet 2021 or Ap Eamcet 2021 Notification Exam dates counselling fee result

  Ap Eapcet 2021 or Ap Eamcet 2021  result here                                       RESULTS HERE   Ap Eapcet notification  released   S...