+ All Categories
Home > Engineering > Swap project

Swap project

Date post: 08-Apr-2017
Category:
Upload: ashutosh123gupta
View: 78 times
Download: 0 times
Share this document with a friend
18
PRESENTED BY: ASHUTOSH GUPTA SOKINA SOROKHAIBAM CHITARANJAN H SWAP ADMINISTRATION
Transcript
Page 1: Swap project

PRESENTED BY:ASHUTOSH GUPTASOKINA SOROKHAIBAMCHITARANJAN H

SWAP ADMINISTRATION

Page 2: Swap project

OBJECTIVE:-

How to create and manage Linux swap space, file based swap, partition based swap??

To create swap space if physical memory is full.

If needed increase the amount of swap space.To create swap space even if there is not

available partition, but space is available in already existing partitions.

Page 3: Swap project

SWAP SPACE

Linux divides its physical RAM (random access memory) into chucks of memory called pages.

Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory.

The combined sizes of the physical memory and the swap space is the amount of virtual memory available.

Page 4: Swap project

SWAPPING:-

Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory.

If a process needs to bring a virtual page into physical memory and there are no free physical pages available, the operating system must make room for this page by discarding another page from physical memory.

Page 5: Swap project

SWAP TYPES:-

Swap space can bea dedicated swap partition (recommended)a swap filea combination of swap partitions and swap

files.

Page 6: Swap project

NEED OF SWAP SPACE

Swap space in Linux is used when the amount of physical memory (RAM) is full.

If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space.

While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.

Page 7: Swap project

WHY SWAPPING:

Shortage of memory Efficient memory management needed Process may be too big for physical memory More active processes than physical memory can

hold

Requirements of multiprogramming

Efficient protection scheme Simple way of sharing

Page 8: Swap project

TOPOLOGICAL DIAGRAM:-

Page 9: Swap project

CONFIGURING SWAP SPACE USING DRIVE PARTITION

STEPS:-First check the current swap usage by using the

commands “swapon –s” or “free”.Create a new partition using fdisk. Set the partition’s

system id as “82” (Linux Swap / Solaris).Prepare the swap partition:- “mkswap <partition name>” Enable the swap space for use by the system:- Temporary enable: “swapon <partition name>” Permanently enable: “gedit /etc/fstab”To display current swap space:- “swapon –s”To disable swaping on a partition, use “swapoff

<partition name>” command.

Page 10: Swap project

Testing and proofs:-

Page 11: Swap project
Page 12: Swap project
Page 13: Swap project

CONFIGURING SWAP SPACE USING SWAP FILE (if there is no available partition )

Create a file and write bytes to it equalizing the amount of swap space you wish to add,using dd command:-

“dd if=/dev/zero of=/ram1 bs=1024 count=200000”Prepare swap partition:- “mkswap <swapfile

name>” Enable swap space for use by the system:- Temporary enable: “swapon <swapfile name>” Permanently enable: “gedit /etc/fstab”To display current swap space:- “swapon -s” To disable swaping on a partition, use “swapoff

<swapfile name>” command

Page 14: Swap project

TESTING AND PROOFS

Page 15: Swap project
Page 16: Swap project

Conclusion

Managing swap space is an essential aspect of system administration.

Swap management is useful if you are planning to increase RAM in near future.

It is also useful in increasing processing speed of the system

Page 17: Swap project

REFERENCES:-

http://docstore.mik.ua/orelly/linux/run/ch06_02.htm

“Installation procedure ”https://www.kernel.org/doc/gorman/html/und

erstand/understand014.html“definition of terminology of swap mangement” http://

ubuntu-version-8.blogspot.in/2009/05/4- virtual-memory-management.html

“topological diagram”

Page 18: Swap project

Thank you

Ashutosh Gupta (12UEC006)Sokina sorokhaibam (12UEC024)Chitranjan H(12UCS006)


Recommended