Sunday, May 24, 2015

Analysis and Design of Algorithm Question Bank



Objective Type Questions:
1. The complexity of linear search algorithm is
a. O(n)                                                   b. O(log n)                                            c. O(n2)                                                  d. O(n log n)

2. The complexity of Binary search algorithm is
a. O(n)                                                   b. O(log n )                                           c. O(n2)                                                  d. O(n log n)

Wednesday, May 20, 2015

Solid State Drive versus Hard Disc Drive

SSD Vs HDD
Attribute
SSD
HDD
Stands for
Solid State Drive
Hard Disk Drive
Speed
SSD has lower latency, faster read/writes, and supports more IOPs (input output operations per second) compared to HDD.
HDD has higher latency, longer read/write times, and supports fewer IOPs (input output operations per second) compared to SSD.
Heat, Electricity, Noise
Since no such rotation is needed in solid state drives, they use less power and do not generate heat or noise.
Hard disk drives use more electricity to rotate the platters, generating heat and noise.
Defragmentation
SSD drive performance is not impacted by fragmentation. So defragmentation is not necessary.
The performance of HDD drives worsens due to fragmentation; therefore, they need to be periodically defragmented.
Components
SSD has no moving parts; it is essentially a memory chip. It is interconnected, integrated circuits (ICs) with an interface connector. There are three basic components - controller, cache and capacitor.
HDD contains moving parts - a motor-driven spindle that holds one or more flat circular disks (called platters) coated with a thin layer of magnetic material. Read-and-write heads are positioned on top of the disks; all this is encased in a metal case
Weight
SSD drives are lighter than HDD drives because they do not have the rotating disks, spindle and motor.
HDDs are heavier than SSD drives.
Dealing with vibration
SSD drives can withstand vibration up to 2000Hz, which is much more than HDD.
The moving parts of HDDs make them susceptible to crashes and damage due to vibration.
Power Draw / Battery Life
Less power draw, averages 2 – 3 watts, resulting in 30+ minute battery boost
More power draw, averages 6 – 7 watts and therefore uses more battery
Cost
Expensive, roughly $0.10 per gigabyte (based on buying a 1TB drive)
Only around $0.06 per gigabyte, very cheap (buying a 4TB model)
Capacity
Typically not larger than 1TB for notebook size drives; 1TB max for desktops
Typically around 500GB and 2TB maximum for notebook size drives; 6TB max for desktops
Operating System Boot Time
Around 10-13 seconds average bootup time
Around 30-40 seconds average bootup time
Noise
There are no moving parts and as such no sound
Audible clicks and spinning can be heard
Vibration
No vibration as there are no moving parts
The spinning of the platters can sometimes result in vibration
Heat Produced
Lower power draw and no moving parts so little heat is produced
HDD doesn’t produce much heat, but it will have a measurable amount more heat than an SSD due to moving parts and higher power draw
Failure Rate
Mean time between failure rate of 2.0 million hours
Mean time between failure rate of 1.5 million hours
File Copy / Write Speed
Generally above 200 MB/s and up to 550 MB/s for cutting edge drives
The range can be anywhere from 50 – 120MB / s
Encryption
Full Disk Encryption (FDE) Supported on some models
Full Disk Encryption (FDE) Supported on some models
File Opening Speed
Up to 30% faster than HDD
Slower than SSD
Magnetism Affected?
An SSD is safe from any effects of magnetism
Magnets can erase data

Search Aptipedia