You are on page 1of 13

Introduction to Timing diagram, Machine cycle,

Execution of a command
What is a timing diagram?
Think of a timing diagram as an inverted sequence diagram. In a timing diagram, time passes on the
x-axis from left to right, with different components of the system that interact with each other on the
y-axis.

Timing diagrams show how long each step of a process takes. Use them to identify which steps of a
process require too much time and to find areas for improvement.

Timing diagram is used to show interactions when a primary purpose of the diagram is to reason about
time; it focuses on conditions changing within and among lifelines along a linear time axis.
Timing diagram
Timing diagram components
With timing diagrams, you can easily diagram a process and identify the major steps it takes to complete the
process. First, identify the major participants in the process. If you were to create a timing diagram for a
factory, you would identify departments such as design, sourcing, manufacturing, QA, shipping, etc.

Then, follow the process closely, charting the time each product spends with each department. The end
result should help factory administration to recognize which departments are understaffed, inefficient, or
overloaded.
Timing diagram
Benefits of Timing Diagram
1. It depicts the state of an object at a particular point in time.
2. It implements forward and reverses engineering.
3. It keeps an eye on every single change that happens within the system.

Drawbacks of Timing Diagram


1. It is hard to maintain .
2. It is hard to understand.
Timing diagram
Timing diagram example:Water cycle timing diagram example

This timing diagram example shows a simplified version of the water cycle.

Since the timing diagram focuses on how long each step takes, not on the system itself,
you could think of this as a diagram of the different phases that a water droplet cycles
through. If this were a manufacturing process, viewers could easily identify areas for
improvement.

Timing diagrams are powerful tools for making a system as efficient as possible.
Timing diagram

Ex.
Machine Cycle

A machine cycle consists of the steps that a computer’s


processor executes whenever it receives a machine
language instruction. It is the most basic CPU operation,
and modern CPUs are able to perform millions of machine
cycles per second. The cycle consists of three standard
steps: fetch, decode and execute. In some cases, store is
also incorporated into the cycle.
The steps of a machine cycle are:

1)Fetch – The control unit requests instructions from the main


memory that is stored at a memory’s location as indicated by the
program counter (also known as the instruction counter).

2)Decode – Received instructions are decoded in the instruction


register. This involves breaking the operand field into its
components based on the instruction’s operation code (opcode).
3)Execute – This involves the instructions opcode as it
specifies the CPU operation required. The program
counter indicates the instruction sequence for computer.
These instructions are arranged into the instructions
register and as each are executed, it increments the
program counter so that the next instruction is stored in
memory. Appropriate circuitry is then activated to
perform the requested task. As soon as instructions have
been executed, it restarts the machine cycle that begins
the fetch step.
Program execution and saving of data
Execution Of Command
1) Program execution commands call up external processes and
pass data to them.
2) All require an argument, which may need multiple components.
3) If the call is made from within another script, when the called
script finishes executing it returns control to the caller
4) Commands on each line are read, interpreted and executed as if they
would have come directly from the keyboard.
Command execution example
Command injection is a cyber attack that involves executing arbitrary
commands on a host operating system (OS). ... For example, a threat
actor can use insecure transmissions of user data, such as cookies and
forms, to inject a command into the system shell on a web server.
Command injection takes various forms, including direct execution
of shell commands, injecting malicious files into a server’s runtime
environment, and exploiting vulnerabilities in configuration files,
such as XML external entities (XXE).
Commands are executed in Linux

The shell checks through its library of shell built-in


commands. ... The shell searches through the directories
described in the PATH environment variable for a program
matching the command name given. If one is found, it is
executed with the options and arguments given in the
remaining words.
OS Command Injection
OS command injection (also known as shell injection) is a web security
vulnerability that allows an attacker to execute arbitrary operating system
(OS) commands on the server that is running an application, and typically
fully compromise the application and all its data.
In this section, we'll explain what OS command injection is, describe how
vulnerabilities can be detected and exploited, spell out some useful
commands and techniques for different operating systems, and
summarize how to prevent OS command injection.

You might also like