C++ Chap1 Quick Note
C++ Chap1 Quick Note
C++ Chap1 Quick Note
3
▪ require very powerful hardware and software because of
complexity involved in interpreting commands in human
language
4
▪ responsible for performing mathematical
calculations/operations & comparisons
6) Secondary Storage device
▪ A Programs/data used by other units are placed on
it
1.3 The evolution of Operating Systems
• single-user batch processing
✓ runs a single program/only one job at a time while
processing data in groups or batches
✓ It rarely utilizes the computer’s resources
• Multiprogramming
✓ many jobs or tasks from different programs or
applications could be made to share the resources of the
computer
✓ involving the “simultaneous” operation of many jobs on
the computer
✓ achieve better utilization
• timesharing operating systems:
✓ It is special case of multiprogramming
✓ users access the computers through terminals
✓ computer does not run the users job paralleling, but
shares the CPU’s time
6
Software engineering
Problem Solving
• algorithm:
✓ a solution to a problem
8
✓ describes the sequence of steps to be performed for the
problem to be solved
✓ finite set of well-defined instructions for accomplishing
some task which, given an initial state, will terminate in a
corresponding recognizable end-state
✓ algorithm should be:
o Precise and unambiguous
o Simple
o Correct
o Efficient
• flow chart:
➢ a graphical way of expressing the steps needed to solve
a problem
➢ a schematic (diagrammatic description) representation of
a process
➢ Basic flowcharting symbols are:
Terminal point
Input/output
Process
9
Decision
Flow line
Inter-page connector
On-page connector
10
Compilers and Interpreters
11
o changes or translates the whole source code into
executable machine code/object code
o E.g. C++, Pascal, FORTRAN, etc
➢ Interpreters
o translates a single high level statement and
executes it and then goes to the next high level
language line etc
o translate line by line
o E.g. QBASIC, Lisp etc
➢ Compile
▪ C++ compiler translates the program code
▪ C++ programs typically contain references to
functions and data defined else where, such as in
the standard libraries
▪ The outcome may be incomplete due to the
program referring to library routines which are not
defined as a part of the program
▪ The object code produced by the C++ compiler
typically contains “holes” due to these missing parts
➢ Linking
▪ A linker links the object code with the code for the
missing function to produce an executable image
(with no missing pieces)
▪ the linker completes the object code by linking it
with the object code of any library modules that the
program may have referred to
▪ The final result is an executable file
➢ Loading
▪ the loader takes the executable file from disk and
transfers it to memory
▪ Additional components from shared libraries that
support the program are also loaded
13
▪ Finally, the computer, under the control of its CPU,
executes the program
14