Exam help: Difference between revisions
Line 274: | Line 274: | ||
===What is register? Register file?=== | ===What is register? Register file?=== | ||
In a computer, a register is one of a small set of data holding places that are part of a computer processor . A register may hold a computer instruction , a storage address, or any kind of data (such as a bit sequence or individual characters). Some instructions specify registers as part of the instruction. For example, an instruction may specify that the contents of two defined registers be added together and then placed in a specified register. A register must be large enough to hold an instruction - for example, in a 32-bit instruction computer, a register must be 32 bits in length. In some computer designs, there are smaller registers - for example, half-registers - for shorter instructions. Depending on the processor design and language rules, registers may be numbered or have arbitrary names. | |||
===What is ALU?=== | ===What is ALU?=== |
Revision as of 17:42, 11 January 2016
Computer hardware
Different buses and their uses
In computer architecture, a bus is a communication system that transfers data between components inside a computer, or between computers. This expression covers all related hardware components (wire, optical fiber, etc.) and software, including communication protocols.
The internal bus, also known as internal data bus, memory bus, system bus or Front-Side-Bus, connects all the internal components of a computer, such as CPU and memory, to the motherboard. Internal data buses are also referred to as a local bus, because they are intended to connect to local devices. This bus is typically rather quick and is independent of the rest of the computer operations.
The external bus, or expansion bus, is made up of the electronic pathways that connect the different external devices, such as printer etc., to the computer.
Types and uses:
- USB
- Universal Serial Bus. Designed for: input devices, digital cameras, printers, media players...
- Serial ATA
- Used by internal storage devices (hard disk). They replace the old ATA connectors.
- PCI
- Peripheral Component Interconnect, is a local computer bus for attaching hardware devices in a computer. Attached devices can take either the form of an integrated circuit fitted onto the motherboard itself or an expansion card that fits into a slot. Typical PCI cards used in PCs include: network cards, sound cards, modems, extra ports such as USB or serial, TV tuner cards and disk controllers.
- PCI Express
- Peripheral Component Interconnect Express (also called PCIe), is a high-speed serial computer expansion bus standard designed to replace the older PCI, PCI-X, and AGP bus standards. PCIe has numerous improvements over the older standards, including higher maximum system bus throughput, lower I/O pin count and smaller physical footprint, better performance scaling for bus devices, a more detailed error detection and reporting mechanism, and native hot-plug functionality. More recent revisions of the PCIe standard provide hardware support for I/O virtualization.
- Mini PCIe
- It is based on PCI Express technoogy. Main point is its small size and its large variety of connectors makes it used for USB2.0 cards, SIM card, Wifi and Bluetooth cards, 3G and GPS cards.
- ExpressCard
- It is an interface to connect peripheral devices to a computer, usually a laptop computer. ExpressCards can connect a variety of devices to a computer including mobile broadband modems, IEEE 1394 (FireWire) connectors, USB connectors, Ethernet network ports, Serial ATA storage devices, solid-state drives, external enclosures for desktop-size PCI Express graphics cards and other peripheral devices, wireless network interface controllers (NIC), TV tuner cards, Common Access Card (CAC) readers, and sound cards.
What are the differences between hard disk drive (HDD) and solid state drive (SSD)?
The traditional spinning hard drive (HDD) is the basic nonvolatile storage on a computer. Hard drives are essentially metal platters with a magnetic coating which stores the data. A read/write head on an arm accesses the data while the platters are spinning in a hard drive enclosure. An SSD does same jobas an HDD, but instead of a magnetic coating on top of platters, the data is stored on interconnected flash memory chips that retain the data even when there's no power present. HDDs have spinning plates with magnetic coating, while SSDs have no moving parts and instead are using flash memory.
Attribute | SSD (Solid State Drive) | HDD (Hard Disk Drive) |
---|---|---|
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 |
What is the purpose of Flash Translation Layer in terms of solid state drives?
Flash drives have limited lifespan due to write cycles (or rather program-erase (PE) cycles) and to exhaust the drive equally, FTL layer is utilised.
Although presenting an array of Logical Block Addresses (LBA) makes sense for HDDs as their sectors can be overwritten, it is not fully suited to the way flash memory works. For this reason, an additional component is required to hide the inner characteristics of NAND flash memory and expose only an array of LBAs to the host. This component is called the Flash Translation Layer (FTL), and resides in the SSD controller. The FTL is critical and has three main purposes: logical block mapping, wear leveling and garbage collection.
The logical block mapping translates logical block addresses (LBAs) from the host space into physical block addresses (PBAs) in the physical NAND-flash memory space. This mapping takes the form of a table, which for any LBA gives the corresponding PBA.
Wear leveling (also written as wear levelling) is a technique[1] for prolonging the service life of some kinds of erasable computer storage media, such as flash memory (used in solid-state drives (SSDs) and USB flash drives).
The garbage collection process in the SSD controller ensures that “stale” pages are erased and restored into a “free” state so that the incoming write commands can be processed. If the data in a page has to be updated, the new version is written to a free page, and the page containing the previous version is marked as stale. When blocks contain stale pages, they need to be erased before they can be written to.
What are difference between volatile/non-volatile, RAM, ROM, EEPROM and where are they used?
Volatile = does not hold data after power off. Non-volatile = holds data even after power off.
Random Access Memory or RAM is a form of data storage that can be accessed randomly at any time, in any order and from any physical location., allowing quick access and manipulation. RAM allows the computer to read data quickly to run applications. It allows reading and writing. It is volatile.
Read-only memory or ROM is also a form of data storage that can not be easily altered or reprogrammed.Stores instuctions that are not nescesary for re-booting up to make the computer operate when it is switched off.They are hardwired. ROM stores the program required to initially boot the computer. It only allows reading. It is non-volatile.
EEPROM (electrically erasable programmable read-only memory) is user-modifiable read-only memory (ROM) that can be erased and reprogrammed. Unlike EPROM chips, EEPROMs do not need to be removed from the computer to be modified. However, an EEPROM chip has to be erased and reprogrammed in its entirety, not selectively. It also has a limited life - that is, the number of times it can be reprogrammed is limited to tens or hundreds of thousands of times. BIOS of PCs are usually written to EEPROM.
What is data retention?
It is how long a device can hold data before it becomes unreadable.
What are difference between asynchronous/synchronous, dynamic/static RAM and where are they used?
The two main forms of modern RAM are static RAM (SRAM) and dynamic RAM (DRAM). In SRAM, a bit of data is stored using the state of a six transistor memory cell. This form of RAM is more expensive to produce, but is generally faster and requires less power than DRAM and, in modern computers, is often used as cache memory for the CPU. DRAM stores a bit of data using a transistor and capacitor pair, which together comprise a DRAM memory cell. The capacitor holds a high or low charge (1 or 0, respectively), and the transistor acts as a switch that lets the control circuitry on the chip read the capacitor's state of charge or change it. As this form of memory is less expensive to produce than static RAM, it is the predominant form of computer memory used in modern computers. Dynamic RAM is used to create larger RAM space system, where Static RAM create speed- sensitive cache. Dynamic RAM consumes less power than Static RAM.
Asynchronous refers to the fact that the memory is not synchronized to the system clock. A memory access is begun, and a certain period of time later the memory value appears on the bus. The signals are not coordinated with the system clock at all, as described in the section discussing memory access. Asynchronous memory works fine in lower-speed memory bus systems but is not nearly as suitable for use in high-speed (>66 MHz) memory systems. A newer type of DRAM, called "synchronous DRAM" or "SDRAM", is synchronized to the system clock; all signals are tied to the clock so timing is much tighter and better controlled. This type of memory is much faster than asynchronous DRAM and can be used to improve the performance of the system. It is more suitable to the higher-speed memory systems of the newest PCs.
What is cache? What is cache coherence?
Cache memory is used to reduce the average memory access times. This is done by storing the data that is frequently accessed in main memory addresses therefore allowing the CPU to access the data faster. This is due to the fact that cache memory can be read a lot faster than main memory.
Cache coherence is the consistency of shared resource data that ends up stored in multiple local caches. When clients in a system maintain caches of a common memory resource, problems may arise with inconsistent data, which is particularly the case with CPUs in a multiprocessing system.
What are differences between resistive and capacitive touchscreen?
Resistive touchscreen needs pressure to work by connecting to sheets of plastic and thus conducting electricity. Capacitive touchscreen works by conducting electricity from user's finger.
Resistive touchscreens rely on the pressure of your fingertip—or any other object—to register input. They consist of two flexible layers with an air gap in-between. In order for the touchscreen to register input, you must press on the top layer using a small amount of pressure, in order to depress the top layer enough to make contact with the bottom layer. The touchscreen will then register the precise location of the touch. You can use anything you want on a resistive touchscreen to make the touch interface work; a gloved finger, a wooden rod, a fingernail – anything that creates enough pressure on the point of impact will activate the mechanism and the touch will be registered.
Capacitive touchscreens instead sense conductivity to register input—usually from the skin on your fingertip. Because you don’t need to apply pressure, capacitive touchscreens are more responsive than resistive touchscreens. However, because they work by sensing conductivity, capacitive touchscreens can only be used with objects that have conductive properties, which includes your fingertip (which is most ideal), and special styluses designed with a conductive tip. This is the reason you cannot use a capacitive screen while wearing gloves – the gloves are not conductive, and the touch does not cause any change in the electrostatic field.
Explain how computer mouse works?
An optical computer mouse uses a light source, typically an LED, and a light detector, such as an array of photodiodes, to detect movement relative to a surface. Modern surface-independent optical mice work by using an optoelectronic sensor (essentially, a tiny low-resolution video camera) to take successive images of the surface on which the mouse operates. The technology underlying the modern optical computer mouse is known as digital image correlation. To understand how optical mice work, imagine two photographs of the same object except slightly offset from each other. Place both photographs on a light table to make them transparent, and slide one across the other until their images line up. The amount that the edges of one photograph overhang the other represents the offset between the images, and in the case of an optical computer mouse the distance it has moved. Optical mice capture one thousand successive images or more per second. Depending on how fast the mouse is moving, each image will be offset from the previous one by a fraction of a pixel or as many as several pixels. Optical mice mathematically process these images using cross correlation to calculate how much each successive image is offset from the previous one. History of computer mouse.
Explain how computer keyboard works?
HowStuffworks article Explain that Stuff article Keyboard History
Explain how cathode ray tube (CRT) based screen technology works and name pros/cons.
Explain how liquid crystal displays (LCD) work and name pros/cons.
Name screen technologies making use of thin film transistor (TFT) technology?
Name uses for light polarization filters?
What are the benefits of twisted pair cabling and differential signalling?
Active matrix vs passive matrix in display technology
Storage abstractions
What is a block device?
What is logical block addressing and what are the benefits compared to older cylinder-head-sector addressing method in terms of harddisks?
What is a disk partition?
What is a file system?
What is journaling in terms of filesystems and what are the benefits? Name some journaled filesystems in use nowadays.
Bootloaders, kernels
What is the role of BIOS/UEFI in x86-based machines?
BIOS (Basic Input/Output System) performs during boot up process of a computer and prepares it for the OS and its' programs.
UEFI (Unified Extensible Firmware Interface) is a replacement for BIOS. It offers several advantages over previous firmware interface, like:
- Ability to boot from large disks (over 2 TB) with a GUID Partition Table (GPT)
- CPU-independent architecture
- CPU-independent drivers
- Flexible pre-OS environment, including network capability
- Modular design
Explain step by step how operating system is booted up, see slides for flowchart.
Describe the functionality provided by general purpose operating system.
See architecture of Windows NT, Android, OS X.
What are the main differences between real mode and protected mode of x86-based processor?
What happens during context switch?
What is the purpose of paged virtual memory?
Libraries, frameworks
Programming languages
What are the major steps of compilation?
What are the differences between interpreted, JIT-compilation and traditional compiling?
What is control flow? Loops? Conditional statements?
Data encoding
What is bit? Nibble? Byte? Word?
Write 9375 in binary, hexadecimal?
Write 0xDEADBEEF in decimal?
What is quantization in terms of signal processing?
How are integers stored in binary? What integer range can be described using n bits? How many bits are required to describe integer range from n .. m.
How are single precision and double precision floating point numbers stored in binary according to IEEE754 standard?
How is data encoded on audio CD-s? What is the capacity of an audio CD?
What is sampling rate? What is bit depth? What is resolution?
What is bitrate?
What is lossy/lossless compression?
What is JPEG suitable for? Is JPEG lossy or lossless compression method?
What is PNG suitable for? Does PNG support compression?
Code execution in processor
Given ~10 instructions and their explainations, follow the instructions and elaborate after every step what happened in the processor?
Microcontrollers
What distinguishes microcontroller from microprocessor?
What are the differences between Hardvard architecture and von Neumann architecture?
What is an interrupt?
What is an timer?
Introduction to Boole algebra
Simplify A AND A OR B
Show addition of X and Y in binary
Show subtraction of X and Y in binary
Show multiplication of X and Y in binary
Hardware description languages
What are the uses for hardware description languages?
What is latch?
What is flip-flop?
What is mux (multiplexer)?
What is register? Register file?
In a computer, a register is one of a small set of data holding places that are part of a computer processor . A register may hold a computer instruction , a storage address, or any kind of data (such as a bit sequence or individual characters). Some instructions specify registers as part of the instruction. For example, an instruction may specify that the contents of two defined registers be added together and then placed in a specified register. A register must be large enough to hold an instruction - for example, in a 32-bit instruction computer, a register must be 32 bits in length. In some computer designs, there are smaller registers - for example, half-registers - for shorter instructions. Depending on the processor design and language rules, registers may be numbered or have arbitrary names.
What is ALU?
An arithmetic logic unit (ALU) is a digital electronic circuit that performs arithmetic and bitwise logical operations on integer binary numbers. This is in contrast to a floating-point unit (FPU), which operates on floating point numbers. An ALU is a fundamental building block of many types of computing circuits, including the central processing unit (CPU) of computers, FPUs, and graphics processing units (GPUs). A single CPU, FPU or GPU may contain multiple ALUs.
The inputs to an ALU are the data to be operated on, called operands, and a code indicating the operation to be performed; the ALU's output is the result of the performed operation. In many designs, the ALU also exchanges additional information with a status register, which relates to the result of the current or previous operations.
What is floating-point unit?
A floating-point unit (FPU) is a part of a computer system specially designed to carry out operations on floating point numbers. Typical operations are addition, subtraction, multiplication, division, square root, and bitshifting. Some systems (particularly older, microcode-based architectures) can also perform various transcendental functions such as exponential or trigonometric calculations, though in most modern processors these are done with software library routines.
In general purpose computer architectures, one or more FPUs may be integrated with the central processing unit; however many embedded processors do not have hardware support for floating-point operations.
What is a cache?
What is a bus?
Show the circuit diagram for A OR B AND C, NOT A AND B, <insert some other Boole formula here>?
Show the truth table for <insert Boole formula here>?
Write the equivalent Boole formula of a circuit diagram.
Publishing work
What are the major implications of MIT, BSD and GPL licenses?
What are the differences between copyright, trademark, trade secret?
“Intellectual property is something that is created by the mind.” Typically, we think of ideas as being created by the mind – but intellectual property does not protect bare ideas: rather, it is the expression or symbolic power/recognizability of the ideas that are protected. Thus, it is the design of the rocket that is patented, not the idea of a rocket. It is the painting of the lake that is copyrighted, not the idea of a lake. And it is the consumer recognizable logo that is trademarked, not the idea of a logo. Intellectual property protects how we express and identify ideas in concrete ways – not the idea itself.
In particular:
Patents: protect functional expressions of an idea – not the idea itself. A machines, method/process, manufacture, compositions of matter, and improvements of any of these items can be patented. Thus, I can patent a design for the nozzle on a rocket, or the method of making the rocket, or the method of making the rocket fuel, or the metal in which the rocket fuel is stored, or a new way of transporting the rocket fuel to the rocket. But I cannot patent the broad “idea” of a rocket.
Copyrights: protect the specific creative expression of an idea through any medium of artistic/creative expression – i.e., paintings, photographs, sculpture, writings, software, etc. A copyright protects your painting of a haystack, but it would not prohibit another painter from expressing their artistry or viewpoint by also painting a haystack. Likewise, while Ian Fleming was able to receive a copyright on his particular expression of the idea of a secret agent (i.e., a debonair English secret agent), he could not prevent Rich Wilkes from receiving a copyright on his expression of the idea of a secret agent (i.e., a tattooed bald extreme athlete turned reluctant secret agent).
Trademarks: protect any symbol that indicates the source or origin of the goods or services to which it is affixed. While a trademark can be extremely valuable to its owner, the ultimate purpose of a trademark is to protect consumers – that is, the function of a trademark is to inform the consumer where the goods or services originate. The consumer, knowing the origin of the goods, can make purchasing decisions based on prior knowledge, reputation or marketing.
Trade secret: is a formula, practice, process, design, instrument, pattern, commercial method, or compilation of information which is not generally known or reasonably ascertainable by others, and by which a business can obtain an economic advantage over competitors or customers.[
While each category is distinct, a product (or components/aspects of a product) may fall into one or more of the categories. For example, software can be protected by both patents and copyrights. The copyright would protect the artistic expression of the idea – i.e., the code itself – while the patent would protect the functional expression of the idea – e.g., using a single click to purchase a book online. Likewise, it is likely that the software company will use a trademark to indicate who made the software.
An additional example would be a logo for a company. The logo may serve as a trademark indicating that all products affixed with the logo are from the same source. The creative and artistic aspects of the logo may also be protected by a copyright.
Where would you use waterfall software development model? Where would you use agile?
What is the purpose of a version control system?
What would you store in a version control system?
Algorithms and data structures
What is time complexity of algorithm?
In computer science, the time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the string representing the input. Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm, where an elementary operation takes a fixed amount of time to perform.
What is space complexity of algorithm?
Space complexity is a measure of the amount of working storage an algorithm needs. That means how much memory, in the worst case, is needed at any point in the algorithm. It represents the total amount of memory space that a "normal" physical computer would need to solve a given computational problem with a given algorithm.
What's a good algorithm?
It executes as fast as possible. It takes as less space as possible. It is adaptable to computers. It is simple. It is elegant (well written).
History
What is Moore's law? What is Rock's law?
Moore's law is the observation that the number of transistors in a dense integrated circuit doubles approximately every two years. The observation is named after Gordon E. Moore, the co-founder of Intel and Fairchild Semiconductor, whose 1965 paper described a doubling every year in the number of components per integrated circuit, and projected this rate of growth would continue for at least another decade. In 1975, looking forward to the next decade, he revised the forecast to doubling every two years. Rock's law or Moore's second law, named for Arthur Rock or Gordon Moore, says that the cost of a semiconductor chip fabrication plant doubles every four years. As of 2015, the price had already reached about 14 billion US dollars.