Hardware and software - 100 - 107 Flashcards
meaning of hardware
any physical parts of a computer
what is software
programs that are run by the computer
examples of internal and external hardware
internal - Motherboards, hard drives, RAM
external - mouse, printers, webcam
what is system software
software that is used in the management of a computer system
what is application software
programs that allow a user to carry out a specific task, eg spreadsheet software or web browser, word processor
examples of operating systems
Windows,IOS, Linux
examples of utility programs
virus checkers, firewalls, device drivers
examples of translators
compilers
assemblers
interpreters
why might one application be recommended over another
- speed
- cost
- hardware
- memory requirements
- compatibility with device
- convenience
what are utility softwares
: (Software that) performs a non-core / specific
management function for a computer
- eg antivirus, programs that help detect and remove malicious programs
- disk defragmentation
- file managers
- firewalls
what is a translator
any program that converts source code into machine code
what are the different types of translators
- compilers
- interpreters
- assemblers
what do assemblers do
they convert low level assembly languages directly into machine code
what do compilers and interpreters do
they convert high level programming languages into object code (compilers) or machine code (interpreter)
- each line of code written by a programmer translates into many lines of binary code
difference between interpreters and compilers
- interpreters take one line of high language programming code and convert it directly into machine code and then run it
- compilers takes the entire program from start to finish and first converts it into object code, then distributes to anyone with a compatible system
- compiler produces object code, interpreter doesnt produce object code
- a compiler will not produce executable code if an error is encountered, interpreted code will run the program up to the first error
- you dont always need a compiler to execute a compiled program, when running interpreted code, the interpreter needs to be present
- once compiled, source code is no longer to run the program, an interpreter always needs source code at runtime
- compiled code can only be executed on a machine with the same processor type, interpreted code is more portable
advantages of interpreters
- useful when writing programs as there is no need for lengthy, time consuming recompilation every time an error is found
- makes it easier to partially test and debug programs
- a program run using an interpreter can execute on a computer with any type of processor
disadvantages of interpreter
-program may run slower because each statement has to be translated into machine code each time it is encountered
advantages of compilers
- compiled object code will run faster than interpreted code
- generated object code is kept on disk, it can be run when needed without needing to recompile it
- the object code can be distributed to others and will execute without the presence of the compiler
- object code is relatively secure, hard to read it and work out what the source code wouldve been
what are libraries
pre compiled, pre tested sets of code that can be run when needed, that developers can reuse to perform common tasks
uses of libraries
- data manipulation
- math functions
What is an operating system?
a program or set of programs that manages the operations of the computer for the user
purposes of operating systems
- to handle interrupts when an interrupt occurs
- to hide the complexities of the hardware from the user
- to allocate cores to processes
- to allocate RAM to processes
- to allocate I/O devices to processes
- to allocate space on a storage device to files
- installation of new software
- manage power consumption
Describe the chain from user to hardware
User, application, operating system, hardware
what are translators
- a term that refers to any software that takes code which has been written by a programmer then converts it into machine specific binary code
what do interpreters do
they take a line of source code, translate it then take it to the CPU to be wxecuted
what do compilers do
takes the entire source code, translates it completely, then by the end of the process, throws out the machine code
what is intermediate code
a generic “half way” standard language between high-level programming languages and machine code which can then be translated to computer specific machine code eg bytecode
what is the intermediate code used for
to run on a virtual machine
what does the virtual machine do
performs the job of taking generic intermediate code and translating it into specific machine code
benefits of byte code
- can send it and distribute it to whoever u like
- acts as a security layer between your computer and the program
- universally agreed standard code, can be read by everyone
- you can achieve platform independence, eg any computer that runs java programs has a JVM
what do windows JVM, Linux JVM etc do
- translates byte code into machine code
what is general purpose software
a type of application software that can be used for many different purposes
what are special purpose software
a type of application software that performs a specific task or set of tasks
why might a company buy a bespoke software
- will satisfy their particular requirements
- will be able to be installed immediately
- likely to be well documented, well tested and bug free
- better scalability
how does an operating system disguise from the user
via the application programming interface
API
what is virtual memory
when the RAM isn’t big enough, so a hard disk is used as an extension of memory
what is multitasking
the processor carrying out several tasks simultaneously
what is the scheduler
the operating system module responsible for making sure the processor time is used as efficiently as possible
objectives of the scheduler
- maximise throughout
- be fair to all users on a multi - user system
- provide acceptable response time to all users
- ensure hardware resources are kept as busy as possible
what is the operand
- the data to be operated on
- the address where the data is held
why is machine code considered low level
- because it is directly executed by the CPU and consists of binary instructions (1s and 0s) that the hardware understands
what is source code
the input to the translator
what is object code
the output code which is executable
what are compilers
a program that converts high level language such as c# into object code
object code for compilers can be….
saved and run whenever needed without the presence of the compiler
what is bytecode
the intermediate code compiled and executed by a virtual machine (VM)
when would it be appropriate to use a compiler
when a program is to be run regularly/frequently
- when the object code produced by the compiler is going to be sold to users outside the company that produced the software
What do virtual machines do
they execute bytecode by interpreting or compiling it into machine code, allowing programs to run on any platform with a VM, making it platform-independent.
disadvantages of compilers
if an error is found, the whole code needs to be recompiled
when would an interpreter be used
Interactive Coding: For quick testing and prototyping, like in Python, where code can be written and executed line by line in an interactive shell.
- in a student environment where students are learning code, as they can test parts of a program before coding it all