Saturday, March 30, 2013

SDRAM Memory


SDRAM Memory

What is SDRAM Memory?

  • SDRAM - Synchronous Dynamic Random-Access Memory.
  • Its speed rating is given in MHz to easily compare it to system board bus speeds. 
  • This type of memory synchronizes its input and output signals with the incoming clock that is used in the system board. 

  • By doing so, data transactions can continually take place with each successive rising edge of the clock. 
  • As seen in the diagram below, the clock is used as the main determining factor for memory data operation. The memory array is composed of two banks that can be accessed independently. 


SDRAM advantages



·         SRAM: The basic entity for storage (each cell) is the flip-flop (comprised of transistors). It does have a fast access compared to others.But it's expensive and space consuming due to the the number of transistors employed.

·         DRAM: Each cell is a transistor-capacitor circuit.The capacitor acts as a storage device, whereas transistor is the controlling unit which decides if a read/write should be performed on the specific cell. Also RAM controller needs to refresh the cells at regular intervals to overcome the shortcoming of capacitor leakage

·         SDRAM: This is an succession of DRAM, except that the each operation on the RAM is synchronized with the system clock.



System Software and its Types


System Software

A system software is a collection of software programs that enable the user to interact with the computing device without getting lost among the complexities of technical interactions between mechanical parts and machine-oriented codified programs. These programs are the building blocks that construct the entire system software architecture including the parts that regulate input/output functions, those that provide application software platforms and the various different types of operating system software component programs.

Types of System Software

Boot Firmware:
Also known as boot loaders these programs are the first ones to run when a PC is started. A boot loader loads and runs the main operating system on the computer when it starts. This system software component is also known as BIOS on IBM compatible computing devices.

Database Management Systems:
This is a set of programs that manage and regulate the user database right from creation to maintenance and extending to the use of such database. The DBMS is responsible for allowing different user applications to access a single database at the same time. This set of programs is what lies at the base of all computer network models that enable users to retrieve data from an integrated collection in a structured manner and does away with the user having to write complex programs in machine language to extract information from the data pool.

Output Interface:
This program determines whether the desktop environment will be in the form of a character user interface or if it will be in the form of a graphical user interface.
Also, besides determining the desktop environment, these programs also provide various options that allow the user to access other features of the OS from the desktop.

Virtual Machine Monitors:
Also known as hypervisors, these programs allow multiple operating systems to run on a single host computer system simultaneously. These other computer systems that access the host are known as guests and the host is able to allow multiple operating systems to run simultaneously under the hardware virtualization process.

Link Editors:
Commonly known as linkers, link editors collect multiple object files that the compiler programs, generate and put them together as an executable program which is capable of performing desired tasks as instructed by codified instructions.

Loaders:
A loader is an inbuilt component of the operating system that loads programs onto the computer memory and makes them ready for execution. This process involves loading the program text from the executable file onto the computer memory and preparing the executable file to run. This is one of the various initial stages involved in running any program on the operating system.

Shell:
Shells are programs that make the interaction between the kernel of the OS and the user possible. It is the outer layer of a computing interface that makes information interchange between the OS and the user possible.

Utility Software:
These programs offer the various maintenance and performance evaluation utility tools to configure and optimize the various processes that influence the performance of your computer. Disk cleaners, anti-virus software, data compression programs, disk drive partition utilities, storage, backup and archiving programs are some of the common examples of utility software.


Different Types Of RAM


Different Types Of RAM


Static Ram (SRAM) and  Dynamic Ram (DRAM):

 The major difference between them is the lifetime of the data they store. SRAM retains its contents as long as electrical power is applied to the chip. If the power is turned off or lost temporarily, its contents will be lost forever.


DRAM is dynamic in that, unlike static RAM (SRAM), it needs to have its storage cells refreshed or given a new electronic charge every few milliseconds. Static RAM does not need refreshing because it operates on the principle of moving current that is switched in one of two directions rather than a storage cell that holds a charge in place. Static RAM is generally used for cache memory, which can be accessed more quickly than DRAM. 


DRAM stores each bit in a storage cell consisting of a capacitor and a transistor. Capacitors tend to lose their charge rather quickly; thus, the need for recharging.

DRAM Types :

SDRAM (synchronous DRAM) is a generic name for various kinds of dynamic random access memory (DRAM) that are synchronized with the clock speed that the microprocessor is optimized for. This tends to increase the number of instructions that the processor can perform in a given time. The speed of SDRAM is rated in MHz rather than in nanoseconds (ns). This makes it easier to compare the bus speed and the RAM chip speed. You can convert the RAM clock speed to nanoseconds by dividing the chip speed into 1 billion ns (which is one second). For example, an 83 MHz RAM would be equivalent to 12 ns.

RDRAM -- Rambus DRAM

RDRAM make sure that all memory sockets of a channel are filled with either a memory chip or a continuity module. 


RDRAM often has to be installed in pairs of the same type of memory chips.
RDRAM devices may be configured into single-, dual- or quad-channel RIMM modules. For dual-channel or quad-channel (4-channel) RDRAM chipsets and motherboards, memory module upgrades should be in matched pairs. For instance, to add 512MByte of memory into a dual or 4-channel system, two matched 256MByte modules should be inserted. 32bit RIMM modules, such as RIMM 4200, 4800, and 6400 modules, can be upgraded singly on dual channel systems.

DDR SDRAM -- Double Data Rate SDRAM

DDR SDRAM is synchronous dynamic RAM (SDRAM) that can theoretically improve memory clock speed to at least 200 MHz*. It activates output on both the rising and falling edge of the system clock rather than on just the rising edge, potentially doubling output. It's expected that a number of Socket 7 chipset makers will support this form of SDRAM. When released DDR SDRAM memory was about twice as expensive as conventional SDRAM memory.

Cache

Cache Memory is fast memory that serves as a buffer between the processor and main memory. The cache holds data that was recently used by the processor and saves a trip all the way back to slower main memory. The memory structure of PCs is often thought of as just main memory, but it's really a five or six level structure:
The first two levels of memory are contained in the processor itself, consisting of the processor's small internal memory, or registers, and L1 cache, which is the first level of cache, usually contained in the processor.


The third level of memory is the L2 cache, usually contained on the motherboard. However, the Celeron chip from Intel actually contains 128K of L2 cache within the form factor of the chip. More and more chip makers are planning to put this cache on board the processor itself. The benefit is that it will then run at the same speed as the processor, and cost less to put on the chip than to set up a bus and logic externally from the processor.
The fourth level, is being referred to as L3 cache. This cache used to be the L2 cache on the motherboard, but now that some processors include L1 and L2 cache on the chip, it becomes L3 cache. Usually, it runs slower than the processor, but faster than main memory.
The fifth level of memory is the main memory itself.
The sixth level is a piece of the hard disk used by the Operating System, usually called virtual memory. Most operating systems use this when they run out of main memory, but some use it in other ways as well.

Types of Computer Memory


Computer Memory
Memory is one of the most important things that is incorporated into computers, be it laptop computers or PCs. There are various types of computer memory that can be installed, depending upon the actual need for functioning and specifications of the system. The memory relates to the many devices and components that are responsible for storing data and applications on a temporary or a permanent basis. It enables a person to retain the information that is stored on the computer. Without it, the processor would not be able to find a place which is needed to store the calculations and processes. There are different types of memory in a computer that are assigned a task of storing several kinds of data. Each has certain peculiarities and capacities.

Types of Computer Memory

Random Access Memory (RAM)

RAM is a location within the computer system which is responsible for stacking away data on a temporary basis, so that it can be promptly accessed by the processor. The information stored in RAM is typically loaded from the computer's hard disk, and includes data related to the operating system and certain applications. When the system is switched off, RAM loses all the stored information. The data remains stored and can be retained only when the system is running.




When the RAM gets full, the computer system is more likely to operate at a slow speed. The data can be retrieved in any random order. Generally, there are two types of RAM; namely Static RAM (SRAM) and Dynamic RAM (DRAM). When many programs are running on the computer simultaneously, the virtual memory allows the computer to search in RAM for memory portions which haven't been utilized lately and copy them onto the hard drive. This action frees up RAM space and enables the system to load different programs.

Read Only Memory (ROM)

This type of memory is active, regardless of whether the system is turned on or is switched off. It is a kind of permanent non-volatile storage memory. As the name 'read only' suggests, the contents in it cannot be changed or modified. It is an integrated circuit which is pre-programmed with important data that should necessarily be present for the computer to carry out its normal functionalities.


Cache Memory

Cache is a kind of RAM which a computer system can access more responsively than it can in regular RAM. The central processing unit looks up in the cache memory before searching in the central memory storage area to determine the information it requires. This rules out the need for the system to search for information in larger and bigger memory storage areas, which in turn leads to a faster extraction of data.



Computer Hard Drive

These devices are important data storage components that are installed in the CPU. Their memory ranges widely, and a user may choose the memory depending on the data needed to be stored and accessed. Nowadays, hard drives having a memory capacity of 120 gigabytes to 500 gigabytes are normally used.


Flash Memory


This is a non-volatile kind of memory which is intended to contribute to portable storage and a convenient transfer of data from one computer to another. The data in it can be erased and re-programmed as per the user's requirements. It only has a specific number of erase and write cycles that it can withstand, after which it creates a tendency to lose out on the stored information. Memory cards and USB flash drives are some modes of this type of memory storage.


These are just the common and main computer memory types which facilitate memory and data storage. However, there are many subtypes which are sorted out according to the memory-related functionalities they perform and the requirements they serve.


Friday, March 29, 2013

Different Types of Application Software



Application Software

Application software utilizes the capacities of a computer directly for a dedicated task. Application software is able to manipulate text, numbers and graphics. It can be in the form of software focused on a certain single task like word processing, spreadsheet or playing of audio and video files.

Different Types of Application Software

Word Processing Software:
This software enables users to create and edit documents. The most popular examples of this type of software are MS-Word, WordPad and Notepad among other text editors.

Database Software:
Database is a structured collection of data. A computer database relies on database software to organize data and enable database users to perform database operations. Database software allows users to store and retrieve data from databases. Examples are Oracle, MSAccess, etc.

Spreadsheet Software:
Excel, Lotus 1-2-3 and Apple Numbers are some examples of spreadsheet software. Spreadsheet software allows users to perform calculations using spreadsheets. They simulate paper worksheets by displaying multiple cells that make up a grid.

Multimedia Software:
They allow users to create and play audio and video files. They are capable of playing media files. Audio converters, audio players, burners, video encoders and decoders are some forms of multimedia software. Examples of this type of software include Real Player and Media Player.

Presentation Software:
The software that is used to display information in the form of a slide show is known as presentation software. This type of software includes three functions, namely, editing that allows insertion and formatting of text, methods to include graphics in the text and a functionality of executing slide shows. Microsoft PowerPoint is the best example of presentation software.

Enterprise Software:
It deals with the needs of organization processes and data flow. Customer relationship management or the financial processes in an organization are carried out with the help of enterprise software.

Information Worker Software:
Individual projects within a department and individual needs of creation and management of information are handled by information worker software. Documentation tools, resource management tools and personal management systems fall under the category of this type of application software.

Educational Software:
It has the capabilities of running tests and tracking progress. It also has the capabilities of a collaborative software. It is often used in teaching and self-learning. Dictionaries like Britannica and Encarta, mathematical software like Matlab and others like Google Earth and NASA World Wind are some of the well-known names in this category.

Simulation Software:
Used to simulate physical or abstract systems, simulation software finds applications in both, research and entertainment. Flight simulators and scientific simulators are examples of simulation software.

Content Access Software:
It is used to access content without editing. Common examples of content access software are web browsers and media players.

Application Suites:
An application suite is an important type of application software. It consists of a group of applications combined to perform related functions. OpenOffice.org and Microsoft Office are the best examples of this type of application software. These application suites, as you know, come as bundles of applications like word processors, spreadsheets, presentation software, etc. Applications in the suite can work together or operate on each other's files.

Software that aid Engineering and Development of Products:
These software are used in the design and development of hardware and software products. Integrated development environments (IDE) and computer language editing tools falls under this type of application software. Interestingly, software products are developed using other software, and software communicate with one another through software. Application programming interfaces which aid the communication of two or more software, are examples of this application software type.

Graphics Programs (vector-based):
This software creates graphics that are similar to illustrations or cartoon drawings.
Adobe Illustrator, Corel Draw, AppleWorks, MS Works, MS Word, .....

Communications software 
This software allows two computers with modems to communicate through audio, video, and/or chat-based means.
MS NetMeeting, AOL Instant Messenger, IRC, ICQ, CU-SeeMe, ...

Thursday, March 28, 2013

Deadlock



Deadlock

Definition
  • A set of process is in a deadlock state if each process in the set is waiting for an event that can be caused by only another process in the set. 
  • In other words, each member of the set of deadlock processes is waiting for a resource that can be released only by a deadlock process. 
  • None of the processes can run, none of them can release any resources, and none of them can be awakened. 
  • It is important to note that the number of processes and the number and kind of resources possessed and requested are unimportant.


  • The resources may be either physical or logical. Examples of physical resources are Printers, Tape
  • Drivers, Memory Space, and CPU Cycles. Examples of logical resources are Files, Semaphores, and
  • Monitors.


Preemptable and Nonpreemptable Resources



Resources come in two flavors:
  • A preemptable resource is one that can be taken away from the process with no ill effects. Memory is an example of a preemptable resource.
  • A non-preemptable resource is one that cannot be taken away from process (without causing ill effect).
  • For example, CD resources are not preemptable at an arbitrary moment.
  • Reallocating resources can resolve deadlocks that involve preemptable resources.


Necessary and Sufficient Deadlock Conditions



Coffman conditions that must hold simultaneously for there to be a deadlock.

1.Mutual Exclusion Condition

The resources involved are non-shareable.

Explanation: At least one resource (thread) must be held in a non-shareable mode, that is, only one
process at a time claims exclusive control of the resource. If another process requests that resource, the
requesting process must be delayed until the resource has been released.

2.Hold and Wait Condition

Requesting process hold already, resources while waiting for requested resources.

Explanation: There must exist a process that is holding a resource already allocated to it while waiting for
additional resource that are currently being held by other processes.

3.No-Preemptive Condition
Resources already allocated to a process cannot be preempted.

Explanation: Resources cannot be removed from the processes are used to completion or released
voluntarily by the process holding it.

4.Circular Wait Condition

The processes in the system form a circular list or chain where each process in the list is waiting
for a resource held by the next process in the list.

As an example, consider the traffic deadlock in the following figure


Consider each section of the street as a resource.

1. Mutual exclusion condition applies, since only one vehicle can be on a section of the street at a
time.

2. Hold-and-wait condition applies, since each vehicle is occupying a section of the street, and
waiting to move on to the next section of the street.

3. No-preemptive condition applies, since a section of the street that is a section of the street that is
occupied by a vehicle cannot be taken away from it.

4. Circular wait condition applies, since each vehicle is waiting on the next vehicle to move. That is,
each vehicle in the traffic is waiting for a section of street held by the next vehicle in the traffic.
The simple rule to avoid traffic deadlock is that a vehicle should only enter an intersection if it is assured
that it will not have to stop inside the intersection.
It is not possible to have a deadlock involving only one single process. The deadlock involves a circular
“hold-and-wait” condition between two or more processes, so “one” process cannot hold a resource, yet be
waiting for another resource that it is holding. In addition, deadlock is not possible between two threads in
a process, because it is the process that holds resources, not the thread that is, each thread has access to the
resources held by the process.



Deadlock Detection

Deadlock detection is the process of actually determining that a deadlock exists and identifying the processes and resources involved in the deadlock.

The basic idea is to check allocation against resource availability for all possible allocation sequences to determine if the system is in deadlocked state a. Of course, the deadlock detection algorithm is only half of this strategy. Once a deadlock is detected, there needs to be a way to recover several alternatives exists:

  •  Temporarily prevent resources from deadlocked processes.
  •  Back off a process to some check point allowing preemption of a needed resource and restarting
  • the process at the checkpoint later.
  • Successively kill processes until the system is deadlock free.
  • These methods are expensive in the sense that each iteration calls the detection algorithm until the system
  • proves to be deadlock free. The complexity of algorithm is O(N2) where N is the number of proceeds.
  • Another potential problem is starvation; same process killed repeatedly.

Deadlock Avoidance
This approach to the deadlock problem anticipates deadlock before it actually occurs. This approach employs an algorithm to access the possibility that deadlock could occur and acting accordingly. This method differs from deadlock prevention, which guarantees that deadlock cannot occur by denying one of the necessary conditions of deadlock.

If the necessary conditions for a deadlock are in place, it is still possible to avoid deadlock by being careful when resources are allocated. Perhaps the most famous deadlock avoidance algorithm, due to Dijkstra [1965], is the Banker’s algorithm. So named because the process is analogous to that used by a banker in deciding if a loan can be safely made.   

File Management

Purpose of a File Management


The file manager handles all files on secondary storage media. To perform these tasks, file management must:
  • be able to identify the numerous files by giving unique names to them
  • maintain a list telling where exactly each file is stored, how many sectors on the medium it occupies, and in which order those sectors make up the file
  • provide simple and fast algorithms to read and write files in cooperation with the device manager
  • give and deny access rights on files to users and programs
  • allocate and deallocate files to processes in cooperation with the process manager
  • provide users and programs with simple commands for file handling



File names, naming conventions


In order to make users, programs and the file manager itself able to identify the different files they must be given a unique file name.

The relative file name is what a user normally recognises as file name; it consists of a name and an extension, for instance problem.txt or forloop.cpp. Apart from some exceptions, relative file names look the same in all operating systems.
The name is normally given by the user, whereas the extension (which is separated from the name by a dot) generally indicates what kind of file it is.

The absolute file name is normally much longer than the user thinks it is. Here, the relative file name is preceeded by the place on disk it is stored, that is: the drive name and the directory names in which to find that file.
So the absolute file name consists of:
  1. drive name
  2. directory name(s)
  3. file name
  4. extension
File name and extension are separated by a dot. The directories are separated by slashes (UNIX) or back slashes (Windows, DOS). Because drive names and file organization differ from OS to OS, absolute file names look different depending on what operating system is used.

For instance, a file with the relative name syllabus.doc, saved by the user Peter in the directory data would look like that
in DOS:
c:\data\syllabus.doc
in LINUX:
/usr/home/Peter/data/syllabus.doc
Note that the absolute file name changes when the location is different. The relative file name, however, stays the same. So, after saving that file on a floppy disk, the absolute file name of the backup would be
in DOS:
a:\syllabus.doc
in LINUX:
/mnt/fdd0/syllabus.doc


A relative file name is restricted in length. How this restriction exactly looks like again depends on the OS. DOS has the hardest restictions, allowing the file name and also all directory names only to be 8 characters long, and the extension 3. This is properly known as "8.3"-restiction (speak: eight-dot-three). All other OS's allow the relative file name to be at least 14, but most often up to 255 characters long.

File allocation on storage media

On the storage medium a file is saven in blocks (sectors) of equal size. To access these files, device manager and file manager work together: The device manager "knows" where to find each sector on disk, but only the file manager has a list telling in what sectors either file is stored. This list is the File Allocation Table (FAT)

There are different ways of allocating files. The main concern is to provide a strategy that lets the FAT not grow too large, that makes it possible to retrieve a special sector of a file, and that wastes not too much storage space.
  • contiguous file allocation
  • non-contiguous file allocation (FAT)
  • chained allocation
  • indexed allocation

Contiguous file allocation

With contiguous file allocation a single set of blocks is allocated to a file at the time of file creation. Each file is stored contiguously, one sector after another.

The advantage is that the FAT only has to have a single entry for each file, indicating the name, the start sector, and the length. Moreover, it is easy to get a single block because its address can simply be calculated: If a file starts at sector c, and the nth block is wanted, the location on secondary storage is simply c+n.

The disadvantage is that it may be difficult (if not impossible) to find a sufficiently large set of contiguous blocks. From time to time it will be neccessary to perform compaction.

Contiguous file allocation is nowadays only used for tapes and recordable CDs. One does not make use of compaction algorithms, though, because data there is not supposed to be changed. It is rather overwritten/thrown away if no longer needed.

Non-contiguous file allocation (FAT)

With non-contiguous file allocation all blocks of a file can be distributed all over the storage medium. The File Allocation Table (FAT) lists not only all files, but has an entry for each sector the file occupies. Because all information is stored in the FAT, and no assumption on the distribution of the file is taken, this method of allocation is sometimes simply called FAT.

The advantage is that it is very easy to get a single block, because each block has its entry in the FAT. Additionally, it is a very simple allocation method where not much overhead is produced and no sophisticated search method for free blocks is needed.