Software P1
Software P1
• manages scheduling of process • divides storage space into le allocation unit (smallest
7) Interrupt Handling
• identi es priorities to the interrupt
• saves data on power outage
• loads appropriate ISR (interrupt service
routine) if the priority is high enough)
Utility Softwares : Analyse and maintain a computer system and make it functional
Program Libraries
Bene ts Drawbacks
• code doesn’t have to be written again & again • compatibility issues — may not work with other codes
so saves time • Not guaranteed to be bug free after testing — may
• pretested so reduces testing time contain unknown unexpected bugs
• can be written in di erent programming • The code may not meet exact needs — may give
languages that enables you to use special unexpected results
features
• complex algorithms used directly
• simpli es the program
Dynamic Link Libraries
Bene ts Drawbacks
• makes the executable le smaller / (exe) • Program (executable le) is dependent on DLL to
• DLL les on loaded into temp memory when perform a speci c function hence — unexpected
required — saving space in the memory as well changes or bugs to DLL le could mean the program
• You can modify DLL les independently can stop working as expected
without needing to recompile the main • Malicious changes to the DLL le, could install a virus
program. on the user’s computer and corrupt les
• A single DLL le can be used by several • Appropriate linking software must be available to
applications saving space in memory import the DLL requested by the main software
Language Translators
1) Assembler
2) Compiler
3) Interpreter
Assembler
• Programs written in assembly code has to be translated in machine code in order for computer to understand it
• Each instruction in the source code consists of an opcode & operand.
• Assemble translates low level language (assembly code) into machine code for processor to execute
• Source code uses identi es instructions from processor’s instruction set
Compiler
• Compiler high level language into machine code for processor to execute
• Compiler creates a executable le (exe)
• No need to give access to source code — di cult for user to modify the code
Bene ts Drawbacks
• produces an executable le (exe) • the source code must be re compiled every time
• user doesn’t have to store source code programmer makes changes to the program
• code doesn’t have to be compiled each time it • nding error is di cult — error message is given at the
is used end
• doesn’t need compiler to be present during run • the code must be 100% correct for the executable le
time to be produced
Interpreter
• the inverter translates high level language into machine code for the processor to execute it line by line
• the interpret reads each statement and checks it before running it
• the interpreter halts when it encounters an error
• the interpreter analyses and checks each line before executing it
Bene ts Drawbacks
• errors can be corrected as they occur • no exceutbale le is produced — source has to be
• can run a partially complete program when provided to the user
developing • need to to translate source code again & again
• the e ect of any change made to the code can • interpreter should be present at the time of execution
be seen immediately
Compiler Interpreters
• creates an executable le • does not create a executable le
• can be used without source code • source code has to be provided
• decodes whole program rst then executes it • executes each statement immediately after decoding
• compiled program does not require compiler • interpreter needs to be present in the memory during
program execution
Q) Describe how a java source code program is translated
• java uses a two step translation process (half compiling & half interpreting)
• java code is partially compiled and partially interpreted
• code is translated rst into byte-code using the java compiler (partially compiled)
• the byte-code is nally interpreted by the java virtual machine
Q) Explain why high level program might be partially compiled & partially interpreted
• a software application that combines all the features and tool needed by a software developer