Tuesday, December 29, 2009

Types of PAGING in Operating System

Demand paging

Demand paging refuses to guess. With demand paging, no pages are brought into RAM until necessary. In particular, with demand paging, a program usually begins execution with none of its pages pre-loaded in RAM. Pages are copied from the executable file into RAM the first time the executing code references them, usually in response to a page fault. During a particular run of a program, pages of the executable file that implement functionality not used on that particular run are never loaded.

Loader Paging

Loader paging[original research?] guesses that the entire program will be used. Many operating systems (including those with a relocating loader) load every page of a program into RAM before beginning to execute the program.

Anticipatory Paging

Technique that preloads a process's nonresident pages that are likely to be referenced in the near future. Such strategies attempt to reduce the number of page faults a process experiences.

Swap Prefetch

A few operating systems use anticipatory paging, also called swap prefetch. These operating systems periodically attempt to guess which pages will soon be needed, and start loading them into RAM. There are various heuristics in use, such as "if a program references one virtual address which causes a page fault, perhaps the next few pages' worth of virtual address space will soon be used" and "if one big program just finished execution, leaving lots of free RAM, perhaps the user will return to using some of the programs that were recently paged out".


Unix operating systems periodically use sync to pre-clean all dirty pages. This makes starting a large new program run much faster, because it can be loaded into page frames that held clean pages that were dropped, rather than being loaded into page frames that were dirty and needed to be written back to disk before they were dropped.

 Thrashing is a phenomenon in a virtual memory system where an excessive amount of page swapping back and forth between main memory and secondary storage results in higher overhead and a little useful work.

An example of demand paging that results in a page swap each time the loop is executed and results in thrashing.

An interesting characteristic of thrashing is that as the working set grows, there is very little increase in the number of faults until the critical point (when faults go up dramatically and majority of system's processing power is spent on handling them).

To decrease excessive paging, and thus possibly resolve thrashing problem, a user can do any of the following:

Increase the amount of RAM in the computer (generally the best long-term solution).

Decrease the number of programs being concurrently run on the computer.

The term thrashing is also used in contexts other than virtual memory systems, for example to describe cache issues in computing or silly window syndrome in networking.

Concept of Paging in Operating System

Concept of paging in Operating System comes in the second year of BCA in the Gujarat University syllabus. J.G. College this was asked in the assignment. It may be of interest for others too.

Page : A fixed – size section of a user’s job that corresponds to page frame in the memory.


In computer operating systems that have their main memory divided into pages, paging (sometimes called swapping) is a transfer of pages between main memory and an auxiliary store, such as hard disk drive.

[1] Paging is an important part of virtual memory implementation in most contemporary general-purpose operating systems, allowing them to use disk storage for data that does not fit into physical RAM. Paging is usually implemented as a task built into the kernel of the operating system


The main functions of paging are performed when a program tries to access pages that do not currently reside in RAM. This situation is known as a page fault. The Operating System must then take control and handle the page fault, in a manner invisible to the program. Therefore, the operating system must:

           Determine the location of the data in auxiliary storage.

          Obtain an empty page frame in RAM to use as a container for the data.

          Load the requested data into the available page frame.

          Return control to the program, transparently retrying the instruction that caused the page fault.

         The need to reference memory at a particular address arises from two main sources:

          Processor trying to load and execute a program's instructions itself.

          Data being accessed by a program's instruction.

In step 2, when a page has to be loaded and all existing pages in RAM are currently in use, one of the existing pages must be swapped with the requested new page. The paging system must determine the page to swap by choosing one that is least likely to be needed within a short time. There are various page replacement algorithms that try to answer such issue.

Most operating systems use the least recently used (LRU) page replacement algorithm. The theory behind LRU is that the least recently used page is the most likely one not to be needed shortly; when a new page is needed, the least recently used page is discarded. This algorithm is most often correct but not always: e.g. a sequential process moves forward through memory and never again accesses the most recently used page.

If a page chosen to be swapped has been modified since loading (if page is dirty), it has to be written to auxiliary storage, otherwise it is simply discarded.

In addition to swapping in pages because they are necessary, in reaction to a page fault, there are several strategies for guessing what pages might be needed, and speculatively pre-loading them.

Other Posts :

Demand Paging

MIS Case Study of Databases behind MySpace

Paging Terminology

Handling Multinational Market on Web

Mode and Media for Communication


The transmission and interchange of ideas, facts, feelings, or courses of action is known as the communication.

No individual or organization can survive without communication. All the activities we pass through in life pass through communication. Right from the birth when a child communicates its arrival by crying till the end of the life we keep on trying to communicate. The better one communicates, the greater are its chances of quick progress.

We observe that the people at the pinnacle of their profession generally have excellent communication skills.


There are various modes used by living being since ancient time to communicate. When the languages were not properly developed it is believed that the human was communicating by signs or acts. In a communication the sender encodes the message and sends it through a channel. This channel is nothing but the language used - words, actions, signs, objects etc.

The receiver receives the message, decodes it and acts on it. The transmission of the receiver’s response to the sender is called feedback. Feedback is essential, it is the barometer of effective communication.

Essentials of effective communication are :

                                      A common communication environment

                                      Co-operation between the sender and the receiver

                                      Selection of an appropriate channel.

                                      Correct encoding and decoding of the message.

                                      Receipt of the desired response and feedback.

Different Modes of Communication :

A message can be communicated in various modes :

                                            Oral / Verbal

                                             Written

                                             Symbolic / Visual

One can communicate by either one of these or combinations of these.

Traffic signals on the road are symbolic way of communicating if people are allowed to pass or wait.

A dancer uses various mudras to make expression for communicating verses of the poem.

In both the above cases sender and receiver of the symbol understand same meaning. Red signal means to halt, Green to move.

Both the above are examples of Symbolic or visual mode of communication, yet there is a difference in the above two methods. First is using electrical media and the second is using a manual media.

Meaning this, different modes may need some media or channel to communicate. Selection of media or channel depends on various factors, form, distance, availability of resources etc.

Oral or verbal communication is most widely used. Two persons facing each other may use simple words and communicate easily. But for the persons at more distance there might be need of a loud speaker Yet if more is the distance they might need telephone or a mobile as media to communicate.

Written mode is assumed to be most authentic mode of communication. The biggest advantage of the written communication is that alertness of sender and receiver at the same time is not always required. Receiver can read at per its convenience.

Most popular media for the written mode are books, periodicals, newspapers and now a days SMS and internets.

To make communication effective more than one type of communications are mixed. Audio-Video communication last longer impression on the minds of the receiver.

A student learns more easily in the class room than by reading a text book as the teacher in class room uses combination of different modes. Teacher would write important notes on the black board and then explain the same orally and may use models to further elaborate the fundamentals.

So we conclude that effective communication need choice of right mode and media.


Global warming is the increase in the average measured temperature of the Earth's near-surface air and oceans.

The awareness about this term has grown to the level that projects are given even at the primary level in schools like St. Kabir in Ahmedabad.

Greenhouse effect is the process by which absorption and emission of infrared radiation by atmospheric gases warm a planet's lower atmosphere and surface.

The greenhouse effect was discovered by Joseph Fourier in 1824 and was first investigated quantitatively by Svante Arrhenius in 1896.

Q . What causes global warming?

Ans :   Carbon dioxide and other air pollution that is collecting in the atmosphere like a thickening blanket, trapping the sun's heat and causing the planet to warm up.

Coal-burning power plants are the largest source of carbon dioxide pollution.

Automobiles, the second largest source, create nearly 1.5 billion tons of CO2 annually.

The above data is pertaining to US, but in nut shell growth in industrialization is increasing the level of greenhouse gases (like CO2) on the atmosphere. The activities that generate more of these gases are those were fossile fules are being burned. Temperatures increased around 1ยบ Celsius, in the 20th Century. Greenhouse gases act as a dampening factor to the cooling of the earth, and remain in the atmosphere for long periods of time.

Q   What are the current trends in greenhouse gas emissions?

Global greenhouse gas emissions have grown markedly since pre-industrial times, with a 70% increase from 1970 to 2004 alone. Over this period, emissions from the transport and energy sectors have more than doubled.

NGOs and other agencies have understood the hazards of this trend have started putting pressure on governments all around the world. Policies put in place in some countries have been effective in reducing emissions in those countries to a certain degree, but not sufficiently to counteract the global growth in emissions.

Without additional measures to mitigate climate change, global green house gas emissions will continue to grow over the coming decades and beyond. Most of this increase would come from developing countries, where per capita emissions are still considerably lower than those in developed countries

Q. What actions can be taken to reduce greenhouse gas emissions?

Ans : The solution can be three pronged :

Penalize those who are harming environment and reward those who help in controlling the green house gas emission.

Make people aware to educate them to use products and technology which in environment friendly.

Both these solutions need increased cost and so in the present recessionary market would have high degree of resistance.

Mitigation measures to reduce greenhouse gas emissions have a certain cost. However, they also constitute an economic benefit by reducing the impacts of climate change, and the costs associated with them. In addition, they can bring economic benefits by reducing local air pollution and energy resource depletion.

If the benefits of avoided climate change are taken into account and a “carbon price” is established for each unit of greenhouse gas emissions, this could create incentives for producers and consumers to significantly invest in products, technologies and processes which emit less greenhouse gases. The resulting mitigation potential is substantial and could offset the projected growth of global emissions over the coming decades or reduce emissions below current levels.

Mitigation measures could contribute to stabilizing the concentration of greenhouse gases in the atmosphere by 2100 or later. To achieve low stabilization levels, stringent mitigation efforts are needed in the coming decades. This could reduce global GDP by up to a few percent. But this is the investment for less risky future.

Changes in lifestyle and behaviours that favour resource conservation can contribute to climate change mitigation. technologies exist today to make cars that run cleaner and burn less gas, modernize power plants and generate electricity from non-polluting sources, and cut our electricity use through energy efficiency. The challenge is to be sure these solutions are put to use.

Mitigation measures can also have other benefits for society, such as health cost savings resulting from reduced air pollution. However, mitigation in one country or group of countries could lead to higher emissions elsewhere or effects on the global economy.


Current warming trends are unequivocal. It is very likely that greenhouse gases released by human activities are responsible for most of the warming observed in the past fifty years. The warming is projected to continue and to increase over the course of the 21st century and beyond.

Climate change already has a measurable impact on many natural and human systems. Effects are projected to increase in the future and to be more severe with greater increases in temperature. Adaptation measures are already being implemented, and will be essential in order to address the projected consequences. There is, however, a limit to adaptation; mitigation measures will also be needed in order to reduce the severity of impacts.

Mitigation measures that aim to reduce greenhouse gas emissions can help avoid, reduce or delay many impacts of climate change. Policy instruments could create incentives for producers and consumers to significantly invest in products, technologies and processes which emit less greenhouse gases. Without new mitigation policies, global greenhouse gas emissions will continue to grow over the coming decades and beyond. Rapid world-wide investments and deployment of mitigation technologies, as well as research into new energy sources will be necessary to achieve a stabilization of the concentration of greenhouse gases in the atmosphere.

No one sector or technology can address the entire mitigation challenge. All sectors including buildings, industry, energy production, agriculture, transport, forestry, and waste management could contribute to the overall mitigation efforts, for instance through greater energy efficiency. Many technologies and processes which emit less greenhouse gases are already commercially available or will be in the coming decades. More...

In order to stabilize the concentration of greenhouse gases in the atmosphere, emissions would have to stop increasing and then decline. The lower the stabilization level aimed for, the more quickly this decline would need to occur. World-wide investments in mitigation technologies, as well as research into new energy sources, will be necessary to achieve stabilization. Delaying emission reduction measures limits the opportunities to achieve low stabilization levels and increases the risk of severe climate change impacts.