Saturday, September 28, 2019

SSD Disks and Swap Partitions

SSD Disks and Swap Partitions
This is a reproduction about SSD Disks 
Flash RAM cells in SSDs have a limited lifespan. Every write (but not read) cycle (or more accurately every erasure) wears a memory cell, and at some point it will stop working.
The amount of erase cycles a cell can survive is highly variable, and flash from modern SSDs will survive many more than flash from SSDs made several years ago. Additionally, the SSD intelligent firmware will ensure evenly distributed erasures between all the cells. In most drives, unused areas will also be available to backup damaged cells and to delay aging.
To have a value we can use to compare the endurance of a SSD, we can use lifespan measures such as the JEDEC published standards. A widely available value for endurance is TBW (TeraBytes Written, or alternatively total bytes written) which is the amount of bytes writeable before the drive fails. Modern SSDs can score as low as 20 TB for a consumer product but can score over 20,000 TB in an enterprise-level SSD.
Having said that, both the lifespan and the use of a SSD for swapping depends on several factors...

Systems with plenty of RAM

On a system with plenty of RAM and few memory consuming applications we will almost never swap. It is merely a safety measure to prevent data loss in case an application ate up all our RAM. In this case, the wearing of a SSD from swapping will not be an issue. However, having this mostly-unused swap partition on a conventional hard drive will not lead to any performance drop, so we can safely put our swap partition (or file) on that significantly cheaper hard drive and use the space on our SSD for something more useful.

Systems with little RAM

Things are different on a system where RAM is sparse and cannot be upgraded. In this case, swapping may indeed occur more often, especially when we run memory-intensive applications. In these systems, a swap partition or file on a SSD may lead to a dramatic performance improvement at the cost of a somewhat shorter SSD lifespan. This decreased lifespan may, however, still not be short enough to warrant concern. In all likelihood, the SSD may be replaced long before it would've died because several times the storage may be available at a fraction of today's prices.

Hibernating our system

Waking from hibernation is indeed very fast from a SSD. If we're lucky and our system survives a hibernation without issues, we can consider using an SSD for that. It will wear the SSD more than just booting from it would, but we may feel it's worth it.
But booting from an SSD may not take much longer than waking from hibernation from an SSD, and it will wear the SSD far less. Personally, I don't hibernate my system at all - I suspend to RAM or quickly boot from my SSD.

The SSD is the only drive we have

We don't really have a choice in this case. We don't want to run without a swap, so we have to put it on the SSD. We may, however, want to have a smaller swap file or partition if we don't plan to hibernate our system at any point.

Note on speed

SSDs are best at quickly accessing and reading many small files and are superior to conventional hard drives for transferring data from sequentially-read small or medium-sized files. A fast conventional hard drive may still perform better than an SSD at writing (and to a lesser extent reading) large audio or video streams or other long unfragmented files. Older SSDs may have their performance decline over time or after they are fairly full.

Changing English


I like sweet sounding, crisp, clean and volatile (meaning changing with time and Internet) English.

With computer science and expanding Internet English is changing fast.

Two of my contributions are below and many more in this site.

Religion is like a brain virus (near enough my invention) and resistant to formal treatment of a virus.

Counselor (social or psychiatric) is a guy/girl who lost the chance of reevaluation ones own orientation in time, place and person outside his room.

 I hate technical sounding English

I do not like American English.

I do not like even Queen's English at times.

I hate Indian English.

Ceylonese English was pretty good until SWRD's policy change i 1956.

Ceylon English is putrid now.

How Neologisms Keep English Alive

A neologism is a newly coined word, expression, or usage. It's also known as a coinage. Not all neologisms are entirely new. Some are new uses for old words, while others result from new combinations of existing words. They keep the English language alive and modern.
A number of factors determine whether a neologism will stay around in the language. "Rarely will a word enter common usage," said the writer Rod L. Evans in his 2012 book "Tyrannosaurus Lex," "unless it fairly clearly resembles other words."

What Qualities Help a New Word Survive?

Susie Dent, in "The Language Report: English on the Move, 2000-2007," discusses just what makes a new word successful and one that has a good chance of staying in use.
"In the 2000s (or the noughties, oughties, or zips), a newly minted word has had an unprecedented opportunity to be heard beyond its original creator. With 24-hour media coverage, and the infinite space of the Internet, the chain of ears and mouths has never been longer, and the repetition of a new word today takes a fraction of the time it would have taken 100, or even 50, years ago. If, then, only the smallest percentage of new words make it into current dictionaries, what are the determining factors in their success?"
"Very roughly speaking, there are five primary contributors to the survival of a new word: usefulness, user-friendliness, exposure, the durability of the subject it describes, and its potential associations or extensions. If a new word fulfills these robust criteria it stands a very good chance of inclusion in the modern lexicon."

When to Use Neologisms

Here's some advice on when neologisms are useful from "The Economist Style Guide" from 2010.
"Part of the strength and vitality of English is its readiness to welcome new words and expressions and to accept new meanings for old words."
"Yet such meanings and uses often depart as quickly as they arrived."
"Before grabbing the latest usage, ask yourself a few questions. Is it likely to pass the test of time? If not, are you using it to show just how cool you are? Has it already become a cliché?
Does it do a job no other word or expression does just as well? Does it rob the language of a useful or well-liked meaning? Is it being adapted to make the writer's prose sharper, crisper, more euphonious, easier to understand—in other words, better? Or to make it seem more with it (yes, that was cool once, just as cool is cool now), more pompous, more bureaucratic or more politically correct—in other words, worse?"

Should the English Language Banish Neologisms?

Brander Matthews commented on the idea that evolutionary changes in language should be prohibited in his book "Essays on English" in 1921.
"Despite the exacerbated protests of the upholders of authority and tradition, a living language makes new words as these may be needed; it bestows novel meanings upon old words; it borrows words from foreign tongues; it modifies its usages to gain directness and to achieve speed. Often these novelties are abhorrent, yet they may win acceptance if they approve themselves to the majority. This irrepressible conflict between stability and mutation and between authority and independence can be observed at all epochs in the evolution of all languages, in Greek and in Latin in the past as well as in English and in French in the present."
"The belief that a language ought to be 'fixt,' that is, made stable, or in other words, forbidden to modify itself in any way, was held by a host of scholars in the 17th and 18th centuries. They were more familiar with the dead languages, in which the vocabulary is closed and in which usage is petrified, than they were with the living languages, in which there is always incessant differentiation and unending extension. To 'fix' a living language finally is an idle dream, and if could be brought about it would be a dire calamity. Luckily language is never in the exclusive control of scholars; it does not belong to them alone, as they are often inclined to believe; it belongs to all who have it as a mother-tongue."

UNnetBootIn

Why I hated Windows is that one has to install drivers office and games etc with many bugs.

In Linux everything is bundled with the distribution from tiny (DSL) to Fullmonty and no rebooting.

UNnetBootIn-How I did it?


UnetBootIn has gone into depreciation and in many Linux distribution one has dedicated USB booting software.
However MutiSystem Booting CD (from France) is much better to write a live script.
Debian does not support it whereas Emmabantus Deb 3 has Multisytem Bootng software.
If you have an old computer which does not boot from USB Flash Drive I have a solution for you. This applies to the third world and perhaps to the guys and girls of the developed world who are going through rough times and cannot afford a USB booting netbook or laptop or desktop.
If you have a device which boots with USB, most of what of I state below may not apply to you except the principles. If you are buying anything new do not buy ones without USB booting.
I of course use old gadgets and my 233 speed with 128 RAM and 4 MB graphic is still working but painfully slow.

Also for the guys and girls of the developing world who have gone abroad looking for better pastures with all your parents' saving and the parent no longer can support you on the second or third years.
All what you need is a Flash Drive and if you cannot afford that it is better you start looking for a menial job and rough out till times get better or they chase you out without extending the visa.
Once those universities sap all your money they have no use of you and start recruiting new batch for their own survival.
Education is money and money is education now in the developed world.
However world has not got better but worse with plenty of geeky gadgets around you, even I cannot afford them in my retirement age.
That is why I am turning to bare bones of computing and Linux utilities are there to get expensive work done with minimum of expenditure but lot of learning to do.
One must get out of the Microsoft plug and play mentality (i.e. even monkeys and dogs can be trained).
And nothing is plug and play even for Microsoft with so many new gadgets hitting the market and D.I.Y is one of the best ways to put your neck and nose ahead in the game of computing world.
Lot of time is necessary and risk taking is essential and above all experimenting. At worse you may ruin the partition table of the Flash drive which I have done.

Linux guys and girls are not there to spoon feed you and they are mostly doing it as a hobby with lot of work and midnight oil burning for their own survival.
But there are few professionals not many of course who are out there willing to help.
I am not a GuRu but an ardent supporter of Linux and a daily user of few outstanding Linux utilities.

UnetBootIn in one of them even though it has lot of teething problems.


For two years I have not looked at my Flash Drives with Live Linux distributions which were booting with my laptop but with none of my computers without USB booting facility.
Since my old IBM is ready for junkyard and power pack and mother board needing a rest period before the junkyard experience I went and bought a secondhand IBM in good working order with little amount of USB support but SATA hard disks.
I still have it as a tabletop!
As the testing period was over and it is doing my daily work and downloading at night, with the extended New year holidays I decided to go for the Acid Test of USB booting while doing lot of other things around the household.


This is my Final Report on UnetBootIn, may not be comprehensive but how I got it to do my work and used all my Flash drives for USB booting with or without USB booting facility of the other computers I have.
Ignore the top preamble and concentrate now.


I have no idea of how it works but this is how I figured it out with some basic idea about Linux booting practice with GRUB.

How I did it.
1. Its kernel is less than one MiB
2. Its init file is the biggest which is less than fifty MiB
3. It has ID file
4. It has GRUB Menu (slash.msg for Pendrive Linux)
5. System configuration file
6. Two text files names ubnfilel and ubpathl
These seven files are necessary for its booting.


Rest of the files are distribution specific out of which livecd.sqfs file is the heaviest and the most important that boots up after initial GRUB sequence.
It has a boot folder and isolinux folder which are basic essentials for Linux booting.

Process has 3 essential steps.
1. Downloading
2, Extraction
3, Booting (grub) sequence.


Most painful part is the downloading which can break at any moment because of the poor downloading here.
So I choose DSL my yesteryear favorite (50 MiB), Puppy 4.2 my very first USB Linux and parted Magic (158 MiB). Unfortunately gnome's gParted one of my favorite utility is not there in the listed distributions. I hope gnome will come out with gparted enhanced with UnetBotIn in it's 128 MiB distribution in the next revision.
Knoppix is not there but it is a different kettle of fish altogether
with nearly 4 GiB of compressed files and the best heavy weight category and I am here with the light weight category, for now.

All three worked in the first instance but not PCLinux and Mepis. Then I wanted to try PCLinux (could not get it because all iso files are now torrents at Linuxtracker) and Mepis (broke at once at 200 and the second time at 850 MiB out of 925 MiB). Tried PCLinux from my hard drive but some important boot files were missing.
Failures on several occasions, I went into the experimental mode.

Prepare DSL for booting as usual or copy the files listed above to the intended Flash Drive.
Then go to the graphic item and distribution source and give the path for the file in my hard disk and click OK. Before that one should delete the sqfs file of DSL or Puppy (or overwrite only this file when prompted).
Then say NO to overwrite for all the files except the sqfs file.
Before booting it is better to see whether all the files I mentioned above are copied correctly to the Pendrive.
If so shutdown the computer and reboot and the live CD is now in your Pendrive and you do not need to have a CD or DVD to boot your favorite Linux distribution onto the RAM. With this Pendrive you can install Linux to any worthwhile computer without a CD or DVD you may have.
In my case I did install PCLinux-2010 from the Pendrive I prepared on my laptop which I formatted to install Knoppix and record World Cup Cricket (quality of the USB TV card was poor).
Now I am looking for a netbook (my daughter would not oblige) to try my wizardry like wizard of OZ.
Only downside was that one cannot boot the DSL (you have overwritten or deleted in the process).
If you have brains you may even install another sqfs file and edit the boot menu and boot the second one too. I have no time to try it but I hope UnetBootIn will add that facility in future and access to iso files in my hard disk so that I can bypass the downloading bit and boot any of the 100 odd Linux live CD /DVDs I have.
PCLinux USB creator was hopeless to say the least and it does not do the job properly like UnetBootIn and also needs Linux partition and not fat partitions.
Go and enjoy Pendrive freedom that come from Linux Developers of repute.
I must say special thanks to MCN (Mandriva) group which started the ball rolling in 2007 with the first Penndrive Version I got to work on a Pendrive in Singapore in 2009.
However Singaporeans have no clue about Pendrive Linux or Linux in general.
This is something Indians would have invested (prepare LIVE PENDRIVES for sale) during World Cup but missed it in toto and now doing IPL cricket instead. Anybody can come to me but I charge for the time especially the download time which is painfully slow and I value my free time which is devoted for rants like this.
Edited on the 20th How to get new Puppy into your Pendrive (It is easy as eating cheese cake and dogs love cheese)
Easiest method is to
is to boot the Live CD and used it as a base to make a Live Pendrive.  
This was how I made my first Live USB long before Pendrive Linux and at a time when I did not have a computer with USB booting facility.
Puppy was my entry into Light Weight Distribution Version and I have not looked back on that experience.
Then I went into PCLinux and its many versions including PCLinux Mini Me. I am not impressed with the record of USB booting with PCLinux even now and that was the one that took the longest time and method (Thanks to UnetBootIn) how to figure out making a USB drive. It failed miserably with my USB hard drive in spite of me getting it into a Linux partition and I finally gave up because I do not fancy carrying a heavy SATA disk in my front pocket.
I prefer a Pendrive around my neck instead of a hard drive. Mind you I use the hard drive to carry all my favorite iso images some of which are 4.4 GiB and Supreme Games Linux is almost 8 GiB.
Getting Puppy into a Pendrive was the easiest with UNetbootIn but with a problem. It only downloads the 4.2 version (the first version I used before Dingo-most number of Live CD I have is with Puppy) from the Internet.

So I set about to get a copy of Puppy lupu from my hard disk to Pendrive.
1. Plug in the Pendrive with Puppy 4.2 2. Start UnetBootIn and selected Puppy for install rather copy 3. From dialog box gave the path to my lupu already downloaded and click OK 4. Said NO to all overwrite messages 5. Check the Flash Drive to see production OK. Both Puppy 4.2 and and lupu 525 sqfs files were there with only 250 of the 1400 MiB used. 6. Booted the Flash drive to see it only boots the 4.2. Could not get F2 to change boot option since it configures the keyboard in later stages (Puppy bypasses even the BIOS) of booting. 7. Mounted Flash on my desktop and changed the 420 to 422 and lupu 525 to 420. 8. Booted again and got the kernel panic message (in early days when I get this message I go into panic mode, almost a heart attack but now wait for a few seconds and switch off the computer making sure RAM is not in freeze mode and fully flushed like toilet bowl after a wee, wee. (I get a message from South Africa where water scarcity is a serious problem and asking me to put bricks on the cistern to reduce the capacity and fill it with waste or used water. I think they way we are chopping trees and the Coal Power Plant functioning at full speed we will be near that fate before India. 
Please excuse me on this diversion if I blog this separately nobody will read it and hence the inclusion here) 9. Booted again but again kernel panic mode 10. UnetBootIn again and and copied lupu 525 and this time said yes to all overwrite messages including uninit and unkernel. 11. Booted again presto the lupu was running.
Summary in 4 steps
1. Format the Pendrive with FAT 32 partition 2. Install Puppy 4.2 using UNetBootIn and check booting of the Pendrive. 3. Download any of the latest Puppy, lupu, quirky or wary (you can rename the iso image with your dog's name if you are a dog lover. 
I believe Barry Kauler an Australian is a Dog Lover. Note, unlike cricketers Australian are nice and normal guys). 4. Repeat Step 2 to with overwrite mode on (manually) and boot it up.
I think I have said enough of UnetBootIn. I hope the Developers got the message and in its next update of UnetBootIn it is sweet as honey. Thanks Guys and Girls you are doing some excellent work, you should make sure that you have some rest in between and play some Linux Games like me .
Postscript I get a message from WiN 7 guys that they also have developed a Pendrive utility but it is painfully slow and need a huge Flash Drive with all the viruses included in the processing. So before any one using it do a virus scan first using a Linux Utility called Medi Linux!

JAVA


There are other programming languages in Linux

Python

Ruby

Perl

C

C++


Problem with JAVA it can bring in BOGS to other system including LINUX.

So learn to work on Python and Ruby which can be checked for bugs before implementation in Linux.


REPRODUCTION

What are the differences between Java, Core Java and Advanced Java?
 
How do you differentiate between the 3 of them?

Arundhati Kanungo, works at SAP
 
Answered Jun 26, 2016
Originally Answered: What are the differences between Java, Core Java and Advanced Java?
Java, Java Everywhere Too Confused, Right???
Come, I will solve your doubt
What is Java?
Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.
Different Editions of Java Platform:
  • J2SE (Java Platform, Standard Edition)
Also known as Core Java, this is the most basic and standard version of Java. It’s the purest form of Java, a basic foundation for all other editions. It consists of a wide variety of general purpose API’s (like java.lang, java.util) as well as many special purpose APIs. J2SE is mainly used to create applications for Desktop environment. It consist all the basics of Java the language, variables, primitive data types, Arrays, Streams, Strings Java Database Connectivity(JDBC) and much more. This is the standard, from which all other editions came out, according to the needs of the time.
  • J2EE (Java Platform, Enterprise Edition)
The Enterprise version of Java, also called Advanced Java, has a much larger usage of Java, like development of web services, networking, server side scripting and other various web based applications. J2EE is a community driven edition, i.e. there is a lot of continuous contributions from industry experts, Java developers and other open source organisations. J2EE uses many components of J2SE, as well as, has many new features of it’s own like Servlets, JavaBeans, Java Message Services, adding a whole new functionalities to the language. J2EE uses HTML, CSS, JavaScript etc., so as to create web pages and web services. It’s also one of the most widely accepted web development standard.
J2ME (Java Platform, Micro Edition)
This version of Java is mainly concentrated for the applications running on embedded systems, mobiles and small devices. Also, the J2ME apps help in using web compression technologies, which in turn, reduce network usage, and hence cheap internet accessibility. J2ME uses many libraries and API’s of J2SE, as well as, many of it’s own. The basic aim of this edition was to work on mobiles, wireless devices, set top boxes etc. Old Nokia phones, which used Symbian OS, used this technology.
Other Editions of Java:
  • Apart from these three versions, there was another Java version released, Java Card. This edition was targeted, to run applets smoothly and securely on smart cards and similar technology. Portability and security was its main features.
  • JavaFX is another such edition of Java technology, which is now merged with J2SE. It is mainly used, to create rich GUI (Graphical User Interface) in Java apps. It replaces Swings (in J2SE), with itself as the standard GUI library. It is supported by both Desktop environment as well as web browsers.
  • PersonalJava was another edition, which was not deployed much, as its function was fulfilled by further versions of J2ME. Made to support World Wide Web (and Java applets) and consumer electronics. PersonalJava was also used for embedded systems and mobile. But, it was discontinued in its earlier stages.
Hope Core Java, Advanced Java and Java are well differentiated now. The relationship between them is as below.
Love Java!!! Live Java!!!