1 / 21

Software

Software. Apps, code, runtime, compiled, compilers, interpreters…. Main points. Software must run as machine code (0’s and 1’s) It has to control every step of the CPU, including: what operation to do where in memory things must go how to get data in and out and stored

Télécharger la présentation

Software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Apps, code, runtime, compiled, compilers, interpreters…..

  2. Main points • Software must run as machine code (0’s and 1’s) • It has to control every step of the CPU, including: • what operation to do • where in memory things must go • how to get data in and out and stored • The aim is to make it easy for the user and let the computer do the work

  3. A great divide • Operating systems • Applications

  4. Operating systems (including BIOS) • A machine-code program that manages the computer so that it can run programs. • Examples: • Current: Windows, MacOS, IOS, Android • Past: MS-DOS, CP/M & MP/M, RSTS, VMS, GEM • A BIOS is a basic input/output system ROM that mostly manages the main circuit board. It includes a bootstrap program that loads a loader that loads the operating system, thus “pulling itself up by its own bootstraps.”

  5. What’s in it? • An OS must: • Start the system • Offer an interface between the user and the system, e.g. a GUI/WIMP or command line • Control access to primary storage • Control input/output devices & secondary storage • Provide services for programs/applications, like multi-tasking, virtual memory and security

  6. Applications / User programs • Can do anything the operating system allows • Must be in binary machine code (executable) • Must not interfere with each other’s memory or how they run

  7. Computer languages : High-level • Examples are BASIC, FORTRAN, Algol, Pascal • These use a few English words in precise ways, like For, If, Then, Begin, End • They need a compiler to turn them into machine code • Or an interpreter to read them and follow them at execution time, also known as a virtual machine or a run-time-system. Early BASICs did this and it made them slow.

  8. Computer languages – low-level • Low-level usually means machine code or assembler • Machine codes are available from the microprocessor manufacturer’s data books • You use a simple editor/debugger to put it in and run it • In some cases, you can use assembly language

  9. Intermediate Languages • These often link machine code modules, with little attempt at optimisation, but the way they link makes them fast anyway. • Forth is a good example. • Some microprocessors have been built that run intermediate languages as their machine code, though this makes a slower, much more complicated processor.

  10. Utilities • Media formatting • File manager (explorer) • Disk defragmenter • Antivirus/antimalware • Duplicate file detectors • Backups • Fault diagnosis • PnP (plug’n’playbuilt into some operating systems.)

  11. Two Origins… • Custom programs • Expensive • Need skilled employees to write them • Written to fit exactly what you want • Can get outdated easily (e.g. Y2K bugs) • Can be incompatible with other programs • Off-the-shelf • Cheap • May be adaptable by the user. • General-purpose • Are usually updated, but not always backwards-compatible • Are often mutually compatible (e.g. Microsoft Office)

  12. Two approaches… • Proprietary software • One manufacturer/manager/programming team • Consistency • Reliability/quality control • Evolution of product to maintain reputation • Open-source • Anyone can contribute • Can be developed more quickly • Changes can be inconsistent or unreliable • Contributors can be anywhere in the World

  13. Open/proprietary • Open – Linux • Open operating systems rely on all computers working the same. • Proprietary – Unix, Windows, MacOS • Open – Open Office • Proprietary – Microsoft Office

  14. Flowcharts Start • *Can be easy to follow • *Nearly all stages are obvious • *Can colour code • *Look pretty for presenting to customers • *Difficult to link neatly • *Little space for notes or explanations • You can spend lots of time adding and rotating graphics if you’re not careful. • Needs plenty of practice. Wet hair Work into a lather Rinse & repeat

  15. *Pseudo-code • *English-like statements • *Easy to write what the customer says he wants and translate from that • *Plenty of space to write and continue onto next page(s) or “call” another page, to write later • Can be easy to refine the design over and over • *Can be too wordy • *Can be too high-level to create the code.

  16. What does this pseudo code do? • Set pi to 3.14 • Ask user for radius • Print radius to power 2 times pi

  17. More pseudocode Loop for each item in the list - 1 loop for each item in the list -1 If next < current, then swap them Loop end Loop end

  18. More pseudocode Ask user for line length Repeat Ask user for number of sides Until number of sides >2 For I = 1 to number of sides Draw line of length line length Turn clockwise 360 divided by number of sides End for

  19. Now you write: • Pseudocode that asks for a price, calculates the VAT (20%), then prints out the VAT and the total • Pseudocode that asks for height & radius, then calculates the volume of a cylinder - r2h

  20. And this? Loop for I from 1 to n-1 Loop for J from 1 to n-1 If item(j) > item(J+1) Then swap them Else do nothing Loop end Loop end

More Related