Wednesday, 5 March 2014

OUTPUT DEVICES


An output device is an electromechanical device which accepts data from a computer and translates  them into a form , which is suitable for use by the outside world(users). 
  Output devices can be broadly classified into the following two types;
Soft-Copy Output
Output which is not produced on a paper, is known as softcopy output. They are temporary in nature. For example, output displayed on a terminal screen, or spoken out by a voice response system are softcopy output.
     Advantages:
     1)Easily searchable.
     2)Can be easily updated and modified.
     3)Can be redistributed quickly via E-mail.
     4)Requires very little physical space. A CD can hold thousands documents.

Hard-Copy Output
    Output which is produced on a paper, is known as hard copy output. They are permanent in nature. For example, output produced by printers and plotters on paper are hard copy output.  
     Advantages:
     1)Can be used even while computer is not operating.
     2)Any unauthorized change can be detected easily.
     3)Some users like to read information.
    4)Can be redistributed to those persons who do not have computer.

    Types Of Output
    Some types of output are text, graphics , tactile, audio and video. Text consist of characters, no.’s and punctuation marks, or any other symbol requiring one byte of computer storage that are used to create words, sentences and paragraphs. Graphics are digital representation of non text information such as drawing, charts, photographs and animation. Tactile output such as raised line drawings may be useful for some individual who are blind .Audio is music ,speech, or any other sound. Video consists of images play back at speeds to provide the appearance of full motion.

  These examples of output device also include input/output device. Printers and visual displays are the most common types of output device for interfacing to people , but voice is becoming increasing available.

        Examples:

     1)Speakers

    2)Headphones

    3)Screen

    4)Printer

    5)Plotter

    6)Projector

    7)Radio

 
Submitted by:Satwinder kaur 
 Class:B.Sc.1st(comp.sci)
Roll no.:4213   

 

Introduction about memory:


Memory in a computer is required for storage and subsequent retrieval of the in the instruction and data . A computer system uses variety of devices for storing these instructions and data which are required for its operations.

  “The storage devices along with the algorithm or information   on how to control and manage these storage devices constitute the memory system of a computer.”
Memory system

   Memory system is a very simple system yet it exhibits a wide range of technology and its types. The basic objective of a computer system is to increase the speed of computation. Likewise the basic objective of a memory system is to provide fast uninterrupted access by the processor  to the memory such that the processor can operate at the speed it is expected to work.
   A memory system can be considered to consist of the three group of memories. These are:

Secondary/auxiliary memory

Auxiliary memory infect is much larger in size than main memory but is slower than main memory .It normally  stores system programs, instructions and data files. Secondary memory can also be used as an overflow memory in case the main memory capacity has been exceeded. Secondary memories can not be accessed directly by a processor. First the information of these memories is transferred to the main memory and then the information can be accessed as the information of main memory.
   Characteristics Terms of Memory Systems

    The following  terms are most commonly used for identifying comparative behavior of various memory devices and technologies :

 1)Storage Location:3 possible storage locations are:    a)Internal storage: We define internal storage which is      needed all the time and located inside also called primary    storage .

    b)External storage: We define this storage which is located outside of CUP but connected to CUP. It is also called secondary storage.       

2.Storage capacity:  

    It is the amount  of data that can be stored in the storage unit. The storage capacity can be expressed in terms of bytes.

    a)Bit :A binary digit is local 0 or 1 representing called a passive or an active state of a component in an electric circuit.

    b)Nibble: A group of 4 bits is called a nibble.

    c) Byte: A group of 8 bits is called byte. A byte is the smallest unit which can represent a data item or a character.

    3) Unit of transfer:

   Unit of transfer can a word or block. For internal memory, generally a unit of transfer is equal to the word length. For external memory, data are often transferred in much larger units than a word and these are referred to as a blocks.

    4)Performance : These are performance parameters:

    a)Access Time :Access time is defined as time required to locate and retrieve a record.
    b)Access rate: Access rate is defined as no. of read/ write operations carried out per second.  

5)Access Method:   

   Access refers to the way the memory can be addresses or recorded information can be accessed.

6)Physical type:

    A variety of physical types of memory have been employed. The two most common types today are semiconductor or magnetic memory.

 7)Physical characteristic: various physical characteristic are:

   1)Destructive read out:

     In this type the contents are read, they are wiped out . This is called destructive read out. Magnetic core memories are such memories.

    2)Dynamic Memories: In this type ,memory has the property that they tend to decay. Some semiconductor memory come into this category. The soln is Refreshing

    3)Volatile memories: These are those where information are lost when power is turned off. Semiconductor memories are of this type. The solution to the problem is using of UPS.

        Submitted by:kamaljeet kaur  
        Class:B.Sc.(com.sci.)1st
        Roll no.:4214
 

 

 

 

 

Sunday, 2 March 2014

Page Replacement

Page replacement: -                                                                            When the number of available real memory frames on the free list becomes low, a page stealer is invoked. A page stealer moves through the Page Frame Table (PFT), looking for pages to steal.
The PFT includes flags to signal which pages have been referenced and which have been modified. If the page stealer encounters a page that has been referenced, it does not steal that page, but instead, resets the reference flag for that page. The next time the clock hand (page stealer) passes that page and the reference bit is still off, that page is stolen. A page that was not referenced in the first pass is immediately stolen.
The modify flag indicates that the data on that page has been changed since it was brought into memory. When a page is to be stolen, if the modify flag is set, a page out call is made before stealing the page. Pages that are part of working segments are written to paging space; persistent segments are written to disk.
Figure 1. Page Replacement Example. The illustration consists of excerpts from three tables. The first table is the page frame table with four columns that contain the real address, the segment type, a reference flag, and a modify flag. A second table is called the free list table and contains addresses of all free pages. The last table represents the resulting page frame table after all of the free addresses have been removed.   

 In addition to the page-replacement, the algorithm keeps track of both new page faults (referenced for the first time) and repage faults (referencing pages that have been paged out), by using a history buffer that contains the IDs of the most recent page faults. It then tries to balance file (persistent data) page outs with computational (working storage or program text) page outs.
When a process exits, its working storage is released immediately and its associated memory frames are put back on the free list. However, any files that the process may have opened can stay in memory.
Page replacement is done directly within the scope of the thread if running on a uniprocessor. On a multiprocessor system, page replacement is done through the lrud kernel process, which is dispatched to a CPU when the minfree threshold has been reached. Starting with AIX® 4.3.3, the lrud kernel process is multithreaded with one thread per memory pool. Real memory is split into evenly sized memory pools based on the number of CPUs and the amount of RAM. The number of memory pools on a system can be determined by running the vmstat -v command.
You can use the vmo -r -o me pools= <number of memory pools> command to change the number of memory pools that will be configured at system boot. The values for the minfree and maxfree parameters in the vmo command output is the sum of the min free and max free parameters for each memory pool.
1.  RAND (Random)
  • choose any page to replace at random
  • assumes the next page to be referenced is random
  • can test other algorithms against random page replacement
2. MIN (minimum) or OPT (optimal):
  • Be lady’s optimal algorithm for the minimum number of page faults
  • replace the page that will be referenced furthest in the future or not at all
  • problem: we cannot implement it, because we cannot predict the future
  • this is the best case
  • can use it to compare other algorithms against
3. FIFO (First In, First Out):
  • select the page that has been in main memory the longest
  • use a queue (data structure)
  • problem: although a page has been present for a long time, it may be really useful
  • Windows NT and Windows 2000 use this algorithm, as a local page replacement algorithm (described separately), with the pool method (described in more detail separately)
    • create a pool of the pages that have been marked for removal
    • manage the pool in the same way as the rest of the pages
    • if a new page is needed, take a page from the pool
    • if a page in the pool is referenced again before being replaced in memory, it is simply reactivated
    • this is relatively efficient
4. LRU (Least Recently Used):
  • choose the page that was last referenced the longest time ago
  • assumes recent behavior is a good predictor of the near future
  • can manage LRU with a list called the LRU stack or the paging stack (data structure)
  • In the LRU stack, the first entry describes the page referenced least recently, the last entry describes to the last page referenced.
  • if a page is referenced, move it to the end of the list
  • problem: requires updating on every page referenced
  • too slow to be used in practice for managing the page table, but many systems use approximations to LRU
5. NRU (Not Recently Used):
  • as an approximation to LRU, select one of the pages that has not been used recently (as opposed to identifying exactly which one has not been used for the longest amount of time)
  • keep one bit called the "used bit" or "reference bit", where 1 => used recently and 0 => not used recently
  • variants of this scheme are used in many operating systems, including UNIX and Macintosh
  • Most variations use a scan pointer and go through the page frames one by one, in some order, looking for a page that has not been used recently.
                          
SUBMITTED BY:-Diksha
                 Class:-B.sc 2nd year (c.s)
                 Roll no.:-2319

                 Topic:-Page Replacement