INTRODUCTION TOCOMPUTER SYSTEM
CSC 2313
LECTURE 2B
Department of Maths and Computer-
Science
Faculty of Natural and Applied Science
BY
UMAR DANJUMA MAIWADA
PROGRAM EXECUTION
 Executing a program involves the creation of a process
by the operating system.
 The kernel creates a process by assigning memory and
other resources, establishing a priority for the process
(in multi-tasking systems), loading program code into
memory, and executing the program.
 The program then interacts with the user and/or other
devices and performs its intended function.
2
INTERRUPTS
 An interrupt is the mechanism by which
notification of an external event that occurs
is communicated to the operating system.
3
FUNCTIONS OF INTERRUPT
 An interruption of the normal sequence of execution
 Improves processing efficiency
 Allows the processor to execute other instructions
while an I/O operation is in progress
 A suspension of a process caused by an event
external to that process and performed in such a
way that the process can be resumed
4
CLASSES OF INTERRUPTS
 Program interrupt: Generated by some condition that
occurs as a result of an instruction execution, such as
arithmetic overflow, division by zero, attempt to
execute an illegal machine instruction, and reference
outside a user's allowed memory space.
 Timer interrupts: Generated by a timer within the
processor. This allows the operating system to perform
certain functions on a regular basis.
 I/O interrupts: Generated by an I/O controller, to
assign normal completion of an operation or to signal a
variety of error conditions.
 Hardware failure interrupts: Generated by a failure,
such as power failure or memory parity error.
5
TRAP
 A Trap is the notification of an internal event that
occurs while a program is executing, therefore it is
synchronous with the current activity of the
processor.
6
INTERRUPT VS. TRAP
 An interrupt is a CPU event that is triggered by some external
device. A trap is a CPU event that is triggered by a
program. Traps are sometimes called software
interrupts. They can be deliberately triggered by a special
instruction, or they may be triggered by an illegal instruction or
an attempt to access a restricted resource.
 The operating system gets the control of the CPU when
either an external event (an interrupt) or an internal event (a
trap or exception) occurs.
7
INSTRUCTION SETS
Instruction set architecture is the
structure of a computer that a machine
language programmer (or a compiler)
must understand to write a correct
(timing independent) program for that
machine
8
COMPUTER-SYSTEM OPERATION
 Instruction Execution
A program to be executed by a processor consists of
a set of instructions stored in memory. In its simplest
form, instruction processing consists of two steps:
The processor fetches the instruction from
memory
 Program counter (PC) holds the address of the
instruction to be fetched next
 Program counter is incremented after each fetch
Instruction Register: Fetched instruction is placed in the
instruction register 9
10
TYPES OF INSTRUCTIONS
 Processor-memory: transfers data between
processor and memory
 Processor-I/O: data transferred to or from a
peripheral device
 Data processing: arithmetic or logic operation on
data
 Control: alter sequence of execution
11
I/O FUNCTIONS
 An I/O module transfers data from external devices
to processor and memory, and vice versa. It
contains internal buffers for temporarily holding
data until they can be sent on.
12
LANGUAGE COMPILERS AND
INTERPRETERS
 Compiler
 A compiler is a program that translates source code or
language e.g. C, COBOL, FORTRAN, C# into target
language (machine, assembly) which will be executed
directly on the machine.
13
14
PUNCTUATION, CONSTANT ETC).
SYNTAX ANALYSIS: CHANGES THE LEXICAL UNIT INTO
HIERARCHICAL TREE LIKE STRUCTURE KNOWN AS
PARSE TREE IN WHICH EACH CHILD NODE
REPRESENTS THE ARGUMENT OF THE OPERATION
AND THE NODE REPRESENT THE OPERATION.
SEMANTIC ANALYSIS: THE SEMANTIC CHECKS
PROGRAMS GENERATED DURING THE SYNTAX PHASE
FOR ERRORS. AN IMPORTANT COMPONENT HERE IS
THE ERROR OF TYPE. FOR EXAMPLE, THE ABOVE
SHOWS HOW CONVERSION IS DONE FROM INTEGER
TO REAL TO AVOID TYPE ERROR.
SYMBOLIC TABLE: A DATA STRUCTURE WHICH
STORES INFORMATION ABOUT IDENTIFIERS AND
OTHER ATTRIBUTES. IT SPEEDS UP INFORMATION
RETRIEVAL ON AN IDENTIFIER.
INTERPRETER
 This is a simulated virtual machine which interprets
a program without necessarily interpreting it. It
allows easy implementation of source code. For
example, if an index of array is wrong, it can easily
show the line and index of error.
 An interpreter is slow because of complexity in
decoding from high level language instead of
machine language.
16
LINKERS
 Is a computing program that takes one or more
objects generated by a compiler and combines
them into a single executable program.
DATA AND INFORMATION
REPRESENTATIONS
 What is data?
 Data can be defined as a representation of facts,
concepts or instructions in a formalized manner which
should be suitable for communication, interpretation, or
processing by human or electronic machine.
 Data is represented with the help of characters like
alphabets (A-Z,a-z), digits (0-9) or special characters(+,-
,/,*,<,>,= etc.).
 What is Information?
Information is organized or classified data
which has some meaningful values for the
receiver.
Information is the processed data on which
decisions and actions are based.
18
BITS AND BYTES
19
 The fundamental building block of computer storage is
the BIT. A bit may be OFF, so that its value is 0, or it
may be ON, so that its value is 1. A single bit does not
provide much information but it’s surprising what a
bunch of them could do.
 BYTES
 A group of nine related bits is called a byte, which represent
storage location both internally in memory and externally on
disk. Each byte consists of EIGHT BITS for data and ONE
bit for parity.
REFERENCES
1. Operating system by william stallings
2. OPERATING SYSTEM CONCEPTS by ABRAHAM
SILBERSCHATZ, Yale University, PETER BAER
GALVIN, Corporate Technologies, GREG GAGNE,
Westminster College
3. Operating system concepts by Silberschatz Galvin
Gagne.
4. Wikipedia.com
20
QUESTIONS???
THANK YOU FOR YOUR ATTENTION
21

introduction to computer system

  • 1.
    INTRODUCTION TOCOMPUTER SYSTEM CSC2313 LECTURE 2B Department of Maths and Computer- Science Faculty of Natural and Applied Science BY UMAR DANJUMA MAIWADA
  • 2.
    PROGRAM EXECUTION  Executinga program involves the creation of a process by the operating system.  The kernel creates a process by assigning memory and other resources, establishing a priority for the process (in multi-tasking systems), loading program code into memory, and executing the program.  The program then interacts with the user and/or other devices and performs its intended function. 2
  • 3.
    INTERRUPTS  An interruptis the mechanism by which notification of an external event that occurs is communicated to the operating system. 3
  • 4.
    FUNCTIONS OF INTERRUPT An interruption of the normal sequence of execution  Improves processing efficiency  Allows the processor to execute other instructions while an I/O operation is in progress  A suspension of a process caused by an event external to that process and performed in such a way that the process can be resumed 4
  • 5.
    CLASSES OF INTERRUPTS Program interrupt: Generated by some condition that occurs as a result of an instruction execution, such as arithmetic overflow, division by zero, attempt to execute an illegal machine instruction, and reference outside a user's allowed memory space.  Timer interrupts: Generated by a timer within the processor. This allows the operating system to perform certain functions on a regular basis.  I/O interrupts: Generated by an I/O controller, to assign normal completion of an operation or to signal a variety of error conditions.  Hardware failure interrupts: Generated by a failure, such as power failure or memory parity error. 5
  • 6.
    TRAP  A Trapis the notification of an internal event that occurs while a program is executing, therefore it is synchronous with the current activity of the processor. 6
  • 7.
    INTERRUPT VS. TRAP An interrupt is a CPU event that is triggered by some external device. A trap is a CPU event that is triggered by a program. Traps are sometimes called software interrupts. They can be deliberately triggered by a special instruction, or they may be triggered by an illegal instruction or an attempt to access a restricted resource.  The operating system gets the control of the CPU when either an external event (an interrupt) or an internal event (a trap or exception) occurs. 7
  • 8.
    INSTRUCTION SETS Instruction setarchitecture is the structure of a computer that a machine language programmer (or a compiler) must understand to write a correct (timing independent) program for that machine 8
  • 9.
    COMPUTER-SYSTEM OPERATION  InstructionExecution A program to be executed by a processor consists of a set of instructions stored in memory. In its simplest form, instruction processing consists of two steps: The processor fetches the instruction from memory  Program counter (PC) holds the address of the instruction to be fetched next  Program counter is incremented after each fetch Instruction Register: Fetched instruction is placed in the instruction register 9
  • 10.
  • 11.
    TYPES OF INSTRUCTIONS Processor-memory: transfers data between processor and memory  Processor-I/O: data transferred to or from a peripheral device  Data processing: arithmetic or logic operation on data  Control: alter sequence of execution 11
  • 12.
    I/O FUNCTIONS  AnI/O module transfers data from external devices to processor and memory, and vice versa. It contains internal buffers for temporarily holding data until they can be sent on. 12
  • 13.
    LANGUAGE COMPILERS AND INTERPRETERS Compiler  A compiler is a program that translates source code or language e.g. C, COBOL, FORTRAN, C# into target language (machine, assembly) which will be executed directly on the machine. 13
  • 14.
  • 15.
    PUNCTUATION, CONSTANT ETC). SYNTAXANALYSIS: CHANGES THE LEXICAL UNIT INTO HIERARCHICAL TREE LIKE STRUCTURE KNOWN AS PARSE TREE IN WHICH EACH CHILD NODE REPRESENTS THE ARGUMENT OF THE OPERATION AND THE NODE REPRESENT THE OPERATION. SEMANTIC ANALYSIS: THE SEMANTIC CHECKS PROGRAMS GENERATED DURING THE SYNTAX PHASE FOR ERRORS. AN IMPORTANT COMPONENT HERE IS THE ERROR OF TYPE. FOR EXAMPLE, THE ABOVE SHOWS HOW CONVERSION IS DONE FROM INTEGER TO REAL TO AVOID TYPE ERROR. SYMBOLIC TABLE: A DATA STRUCTURE WHICH STORES INFORMATION ABOUT IDENTIFIERS AND OTHER ATTRIBUTES. IT SPEEDS UP INFORMATION RETRIEVAL ON AN IDENTIFIER.
  • 16.
    INTERPRETER  This isa simulated virtual machine which interprets a program without necessarily interpreting it. It allows easy implementation of source code. For example, if an index of array is wrong, it can easily show the line and index of error.  An interpreter is slow because of complexity in decoding from high level language instead of machine language. 16
  • 17.
    LINKERS  Is acomputing program that takes one or more objects generated by a compiler and combines them into a single executable program.
  • 18.
    DATA AND INFORMATION REPRESENTATIONS What is data?  Data can be defined as a representation of facts, concepts or instructions in a formalized manner which should be suitable for communication, interpretation, or processing by human or electronic machine.  Data is represented with the help of characters like alphabets (A-Z,a-z), digits (0-9) or special characters(+,- ,/,*,<,>,= etc.).  What is Information? Information is organized or classified data which has some meaningful values for the receiver. Information is the processed data on which decisions and actions are based. 18
  • 19.
    BITS AND BYTES 19 The fundamental building block of computer storage is the BIT. A bit may be OFF, so that its value is 0, or it may be ON, so that its value is 1. A single bit does not provide much information but it’s surprising what a bunch of them could do.  BYTES  A group of nine related bits is called a byte, which represent storage location both internally in memory and externally on disk. Each byte consists of EIGHT BITS for data and ONE bit for parity.
  • 20.
    REFERENCES 1. Operating systemby william stallings 2. OPERATING SYSTEM CONCEPTS by ABRAHAM SILBERSCHATZ, Yale University, PETER BAER GALVIN, Corporate Technologies, GREG GAGNE, Westminster College 3. Operating system concepts by Silberschatz Galvin Gagne. 4. Wikipedia.com 20
  • 21.
    QUESTIONS??? THANK YOU FORYOUR ATTENTION 21

Editor's Notes

  • #8 Scalability of handover framework to handle increased handovers without compromising latency performance Flexibility to support various 4G deployments
  • #19 Mobility framework designed to cover: all possible deployment scenarios enable and optimize handover between IEEE 802.16m Bss handover from an IEEE 802.16e BS to an IEEE 802.16m BS (note: under a legacy ASN network) intra-BS zone switch between LZone and Mzone