Unit 1
Introduction
Mainly computing system consists of 3 components, that square measure central process unit (CPU), Input Devices, and Output Devices. The Central process Unit (CPU) is split into 2 components again: arithmetic logic unit (ALU) and also the management unit (CU). The set of instruction is within the sort of data.
A large quantity of knowledge is hold on within the storage device with the assistance of primary and storage device devices. The CPU is just like the heart/brain of the pc. The user doesn't get the required output, while not the required possibility taken by the CPU. The Central process unit (CPU) is to blame for the process of all the directions that square measure given by the user to the pc system.
Fig: Block Diagram of the computer.
The data is entered through input devices like the keyboard, mouse, etc. This set of instruction is processed by the CPU when obtaining the input by the user, then the pc system produces the output. The pc will show the output with the assistance of output devices to the user, like monitor, printer, etc.
• CPU (Central process Unit)
• Storage Unit
• ALU(Arithmetic Logic Unit)
• Control Unit
Central process Unit (CPU)
The computer system is nothing while not the Central process unit therefore, it's conjointly referred to as the brain or heat of pc. The CPU is AN electronic hardware device which might perform differing types of operations like arithmetic and logic operation.
The CPU contains 2 parts: the arithmetic logic unit and management unit. We've got mentioned in short the arithmetic unit, logical unit, and management unit that square measure given below:
Control Unit
The management unit (CU) controls all the activities or operations that square measure performed within the pc system. It receives directions or info directly from the most memory of the pc.
When the management unit receives AN instruction set or info, it converts the instruction set to regulate signals then; these signals square measure sent to the {central processor|central process unit|CPU|C.P.U.|processor|mainframe|electronicequipment|hardware|computer hardware} for any processing. The management unit understands that operation to execute, accurately, and within which order.
Arithmetic and Logical Unit
The arithmetic and logical unit is that the combinative digital electronic circuit that may perform arithmetic operations on number binary numbers.It presents the arithmetic and logic operation. The outputs of ALU can amendment asynchronously in response to the input. The fundamental arithmetic and bitwise logic functions square measure supported by ALU.
Storage Unit
The information or set of tips square measure hold on within the storage unit of the pc system. The storage unit provides the house to store knowledge|theinfo|the information} or instruction of processed data. Knowledge} or data is saved or hold in storage device or memory device. The info storage is that the core perform and basic of the pc elements.
Components of computing system
The hardware and computer code exist on the pc. The knowledge that is hold on through the device is understood as pc computer code. The hardware elements of the pc system square measure associated with electronic and mechanical components, and also the computer code part is said to information and pc programs. Several parts square measure connected to the most circuit card of the pc system referred to as a “motherboard.”
- Processor.
- Main Memory.
- Secondary Memory.
- Input Devices.
- Output Devices.
These square measure in the main 5 elements of the pc system. The pc hardware, pc computer code, and liveware exist within the part of the pc system.
Processor
The processor is an electrical electronic equipment at intervals the pc system. The Central process unit is that the CPU or main processor of the pc system. The processor carries out the directions of the pc program with the assistance of basic arithmetic and logic, input/output operations.
Main Memory
The Random Access Memory is that the main memory of the pc system, that is understood as RAM. The most memory will store the software package computer code, application computer code, and different info. The Ram is one in every of the quickest memory, and it permits the info to be decipherable and writeable.
Secondary memory
We will store the info and programs on a semi permanent basis within the secondary memory. The arduous disks and also the optical disks square measure the common secondary devices. It's slow and low-cost memory as compare to primary memory. This memory isn't connected to the processor directly.
It has an oversized capability to store the info. The magnetic disk contains a capability of five hundred gigabytes. The info and programs on the magnetic disk square measure organized into files, and also the file is that the assortment of knowledge on the disk. The storage device is direct access by the CPU; that’s why it's totally different from the first storage.
The magnetic disk is concerning a hundred times the capability of the most memory. The most distinction between primary and storage device is speed and capability. There square measure many giant blocks of knowledge that square measure traced from the magnetic disk into the most memory.
Input Devices
The user provides the set of instruction or info to the pc system with the assistance of input devices like the keyboard, mouse, scanner, etc. knowledge|theinfo|the information} illustration to the pc system is within the sort of binary language at that time the processor processes the regenerate data. The input unit implements the info that is schooled by the user to the system.
We can enter the info from the skin world into the first storage because the input through input devices. The input devices square measure the medium of communication between the skin world and also the computing system. There square measure some necessary options of input devices that square measure given below:
1. The input devices receive or settle for the info or instruction from the user, United Nations agency exists within the outside world.
2. These devices convert the info or instruction into the machine-readable type for any process.
3. The data input device performs just like the association between the skin world and our computing system.
4. The keyboard and mouse square measure common samples of input devices.
5. Once the complete procedure is finished, we tend to get the required output from the output devices
Output Devices
The output devices produce or generate the desired result according to our input, such as a printer, monitor, etc. These devices convert the data into a human-readable form from binary code.
The computer system is linked or connected to the outside world with the help of output devices. The primary examples of output devices are a printer, projector, etc. These devices have various features which are given below:
- These devices receive or accept the data in the binary form.
- The output devices convert the binary code into the human-readable form.
- These devices produce the converted result and show to the user.
Bits & Bytes
Computers are devices powered by electricity, which has two discrete states: On or Off.
- To be processed, all data in a computer system (words, symbols, pictures, videos, sounds) must be reduced to a string of binary digits.
- A binary digit 1 or 0 is called a bit,
- Eight bits grouped together as a unit are called a byte, which provides enough combinations of 0s and 1s to represent 256 individual characters, including numbers, upper and lower case alphabet letters, punctuation marks and other characters
Name | Abb | Approx. Bytes | Exact Bytes | Approx. Pages of Text |
Byte | B | One | 1 | One character |
Kilobyte | KB (or K) | One thousand | 1,024 | One-half page |
Megabyte | MB | One million | 1,048,576 | 500 pages |
Gigabyte | GB | One billion | 1,073,741,824 | 500,000 pages |
Terabyte | TB | One trillion | 1,099,511,627,776 | 500,000,000 pages |
Coding Schemes
Define the patterns of bytes
Coding schemes, such as ASCII, EBCDIC, and Unicode, provide the means to interact with a computer
When a letter is pressed on a keyboard, the electronic signals are converted into binary form and stored into memory.
The computer processes the data as bytes of information and converts them to the letters we see on the monitor screen or on a printed page.
The System Unit
The System Unit homes the central process unit, memory modules, growth slots, and electronic electronic equipment yet as growth cards that square measure all connected to the motherboard; together with disk drives, a lover or fans to stay it cool, and therefore the power offer.
All alternative devices (monitor, keyboard, mouse, etc., square measure connected either directly or indirectly into the system unit.
Front of the System Unit
Drives square measure housed in drive bays that square measure accessed at the front of the case.
Internal drives, like the disk drive, square measure put in in internal bays that aren't usually as accessible because the external drives pictured here.
System Unit cases are available in an enormous array of varieties and designs, relying upon hardware desires.
Types of Ports
Serial ports
Transmit information one bit at a time, just like the image on the left illustrates.
Parallel ports
Transmit over one computer memory unit at a time.
These sorts of port styles square measure supported whether or not or not quick information transmission rates square measure needed by the device or not.
Most computers accompany basic sorts of ports (serial, parallel, keyboard, mouse, and USB); and growth cards permit you to expand the out there varieties required by specific devices.
Different Types of Connectors
Understanding the variations among connective varieties is beneficial and vital, because the cable needed to connect a tool to your laptop is particular to its connective, to not mention the port on the pc.
Non-Volatile Storage Devices
Disk drives
• Internal & External
• Hard drives
• Removable disk drives
• Floppy disks (1.4 MB)
• ZIP disks (100/250 MB)
• CD-ROM (700MB), DVD-ROM (~5GB/side)
• read solely (-ROM), write once (-R), re-writeable (-RW)
• Combination drive
• CD-RW/DVD-ROM, CD-RW/DVD-R
Many alternative forms
Memory Stick, MultiMediaCard, CompactFlash, and SmartMedia
Hardware elements
Input devices -
Accept information or commands in an exceedingly type useable by computers
Output devices
Display the processed info - printers, monitors, speakers.
Processing devices
In system unit and square measure comprised of electronic equipment.
Storage devices -
Drives scan from and write to storage media (the physical material which will store information and programs).
Communication devices
Provide connections between computers and communication networks, letting exchange {of information|of information|of knowledge} and data with alternative computers via transmission media like cables, phonephone lines, and satellites
Input devices -
Accept data or commands in a form useable by computers
Output devices
Display the processed information - printers, monitors, speakers.
Processing devices
In system unit and are comprised of circuitry.
Storage devices -
Drives read from and write to storage media (the physical material that can store data and programs).
Communication devices
Provide connections between computers and communication networks, allowing for exchange of information and data with other computers via transmission media such as cables, telephone lines, and satellites
Input Devices
• Keyboards
• Pointing Devices mouse, trackballs, joysticks, touchpads and lightweight pens
• Source Entry devices Scanners, Audio input devices, video input devices, digital cameras
Output Devices
Softcopy
Monitor /Display Screens CRT and Flat Panel (LCD), EL and gas plasma
Monitor /Display Screen clarity
Resolution
Refers to the quantity of dots displayed within the X (across) and Y (down) co-ordinates.
Expressed in terms of horizontal pixels X vertical pixels.
Typical screens square measure capable of displaying 640x480 dots
Dot Pitch
Measurement of however approximate the pixels, or phosphor dots, square measure that frame a picture.
The smaller the dot pitch, the crisper the image,0.31 or less provides a pointy image, particularly once displaying text.
Refresh rate
The vertical frequency, or the speed at that every component on a screen is re-drawn. a coffee refresh rate leads to a picture that glints, leading to eye-strain.
A refresh rate of sixtyHz suggests that the pictures is redrawn 60 times a second. Typical refresh rates square measure 60Hz, 72Hz and 75Hz.
Video Display Adapters
Display graphics - Visual output from your system.
Works between the system's processor and monitor
Relays the data received from the programs and applications running on the system to the monitor
VDAs accompany their own memory chips (RAM or VRAM for video RAM) that determines how briskly the cardboard processes pictures, the resolution, and the way many colors it will show.
VDA embody bound standards.
Todays PCs usually use VGA and SVGA standards
Hardcopy Output : Printers
Impact Printers
The general options of impact printers square measure uses force by applying hammer pins to strike the paper
• slow speed
• prints on most paper varieties
• transparencies not supported
• multiple copies is also written right away
Advantages : less costly, quick (some types) , will build multiple copies with multipart paper
Disadvantages : Noisy! Print quality lower in some varieties. Poor graphics or none the least bit.
Dot-Matrix and Daisy-Wheel.
Dot matrix printers type characters exploitation row(s) of pins, 9, 18, or twenty four that impact the ribbon on high of the paper.
Daisy wheel printers use a spoked wheel with characters placed at the top of every spoke. A print hammer is employed to strike the specified character onto the ink ribbon and so the paper.
Hardcopy Output : Printers
Non Impact Printers
General options print head doesn't build contact with the paper
• higher speed in characters per second is feasible
• prints on most paper varieties however higher quality obtained with higher paper
• transparencies typically supported
• Uses ink spray or toner powder
• Offer superior quality and bigger choices (in terms of the quantity of fonts and quality of graphic pictures)
Disadvantages : costlier.
The 3 main sorts of non-impact printers square measure laserjet, inkjet and thermal
Characters of printers
Speed: The speed of a printer is measured in: cps= characters per second, lpm= lines per minute ppm= pages per minute The quicker the printing, the costlier the printer.
Resolution: Aa lot of numerical live of print quality is printer resolution. Measured in dots per in. (dpi), this determines however swish a diagonal line the printer will turn out.
Cable connection:
Serial Cables- send information only one bit at a time- Distance from computer a thousand linear unit
Parallel Cables- send information eight bits at a time. Distance from computer fifty linear unit.- most well-liked - USB cable that includes a most information transfer speed of twelve megabits/s (1.5 MBYTES/s).
The Motherboard
The motherboard is that the main card of a pc. It contains the central process unit (CPU), the essential Input/Output System (BIOS), memory, mass storage interfaces, serial and parallel ports, growth slots, and every one the controllers for normal peripheral devices just like the keyboard, hard drive and visual display unit.
The chipset and alternative motherboard electronic equipment ar the "smarts" of the motherboard. Their job is to direct traffic and management the flow of data within the pc.
The chipset could be a important a part of any pc, as a result of it plays a giant role in determinant what types of options the pc will support.
BIOS
• BIOS stands for Basic Input/Output System.
• lowest-level code within the pc
• Acts as Associate in Nursing interface between the hardware (especially the chipset and processor) and therefore the package.
• The BIOS provides access to the system hardware and permits the creation of the higher-level in operation systems that you simply use to run your applications.
• The BIOS is additionally accountable for permitting you to manage your computer's hardware settings, for booting up the machine once you activate the facility or hit the button, and varied alternative system functions.
ROM: scan solely Memory
• ROM is nonvolatilisable. Computer memory chips contain for good written information, referred to as code (your BIOS lives here).
• ROM contains the programs that direct the pc to load the package and connected files once the pc is steam-powered on.
• ROM chips ar typically recorded after they ar factory-made.
PROM -Programmable scan solely silicon chip can not be modified to update or revise the program within
EPROM eradicable Programmable scan solely memory information may be erased and chip may be reused may be erased by shining high intensity light-weight|ultravioletillumination|UV|actinicradiation|actinic ray} light through the window
EEPROM Electrical eradicable Programmable scan solely memory below high voltage
FROM -Flash computer memory is reprogrammable memory victimisation traditional voltage within the PC- you'll upgrade the logic capabilities by merely downloading new code. This protects the expense of replacement circuit boards and chips.
Processing Devices
Pronounced money.
It is alittle, high-speed memory space that's placed between the processor and therefore the system memory.
The value of the cache is that it's a lot of quicker than traditional system memory.
The most oftentimes used directions ar unbroken in cache memory so the computer hardware will look in there 1st - permits the computer hardware to run quicker as a result of it does not need to take time to swap directions in and out of main memory.
Large, complicated programs like complicated spreadsheets or direction programs profit the foremost from having a cache memory accessible. Pentium II processors usually go together with a minimum of 512 computer memory unit of cache memory.
Random Access Memory (RAM)
• RAM is Primary Storage, additionally referred to as internal storage.
• Serves as computers space, storing all or a part of the program that's being dead, additionally as information being employed by the program.
• RAM provides directions and information to the computer hardware.
• These instructions/data ar coded in bytes.
• Each computer memory unit is placed during a precise location in memory, referred to as Associate in Nursing address.
• To access information or directions in memory, the pc references the addresses containing the bytes.
• The quantity of memory accessible is thus measured in bytes
RAM chips contains lots of switches that ar sensitive to changes in electrical phenomenon.
• RAM chips ar usually packaged on little circuit boards referred to as memory modules, that ar inserted into special slots on the motherboard.
• RAM is Volatile storage: Power goes, data goes!
• Data/instructions ar traced into memory PRN.
• Not enough memory or corruption of data/instructions in memory will cause crash.
• On booting, package files ar loaded from a device (the disk, usually) into RAM, and that they stay there as long as your pc is running.
• RAM contents changes as programs ar dead.
• RAM chips contains lots of switches that ar sensitive to changes in electrical phenomenon.
• RAM chips ar usually packaged on little circuit boards referred to as memory modules, that ar inserted into special slots on the motherboard.
• On booting, package files ar loaded from a device (the disk, usually) into RAM, and that they stay there as long as your pc is running.
• RAM contents changes as programs ar dead.
• The quantity of RAM required depends on the categories of applications you plan to run on the pc. S/w indicate the minimum quantity of RAM needed to run.
Two basic varieties of RAM ar Dynamic RAM (DRAM), and Static RAM (SRAM).
Most computers nowadays use DRAM, that are of 2 types:
• SDRAM Synchronous Dynamic RAM runs at identical pace because the system clock runs
• DDR SDRAM DDR stands for Double rate - runs at double the pace the system clock runs - accessible in speeds from 266 rate upto 600MHZ
• DDR2 SDRAM runs at fourfold the pace the system clock runs - accessible in speeds from four hundred rate upto 800MHZ
Most desktops and notebooks use one in every of the 3 most well liked forms of synchronous dynamic random access memory (SDRAM) for the most system memory. Single rate (SDR) SDRAM is that the older form of memory, usually employed in computers before 2002. Double rate (DDR) SDRAM hit the thought pc market around 2002, and DDR2-based systems hit the market in mid-2004.
DDR SDRAM could be a easy evolution from SDR SDRAM. The large distinction between DDR SDRAM and SDR SDRAM is that DDR reads knowledge on each the rising and falling edges of the clock signal, therefore the DDR module will transfer knowledge doubly as quick as SDR SDRAM.
While DDR incorporates a restricted clock rate, the organic process changes to DDR design modify DDR2 to realize speeds on the far side of DDR, delivering information measure of five.3 GB per second and beyond! as a result of DDR2 is in a position to control with quicker bus speeds, your memory does not twiddling my thumbs the performance of your processor.
Generally speaking, motherboards square measure engineered to support just one form of memory. You can't combine and match SDRAM, DDR, or DDR2 memory on identical motherboard in any system. They're going to not perform and can not even slot in identical.
Why is RAM therefore important?
Aside from the processor, the 2 most significant factors moving a PC's performance square measure RAM and fixed disk capability.
Hard disks square measure usually Brobdingnagian, therefore the primary limiting issue is that the quantity of put in RAM.
Without enough RAM, the OS should swap out space for storing with the fixed disk. The OS creates a Paging File (swap file) to supplement RAM (workspace). This can be virtual storage.
Virtual memory is inherently slow! RAM speed will usually be a hundred and twenty,000 times quicker than the fixed disk therefore the less you need to think about virtual storage (swapping files between RAM and arduous disk), the quicker your system can perform.
Microprocessor
• Heart and brain of the computer
• One electrical device up to the mark of another
• Successive generation of processors
• 80286,80386,80486 -32 bit interface
• Pentium family P1, P2, P3, P4 sixty four bit interface
• Dual-core technology is like having 2 processors - A twin core processor could be a hardware with 2 separate cores residing on identical chip
Terminology
• Hardware (H/w) All machinery &Equipments pc & Peripherals
• Peripherals Any piece of hardware connected to the computer
• Software (S/w) programs- tells the pc a way to perform a task
o Systems code (S/w) For managing internal activities & run applications s/w Interpreter bet S/w & H/w
o Application code (S/w) - to perform a selected task Custom or prepacked
Random Access Memory
RAM (Random Access Memory) is that the internal memory of the CPU for storing information, program, and program result. It's a read/write memory that stores information till the machine is functioning. As before long because the machine is transitioned, information is erased.
Access time in RAM is freelance of the address, that is, every storage location within the memory is as simple to achieve as different locations and takes a similar quantity of your time. Information within the RAM may be accessed indiscriminately however it's terribly big-ticket.
RAM is volatile, i.e. information hold on in it's lost after we turn out the pc or if there's an influence failure. Hence, a backup Uninterruptible power grid (UPS) is commonly used with computers. RAM is little, each in terms of its physical size and within the quantity of knowledge it will hold.
RAM is of 2 varieties varieties
• Static RAM (SRAM)
• Dynamic RAM (DRAM)
Static RAM (SRAM)
The word static indicates that the memory retains its contents as long as power is being provided. However, information is lost once the facility gets down because of volatile nature. SRAM chips use a matrix of 6-transistors and no capacitors. Transistors don't need power to forestall leak, therefore SRAM needn't be rested on a daily basis.
There is further house within the matrix, thus SRAM uses additional chips than DRAM for a similar quantity of space for storing, creating the producing prices higher. SRAM is so used as cache memory and has in no time access.
Characteristic of Static RAM
• Long life
• No ought to refresh
• Faster
• Used as cache memory
• Large size
• Expensive
• High power consumption
Dynamic RAM (DRAM)
DRAM, not like SRAM, should be frequently rested so as to take care of the info. This is often done by inserting the memory on a refresh circuit that rewrites the info many hundred times per second. DRAM is employed for many system memory because it is affordable and little. All DRAMs square measure created of memory cells, that square measure composed of 1 capacitance and one semiconductor.
Characteristics of Dynamic RAM
• Short information period of time
• Needs to be rested ceaselessly
• Slower as compared to SRAM
• Used as RAM
• Smaller in size
• Less big-ticket
• Less power consumption
Read Only Memory
ROM stands for browse solely Memory. The memory from that we will solely browse however cannot pen it. This sort of memory is non-volatile. The knowledge is hold on for good in such reminiscences throughout manufacture. A store stores such directions that square measure needed to begin a pc. This operation is remarked as bootstrap. Store chips aren't solely employed in the pc however conjointly in different electronic things like washer and kitchen appliance.
Let us now discuss the various types of ROMs and their characteristics.
MROM (Masked ROM)
The terribly initial ROMs were hard-wired devices that contained a pre-programmed set of knowledge or directions. These reasonably ROMs square measure called covert ROMs, that square measure cheap.
PROM (Programmable browse solely Memory)
PROM is fixed storage which will be changed just once by a user. The user buys a blank promenade and enters the required contents employing a promenade program. Within the promenade chip, there square measure little fuses that square measure burnt open throughout programming. It may be programmed just once and isn't effaceable.
EPROM (Erasable and Programmable browse solely Memory)
EPROM may be erased by exposing it to ultra-violet light-weight for a length of up to forty minutes. Usually, AN ROM implement achieves this operate. Throughout programming, AN electrical charge is treed in AN insulated gate region. The charge is preserved for quite ten years as a result of the charge has no leak path. For erasing this charge, ultra-violet light-weight is capable a quartz window (lid). This exposure to ultra-violet light-weight dissipates the charge. Throughout traditional use, the quartz lid is sealed with a sticker.
EEPROM (Electrically effaceable and Programmable browse solely Memory)
EEPROM is programmed and erased electrically. It may be erased and reprogrammed concerning 10 thousand-fold. Each erasing and programming take concerning four to ten ms (millisecond). In EEPROM, any location may be by selection erased and programmed. EEPROMs may be erased one computer memory unit at a time, instead of erasing the whole chip. Hence, the method of reprogramming is versatile however slow.
Advantages of store
The advantages of store square measure as follows −
• Non-volatile in nature
• Cannot be accidentally modified
• Cheaper than RAMs
• Easy to check
• More reliable than RAMs
• Static and don't need refreshing
• Contents square measure perpetually renowned and might be verified
You know that processor memory, additionally called primary memory, is dear likewise as restricted. The quicker primary memory are volatile. If we want to store great deal of knowledge or programs for good, we want a less expensive and permanent memory. Such memory is named secondary memory. Here we are going to discuss secondary memory devices which will be wont to store great deal of knowledge, audio, video and multimedia system files.
Characteristics of Secondary Memory
These area unit some characteristics of secondary memory, that distinguish it from primary memory −
• It is non-volatile, i.e. it retains knowledge once power is shifted
• It is massive capacities to the tune of terabytes
• It is cheaper as compared to primary memory
Depending on whether or not secondary storage device is a component of C.P.U. Or not, there area unit 2 kinds of secondary memory – fastened and removable.
Let us look at some of the secondary memory devices available.
Hard Disk Drive
Hard disk drive is formed from a series of circular disks known as platters organized one over the opposite nearly ½ inches apart around a spindle. Disks area unit fabricated from non-magnetic material like aluminium alloy and coated with 10-20 nm of magnetic material.
Standard diameter of those disks is fourteen inches and that they rotate with speeds variable from 4200 rev (rotations per minute) for private computers to 15000 rev for servers. Knowledge is keep by magnetizing or demagnetizing the magnetic coating. A magnetic browseer arm is employed to read knowledge from and write knowledge to the disks. A typical fashionable HDD has capability in terabytes (TB).
CD Drive
CD stands for optical disk. CDs area unit circular disks that use optical rays, sometimes lasers, to browse and write knowledge. They're all-time low as you'll get 700 MB of space for storing for fewer than a dollar. CDs area unit inserted in CD drives designed into C.P.U. Cupboard. They're moveable as you'll eject the drive, take away the CD and carry it with you. There area unit 3 kinds of kinds of
• CD-ROM (Compact Disk – browse solely Memory) − the info on these CDs area unit recorded by the manufacturer. Proprietary software package, audio or video area unit free on CD-ROMs.
• CD-WO (Compact Disk – Recordable) − knowledge is written by the user once on the CD-R. It can not be deleted or changed later.
• CD-RW (Compact Disk – Rewritable) − knowledge is written and deleted on these optical disks once more and once more.
DVD Drive
DVD stands for Digital computer screen. Videodisk area unit optical devices which will store fifteen times the info control by CDs. They're sometimes wont to store made multimedia system files that require high storage capability. DVDs additionally are available in 3 varieties – browse solely, recordable and rewritable.
Pen Drive
Pen drive may be a moveable storage device that uses solid state memory instead of magnetic fields or lasers to record knowledge. It uses a technology kind of like RAM, except that it's nonvolatile .it's additionally known as USB drive, key drive or nonvolatile storage.
Blu Ray Disk
Blu Ray Disk (BD) is associate optical storage media wont to store high definition (HD) video and alternative multimedia system filed. Bachelor's degree uses shorter wavelength optical device as compared to CD/DVD. This allows arm to focus additional tightly on the disk and thus pack in additional knowledge. BDs will store up to 128 GB knowledge.
Classification of Computers
Computer scan is broadly classified by their speed and computing power.
Sr.No. | Type | Specifications |
1 | PC (Personal Computer) or Micro-Computers | It is a single user computer system having a moderately powerful microprocessor. It is termed as a computer that is equipped microprocessor as its CPU. |
2 | Workstation | It is also a single user computer system, similar to the personal computer, however, has a more powerful microprocessor. |
3 | Mini-Computer | It is a multi-user computer system, capable of supporting hundreds of users simultaneously. |
4 | Main Frame | It is a multi-user computer system, capable of supporting hundreds of users simultaneously. Software technology is different from minicomputer. |
5 | Super-Computer | It is an extremely fast computer, which can execute hundreds of millions of instructions per second. |
PC (Personal Computer)
A computer is outlined as atiny low, comparatively cheap laptop designed for a private user. PCs area unit supported the silicon chip technology that allows makers to place a whole CPU on one chip. Businesses use personal computers for data processing, accounting, publishing, and for running computer programme and management applications. At home, the foremost well-liked use for private computers is taking part in games and surfboarding the net.
Although personal computers area unit designed as single-user systems, these systems area unit ordinarily joined along to create a network. In terms of power, these days high-end models of the Macintosh and computer supply constant computing power and graphics capability as low-end workstations by Sun Microsystems, Hewlett-Packard, and Dell.
Workstation
The digital {computer} could be a computer used for engineering applications (CAD/CAM), publishing, package development, and different such varieties of applications that need a moderate quantity of computing power and comparatively high-quality graphics capabilities.
Workstations usually escort an outsized, high-resolution graphics screen, an outsized quantity of RAM, intrinsic network support, and a graphical interface. Most workstations even have mass device like a Winchester drive, however a special form of digital computer, known as diskless workstations, comes while not a Winchester drive.
Common operative systems for workstations area unit operating system and Windows NT. Like PC, workstations {are also|also area unit|are} single-user computers like laptop however are usually joined along to create space|aneighborhood} area network, though they will even be used as complete systems.
Minicomputer
It is a midsize multi-processing system capable of supporting up to 250 users simultaneously.
Mainframe
The mainframe is very large in size and is an expensive computer capable of supporting hundreds or even thousands of users simultaneously. Mainframe executes many programs concurrently and supports much simultaneous execution of programs.
Supercomputer
Supercomputers are one of the fastest computers currently available. Supercomputers are very expensive and are employed for specialized applications that require an immense amount of mathematical calculations (number-crunching).
For example, weather forecasting, scientific simulations, (animated)graphics, fluid dynamic calculations, nuclear energy research, electronic design, and analysis of geological data (e.g. In petrochemical prospecting).
What is a programming language?
A artificial language defines a group of directions that area unit compiled along to perform a particular task by the central processing unit (Central process Unit). The artificial language primarily refers to high-level languages like C, C++, Pascal, Ada, COBOL, etc.
Each artificial language contains a singular set of keywords and syntax, that area unit accustomed produce a group of directions. Thousands of programming languages are developed until currently, however every language has its specific purpose. These languages vary within the level of abstraction they supply from the hardware. Some programming languages offer less or no abstraction whereas some offer higher abstraction. Supported the amount of abstraction, they will be classified into 2 categories:
• Low-level language
• High-level language
The image that is given below describes the abstraction level from hardware. As we will observe from the below image that the machine language provides no abstraction, programing language provides less abstraction whereas application-oriented language provides a better level of abstraction.
Low-level language
The low-level language could be a programing language that gives no abstraction from the hardware, and it's portrayed in zero or one forms, that square measure the machine directions. The languages that return below this class square measure the Machine level language and programming language.
Machine-level language
The machine-level language could be a language that consists of a collection of directions that square measure within the binary kind zero or one. As we all know that computers will perceive solely machine directions, that square measure in binary digits, i.e., 0 and 1, that the directions given to the pc will be solely in binary codes. Making a program terribly} machine-level language could be a very tough task because it isn't simple for the programmers to put in writing the program in machine directions. It's fallible because it isn't simple to grasp, and its maintenance is additionally terribly high. A machine-level language isn't moveable as every laptop has its machine directions, therefore if we have a tendency to write a program in one laptop can now not be valid in another laptop.
The totally different processor architectures use different machine codes, for instance, a PowerPC processor contains reduced instruction set computer|architecture} architecture, which needs totally different code than intel x86 processor, that incorporates a CISC design.
Assembly Language
The programming language contains some human-readable commands like mov, add, sub, etc. the issues that we have a tendency to were facing in machine-level language square measure reduced to some extent by victimisation associate degree extended type of machine-level language referred to as programming language. Since programming language directions square measure written in English words like mov, add, sub, therefore it's easier to put in writing and perceive.
As we all know that computers will solely perceive the machine-level directions, therefore we have a tendency to need a translator that converts the assembly code into machine language. The translator used for translating the code is thought as associate degree assembly program.
The programming language code isn't moveable as a result of the info is keep in laptop registers, and also the laptop needs to grasp the various sets of registers.
The assembly code isn't quicker than machine language as a result of the programming language comes higher than the machine language within the hierarchy, therefore it means programming language has some abstraction from the hardware whereas machine language has zero abstraction.
Differences between Machine-Level language and Assembly language
The following are the differences between machine-level language and assembly language:
Machine-level language | Assembly language |
The machine-level language comes at the lowest level in the hierarchy, so it has zero abstraction level from the hardware. | The assembly language comes above the machine language means that it has less abstraction level from the hardware. |
It cannot be easily understood by humans. | It is easy to read, write, and maintain. |
The machine-level language is written in binary digits, i.e., 0 and 1. | The assembly language is written in simple English language, so it is easily understandable by the users. |
It does not require any translator as the machine code is directly executed by the computer. | In assembly language, the assembler is used to convert the assembly code into machine code. |
It is a first-generation programming language. | It is a second-generation programming language. |
High-Level Language
The problem-oriented language could be a artificial language that permits a software engineer to write down the programs that ar freelance of a specific style of laptop. The high-level languages ar thought of as high-level as a result of they're nearer to human languages than machine-level languages.
When writing a program in a very problem-oriented language, then the entire attention has to be paid to the logic of the matter.
A compiler is needed to translate a problem-oriented language into a low-level language.
Advantages of a problem-oriented language
• The problem-oriented language is simple to scan, write, and maintain because it is written in English like words.
• The high-level languages ar designed to beat the limitation of low-level language, i.e., movableness. The problem-oriented language is portable; i.e., these languages ar machine-independent.
Differences between Low-Level language and High-Level language
The following are the differences between low-level language and high-level language:
Low-level language | High-level language |
It is a machine-friendly language, i.e., the computer understands the machine language, which is represented in 0 or 1. | It is a user-friendly language as this language is written in simple English words, which can be easily understood by humans. |
The low-level language takes more time to execute. | It executes at a faster pace. |
It requires the assembler to convert the assembly code into machine code. | It requires the compiler to convert the high-level language instructions into machine code. |
The machine code cannot run on all machines, so it is not a portable language. | The high-level code can run all the platforms, so it is a portable language. |
It is memory efficient. | It is less memory efficient. |
Debugging and maintenance are not easier in a low-level language. | Debugging and maintenance are easier in a high-level language. |
PROGRAM TRANSLATORS
A program translator may be a worm that performs the interpretation of a program written in an exceedingly given artificial language into a functionally equivalent program in an exceedingly completely different computer-oriented language, while not losing the useful or logical structure of the initial code (the "essence" of every program).
These embrace translations between high-level and human-readable laptop languages like C++, Java and COBOL, intermediate-level languages like Java bytecode, low-level languages like the programing language and machine language, and between similar levels of language on completely different computing platforms, yet as from any of those to the other of those.
They additionally embrace translators between package implementations and hardware/ASIC semiconductor implementations of constant program, and from package descriptions of a semiconductor to the logic gates required to create it.
1. COMPILERS
A compiler may be a worm (or set of programs) that transforms ASCII text file written in an exceedingly artificial language (the supply language) into another computer-oriented language (the target language, typically having a binary kind called object code).
The most common reason for changing a ASCII text file is to form associate feasible program.
The name "compiler" is primarily used for programs that translate ASCII text file from a high-level artificial language to a lower level language (e.g., programing language or machine code).
If the compiled program will run on a laptop whose electronic equipment or package is completely different from the one on that the compiler runs, the compiler is understood as a cross-compiler. Additional usually, compilers area unit a selected sort oftranslators.
A program that interprets from an occasional level language to a better level one may be a decompiler.
A program that interprets between high-level languages is sometimes known as a source-to-source compiler or transpiler.
A language redact is sometimes a program that interprets the shape of expressions while not a modification of language.
The term compiler-compiler is usually wont to see a computer program generator, a tool typically wont to facilitate produce the lexer and computer program.
A compiler is probably going to perform several or all of the subsequent operations:
1. Lexical analysis,
2. Preprocessing,
3. Parsing,
4. linguistics analysis (syntax-directed translation),
5. Code generation, and code optimisation.
Program faults caused by incorrect compiler behavior is terribly tough to trace down and work around; so, compiler implementors invest vital effort to confirm compiler correctness.
Compilers enabled the event of programs that area unit machine-independent.
Before the event of FORTRAN, the primary higher-level language, within the Nineteen Fifties, machine-dependentassembly language was wide used.
While programing language produces additional abstraction than machine language on constant design, even as with machine language, it's to be changed or rewritten if the program is to be dead on completely different component design.
With the arrival of high-level programming languages that followed FORTRAN, like COBOL, C, and BASIC, programmers may write machine-independent supply programs. A compiler interprets the high-level supply programs into target programs in machine languages for the precise hardware. Once the object program is generated, the user will execute the program.
STRUCTURE OF COMPILER
Compilers bridge supply programs in high-level languages with the underlying hardware.
A compiler verifies code syntax, generates economical code, performs run-time organization, and formats the output in line with program and linker conventions.
A compiler consists of:
1.THE face
• It verifies syntax and linguistics, associated generates an intermediate illustration or IR of the ASCII text file for process by the middle-end.
• Performs sort checking by assembling sort info.
• Generates errors and warning, if any, in an exceedingly helpful approach.
• Aspects of the face embrace lexical analysis, syntax analysis, and linguistics analysis.
• The compiler frontend analyzes the ASCII text file to create an inside illustration of the program, known as theintermediate illustration or IR.
• It additionally manages the image table, {a data|aknowledge|an info} structure mapping every image within the ASCII text file to associated information like location, sort and scope.
• While the frontend is one monolithic perform or program, as in an exceedingly scannerless computer program, it's additional usually enforced and analyzed as many phases, which can execute consecutive or at the same time.
• In some cases further phases area unit used, notably line reconstruction and preprocessing, however these area unit rare.
• A careful list of potential phases includes:
1. Line reconstruction:
• Languages that strop their keywords or permit capricious areas inside identifiers need a part before parsing, that converts the input character sequence to a canonical kind prepared for the computer program.
• The top-down, recursive-descent, table-driven parsers employed in the Sixties generally scan the supply one character at a time and failed to need a separate tokenizing part.
• Atlas Autocode, and Imp (and some implementations ofALGOL and Coral 66) area unit samples of stropped languages that compilers would have a Line Reconstruction part.
2. Lexical analysis
• It breaks the ASCII text file text into little items known as tokens. Every token may be a single atomic unit of the language, as an example a keyword, symbol or image name.
• The token syntax is often a daily language, therefore a finite state automaton made from a daily expression is wont to acknowledge it.
• This part is additionally known as lexing or scanning, and therefore the package doing lexical analysis is termed a lexical analyser or scanner.
• This might not be a separate step – it is combined with the parsing step in scannerless parsing, within which case parsing is finished at the character level, not the token level.
3. Preprocessing.
• Some languages, e.g., C, need a preprocessing part that supports macro substitution and conditional compilation. Generally the preprocessing part happens before grammar or linguistics analysis; e.g. Within the case of C, the preprocessor manipulates lexical tokens instead of grammar forms. However, some languages like Schemesupport macro substitutions supported grammar forms.
4. Syntax analysis
• It involves parsing the token sequence to spot the grammar structure of the program.
• This section generally builds a analyse tree, that replaces the linear sequence of tokens with a tree structure engineered in keeping with the foundations of a proper descriptive linguistics that outline the language's syntax.
• The analyse tree is usually analyzed, augmented, and reworked by later phases within the compiler.
5. Linguistics analysis
• It is that the introduce that the compiler adds linguistics data to the analyse tree and builds the image table. This section performs linguistics checks like sort checking (checking for sort errors), or object binding (associating variable and performance references with their definitions), or definite assignment (requiring all native variables to be initialized before use), rejecting incorrect programs or provision warnings.
• Semantic analysis typically needs an entire analyse tree, which means that this section logically follows the parsingphase, and logically precedes the code generation section, tho' it's typically attainable to fold multiple phases into one omit the code in a very compiler implementation.
2.THE MIDDLE finish :
• Performs optimizations, together with removal of useless or out of reach code, discovery and propagation of constant values, relocation of computation to a less ofttimes dead place (e.g., out of a loop), or specialization of computation supported the context. Generates another IR for the backend.
3. The rear finish
Generates the assembly code, acting register allocation in method. (Assigns processor registers for the program variables wherever attainable.)
Optimizes target code utilization of the hardware by deciding the way to keep parallel execution units busy, filling delay slots.
Although most algorithms for improvement square measure in NP, heuristic techniques square measure well-developed.
• The main phases of the rear finish embrace the following:
1. Analysis: this can be the gathering of program data from the intermediate illustration derived from the input; data-flow analysis is employed to create use-define chains, along withdependence analysis, alias analysis, pointer analysis, escape analysis, etc. correct analysis is that the basis for any compiler improvement. The decision graph and management flow graph square measure typically additionally engineered throughout the analysis section.
2. Optimization: the intermediate language illustration is reworked into functionally equivalent however quicker (or smaller) forms. In style optimizations square measure inline enlargement, dead code elimination, constant propagation, loop transformation, register allocation and even automatic parallelization.
3. Code generation: the reworked intermediate language is translated into the output language, typically the native machine language of the system. This involves resource and storage selections, like deciding that variables to suit into registers and memory {and the|and therefore the|and additionally the} choice and programming of applicable machine directions together with their associated addressing modes (see also Sethi-Ullman algorithm). Right knowledge may got to be generated to facilitate debugging.
Compiler analysis is that the necessity for any compiler improvement, and that they tightly work along. As an example, dependence analysis is crucial for loop transformation.
TYPES OF COMPILERS
1. SINGLE PASS COMPILER
• The ability to compile in a very single pass has classically been seen as a profit as a result of it simplifies the duty of writing a compiler and one-pass compilers usually perform compilations quicker than multi-pass compilers.
• Thus, partially driven by the resource limitations of early systems, several early languages were specifically designed in order that they might be compiled in a very single pass (e.g., Pascal).
• In some cases the look of a language feature could need a compiler to perform quite one omit the supply. For example, think about a declaration showing on line twenty of the supply that affects the interpretation of an announcement showing on line ten. During this case, the primary pass has to gather data concerning declarations showing when statements that they have an effect on, with the particular translation happening throughout a future pass.
• The disadvantage of aggregation in a very single pass is that it's unimaginable to perform several of the delicate optimizations required to get top quality code. It is troublesome to count specifically what number passes Associate in Nursing optimizing compiler makes. For example, completely different phases of improvement could analyse one expression over and over however solely analyse another expression once.
• Splitting a compiler up into tiny programs could be a technique employed by researchers curious about manufacturing incontrovertibly correct compilers. Proving the correctness of a collection of tiny programs typically needs less effort than proving the correctness of a bigger, single, equivalent program.
2. MULTI PASS COMPILER
• While the everyday multi-pass compiler outputs computer code from its final pass, there square measure many alternative types:
• A "source-to-source compiler" could be a form of compiler that takes a high level language as its input and outputs a high level language. As an example, Associate in Nursing automatic parallelizing compiler can ofttimes soak up a high level language program as Associate in Nursing input and so rework the code and annotate it with parallel code annotations (e.g. OpenMP) or language constructs (e.g. Fortran's DOALL statements).
3. Progressive COMPILER
• Individual functions is compiled in a very run-time surroundings that additionally includes taken functions. Progressive compilation dates back to 1962 and therefore the 1st LISP compiler, and continues to be utilized in Common Lisp systems.
• Lisp systems
4. STAGE COMPLIER
• The compilers that compiles to programming language of a theoretical machine, like some logic programming implementations.
• This logic programming machine is additionally referred to as the Warren abstract machine (or WAM). Byte-code compilers for Java, Python (and several more) are a subtype of this.
5. JUST IN TIME COMPILER
In computing, just-in-time (JIT) compilation, conjointly referred to as dynamic translation, is compilation done throughout execution of a program – at run time – instead of before execution.
• Most usually this consists of translation to machine language, that is then dead directly, however can even discuss with translation to a different format.
• JIT compilation could be a combination of the 2 ancient approaches to translation to machine language – ahead-of-time compilation (AOT), and interpretation – and combines some blessings and downsides of each.
• JIT compilation combines the speed of compiled code with the pliability of interpretation, with the overhead of associate degree interpreter and therefore the extra overhead of compilation (not simply interpreting).
• JIT compilation could be a style of dynamic compilation, and permits adaptative optimisation like dynamic recompilation – so in theory JIT compilation will yield quicker execution than static compilation. Interpretation and JIT compilation ar notably fitted to dynamic programming languages, because the runtime system will handle late-bound information sorts and enforce security guarantees.
ADVANTAGES OF COMPILER
1. ASCII text file isn't enclosed, thus compiled code is safer than understood code.
2. Tends to provide quicker code than deciphering ASCII text file.
3. Produces associate degree practicable file, and so the program are often run while not would like of the ASCII text file.
DISADVANTAGES OF COMPILER
1. code must be made before a final practicable file, this could be a slow method.
2. The ASCII text file should be 100 percent correct for the practicable file to be made.
2. INTERPRETERS
In computing, associate degree interpreter could be a computer virus that directly executes, i.e. performs, directions written during a programming or scripting language, while not antecedently compilation them into a machine language program.
An interpreter could be a program that reads in as input a computer program, along side information for the program, and interprets the computer program instruction by instruction.
EXAMPLE
• The Java interpreter java translate a .class file into code which will be dead natively on the underlying machine.
• The program VirtualPC interprets programs written for the Intel Pentium design (IBM-PC clone) for the PowerPC design (Macintosh). This change Macintosh users to run Windows programs on their pc.
An interpreter typically uses one in every of the subsequent ways for program execution:
1. take apart the ASCII text file and perform its behavior directly.
2. translate ASCII text file into some economical intermediate illustration and forthwith execute this.
3. expressly execute hold on precompiled code created by a compiler that is an element of the interpreter system.
APPLICATIONS
1. Interpreters ar oft wont to execute command languages, associate degreed glue languages since every operator dead in search language is typically associate degree invocation of a fancy routine like an editor or compiler.
2. Self-modifying code will simply be enforced in associate degree understood language. This relates to the origins of interpretation in Lisp and computer science analysis.
3. Virtualization. Machine language meant for one hardware design are often run on another employing a virtual machine, that is actually associate degree interpreter.
4. Sandboxing: associate degree interpreter or virtual machine isn't compelled to truly execute all the directions the ASCII text file it's process. Specifically, it will refuse to execute code that violates any security constraints it's operational underneath.
ADVANTAGES OF INTERPRETER
1. Easier to debug(check errors) than a compiler.
2. Easier to make multi-platform code, as every totally different platform would have associate degree interpreter to run a similar code.
3. helpful for prototyping package and testing basic program logic.
DISADVANTAGES OF INTERPRETER
1. ASCII text file is needed for the program to be dead, and this ASCII text file are often browse creating it insecure.
2. Interpreters ar typically slower than compiled programs because of the per-line translation methodology.
3. ASSEMBLERS
An computer program interprets programing language into machine language.
An computer program could be a program that makes code by translating combos of method and syntax for operations and addressing modes into their numerical equivalents.
Assembly language
• It consists of method for machine opcodes thus assemblers perform a 1:1 translation from mnemotechnical to an on the spot instruction.
• An programing language (or computer program language) could be a low-level programing language for a pc, or different programmable device, during which there's a really sturdy (generally one-to-one) correspondence between the language and therefore the architecture's machine language directions.
• Each programing language is particular to a selected pc design, in distinction to most high-level programming languages, that ar typically transportable across multiple architectures, however need deciphering or compilation.
• Assembly language is reborn into practicable machine language by a utility mentioned as associate degree assembler; the conversion method is mentioned as assembly, or collecting the code.
For example:
LDA #4 converts to 0001001000100100
Conversely, one instruction during a high level language can translate to 1 or additional directions at machine level.
TYPES OF ASSEMBLERS
There area unit 2 kinds of assemblers supported what number passes through the supply area unit required to supply the workable program.
1. One-pass assemblers bear the ASCII text file once. Any image used before it's outlined would require "errata" at the tip of the item code (or, at least, no prior to the purpose wherever the image is defined) telling the linker or the loader to "go back" and write a placeholder that had been left wherever the heretofore indefinite image was used.
2. Multi-pass assemblers produce a table with all symbols and their values within the 1st passes, then use the table in later passes to get code.
In each cases, the assembly program should be ready to confirm the scale of every instruction on the initial passes so as to calculate the addresses of ulterior symbols.
This means that if the scale of associate operation bearing on associate quantity outlined later depends on the kind or distance of the quantity, the assembly program can build a disheartened estimate once 1st encountering the operation, and if necessary pad it with one or additional "no-operation" directions during a later pass or the errata. In associate assembly program with spyhole improvement, addresses is also recalculated between passes to permit exchange disheartened code with code tailored to the precise distance from the target.
The original reason for the utilization of one-pass assemblers was speed of assembly – usually a second pass would need rewinding and rereading a tape or rereading a deck of cards.
With fashionable computers this has ceased to be a difficulty. The advantage of the multi-pass assembly program is that the absence of errata makes the linking method (or the program load if the assembly program directly produces workable code) quicker.
APPLICATIONS OF ASSEMBLERS
1. programming language is usually employed in a system's boot code, the low-level code that initializes and tests the system hardware before booting the software package and is commonly keep inROM. (BIOS on IBM-compatible laptop systems associated CP/M is an example.)
2. Some compilers translate high-level languages into assembly 1st before totally assembling, permitting the assembly code to be viewed for debugging and improvement functions.
3. comparatively low-level languages, such as C, enable the coder to plant programming language directly within the ASCII text file. Programs victimisation such facilities, like the UNIX kernel, will then construct abstractions victimisation totally different programming language on every hardware platform. The system's moveable code will then use these processor-specific elements through a standardized interface.
4. programming language is helpful in reverse engineering. Several programs area unit distributed solely in machine language type that is simple to translate into programming language, however harder to translate into a higher-level language. Tools like the Interactive Disassembler build in depth use of dismantlement for such a purpose.
5. Assemblers will be wont to generate blocks of information, with no problem-oriented language overhead, from formatted and commented ASCII text file, to be employed by different code.
ADVANTAGES OF ASSEMBLER:
1. in no time in translating programming language to machine language as one to one relationship.
2. Assembly code is commonly terribly economical (and thus fast) as a result of it's an occasional level language.
3. Assembly code is fairly straightforward to know thanks to the utilization of English-like method.
DISADVANTAGES OF ASSEMBLERS:
1. programming language is written for an exact instruction set and/or processor.
2. Assembly tends to be optimised for the hardware it's designed for, that means it's usually incompatible with totally different hardware.
3. variant assembly code is required to try and do comparatively easy tasks, and sophisticated programs need variant programming time.
DIFFERENCE BETWEEN COMPILERS INTERPRETERS AND ASSEMBLERS
BASIS | COMPILERS | INTERPRETER | ASSEMBLER |
1. DEFINITION | A compiler is a computer program that converts an entire program written in a high-level language (called source code) and translates it into an executable form (called object code). | An interpreter is a computer program that takes source code and converts each line in succession. | Assembler converts assembly languages to machine code than high-level programs languages. |
2. INPUT | Compiler Takes Entire program as input | Interpreter Takes Single instruction as input . | Input source program in Assembly Language through an input device. |
3. MEMORY REQUIREMENT | Memory Requirement : More(Since Object Code is Generated) | Memory Requirement is Less |
|
4. ERRORS | Errors are displayed after entire program is checked. | Errors are displayed for every instruction interpreted (if any) | Error messages generated during an assembly may originate from the assembler or from a higher level language such as C (many assemblers are written in C) or from the operating system environment |
What is File System?
A file could be a assortment of correlate info that is recorded on secondary or nonvolatile storage like magnetic disks, optical disks, and tapes. It's a way of knowledge assortment that's used as a medium for giving input and receiving output from that program.
In general, a file could be a sequence of bits, bytes, or records whose which means is outlined by the file creator and user. Each File features a logical location wherever they're set for storage and retrieval.
Objective of File management System
Here ar the most objectives of the file management system:
• It provides I/O support for a range of memory device sorts.
• Minimizes the probabilities of lost or destroyed information
• Helps OS to standardized I/O interface routines for user processes.
• It provides I/O support for multiple users during a multiuser systems atmosphere.
Properties of a filing system
Here, ar vital properties of a file system:
• Files arkeep on disk or different storage and don't disappear once a user logs off.
• Files have names and ar related to access permission that allows controlled sharing.
• Files can be organized or a lot of complicated structures to mirror the connection between them.
File structure
A File Structure has to be predefined format in such how that Associate in Nursing software system understands .it's Associate in Nursing completely outlined structure, that relies on its sort.
Three varieties of files structure in OS:
• A text file: it's a series of characters that's organized in lines.
• An object file: it's a series of bytes that's organized into blocks.
• A supply file: it's a series of functions and processes.
File Attributes
A file features a name and information. Moreover, it conjointly stores meta info like file creation date and time, current size, last changed date, etc. All this info is termed the attributes of a filing system.
Here, ar some vital File attributes employed in OS:
• Name: it's the sole info keep during a human-readable type.
• Identifier: each file is known by a singular tag variety inside a filing system referred to as Associate in Nursing symbol.
• Location: Points to file location on device.
• Type: This attribute is needed for systems that support numerous varieties of files.
• Size. Attribute wont to show this file size.
• Protection. This attribute assigns and controls the access rights of reading, writing, and execution the file.
• Time, date and security: it's used for cover, security, and conjointly used for observance
File Type
It refers to the flexibility of the software system to differentiate numerous varieties of files like text files, binary, and supply files. However, operative systems like Microsoft disk operating system and UNIX operating system has the subsequent style of files:
Character Special File
It is a hardware file that reads or writes information character by character, like mouse, printer, and more.
Ordinary files
• These varieties of files stores user info.
• It could also be text, practicable programs, and databases.
• It permits the user to perform operations like add, delete, and modify.
Directory Files
• Directory contains files and different connected info concerning those files. Its primarily a folder to carry and organize multiple files.
Special Files
• These files also are referred to as device files. It represents physical devices like printers, disks, networks, flash drive, etc.
Functions of File
• Create file, notice house on disk, Associate in Nursingd create an entry within the directory.
• Write to file, needs positioning inside the file
• Read from file involves positioning inside the file
• Delete directory entry, regain space.
• Reposition: move read/write position.
Commonly used terms in File systems
Field:
This component stores one price, which may be static or variable length.
DATABASE:
Collection of connected information is termed a information. Relationships among parts of knowledge ar specific.
FILES:
Files is that the assortment of comparable record that is treated as one entity.
RECORD:
A Record sort could be a complicated information sort that permits the engineer to make a brand new information sort with the required column structure. Its teams one or a lot of columns to make a brand new information sort. These columns can have their own names and information sort.
File Access ways
File access could be a method that determines the approach that files ar accessed and skim into memory. Generally, one access technique is often supported by operative systems. Tho' there ar some software system that conjointly supports multiple access ways.
Three file access ways are:
• Sequential access
• Direct random access
• Index serial access
Sequential Access
In this style of file access technique, records ar accessed during a bound pre-defined sequence. Within the serial access technique, info keep within the file is additionally processed one by one. Most compilers access files mistreatment this access technique.
Random Access
The random access technique is additionally referred to as direct random access. This technique enable accessing the record directly. Every record has its own address on which may be directly accessed for reading and writing.
Sequential Access
This type of accessing technique relies on easy serial access. During this access technique, Associate in Nursing index is constructed for each file, with an instantaneous pointer to totally different memory blocks. During this technique, the Index is searched consecutive, and its pointer will access the file directly. Multiple levels of assortment may be wont to provide bigger potency in access. It conjointly reduces the time required to access one record.
Space Allocation
In the software system, files ar continually allotted disk areas.
Three varieties of house allocation ways are:
• Linked Allocation
• Indexed Allocation
• Contiguous Allocation
Contiguous Allocation
In this technique,
• Every file users a contiguous address house on memory.
• Here, the OS assigns disk address is in linear order.
• In the contiguous allocation technique, external fragmentation is that the biggest issue.
Linked Allocation
In this method,
- Every file includes a list of links.
- The directory contains a link or pointer in the first block of a file.
- With this method, there is no external fragmentation
- This File allocation method is used for sequential access files.
- This method is not ideal for a direct access file.
Indexed Allocation
In this method,
- Directory comprises the addresses of index blocks of the specific files.
- An index block is created, having all the pointers for specific files.
- All files should have individual index blocks to store the addresses for disk space.
File Directories
A single directory may or may not contain multiple files. It can also have sub-directories inside the main directory. Information about files is maintained by Directories. In Windows OS, it is called folders.
Following is the information which is maintained in a directory:
- Name The name which is displayed to the user.
- Type: Type of the directory.
- Position: Current next-read/write pointers.
- Location: Location on the device where the file header is stored.
- Size : Number of bytes, block, and words in the file.
- Protection: Access control on read/write/execute/delete.
- Usage: Time of creation, access, modification
File types- name, extension
File Type | Usual extension | Function |
Executable | Exe, com, bin or none | Ready-to-run machine- language program |
Object | Obj, o | Complied, machine language, not linked |
Source code | c. p, pas, 177, asm, a | Source code in various languages |
Batch | Bat, sh | Series of commands to be executed |
Text | Txt, doc | Textual data documents |
Word processor | Doc,docs, tex, rrf, etc. | Various word-processor formats |
Library | Lib, h | Libraries of routines |
Archive | Arc, zip, tar | Related files grouped into one file, sometimes compressed. |
Summary:
- A file is a collection of correlated information which is recorded on secondary or non-volatile storage like magnetic disks, optical disks, and tapes.
- It provides I/O support for a variety of storage device types.
- Files are stored on disk or other storage and do not disappear when a user logs off.
- A File Structure needs to be predefined format in such a way that an operating system understands it.
- File type refers to the ability of the operating system to differentiate different types of files like text files, binary, and source files.
- Create find space on disk and make an entry in the directory.
- Indexed Sequential Access method is based on simple sequential access
- In Sequential Access method records are accessed in a certain pre-defined sequence
- The random access method is also called direct random access
- Three types of space allocation methods are:
- Linked Allocation
- Indexed Allocation
- Contiguous Allocation
- Information about files is maintained by Directories
Reference Books:
1 Computers Today by Sanders.
2 Fundamentals of Computers TTTI Publication.
3 Learning Python by Mark Lutz, 5th edition
4 Python cookbook, by David Beazley , 3rd Edition
5 Python Essential Reference, by David Beazley , 4th edition
6 Python in a Nutshell, by Alex Mortelli, 2nd Edition.
7 Python programming: An Introduction to computer science, by John Zelle, 2nd Edition.