Scheduling & Data Communication and Networking.: Platform Technologies
Scheduling & Data Communication and Networking.: Platform Technologies
Scheduling & Data Communication and Networking.: Platform Technologies
and NETWORKING.
Platform Technologies
1|Page
Who gets the CPU?
Process Behaviour
MULTIPROGRAMMING
• Overlapping I/O and CPU activities
To increase CPU utilization and job throughput
• Previously covered the mechanisms of
Context switching
Process queues and process states
• But…
• Which process (thread) to run, for how long, etc. – scheduling?
2|Page
SCHEDULING
Choosing which process to run next, when two or more of them are simultaneously in the ready state
• Deciding which process should occupy the resource (CPU, disk, etc.)
• Done by scheduler using the scheduling algorithm
• Many of the same issues that apply to process scheduling also apply to thread scheduling, although
some are different.
• Jobs - schedulable entities (processes, threads)
When to schedule?
Performance Criteria
• Throughput
• number of jobs completed in unit time
• Turnaround time (elapse time)
• Amount of time to execute a particular process from the time it entered
• Waiting time
• Amount of time process has been waiting in ready queue
• Meeting deadlines
• Avoid bad consequences
Scheduling Objectives
Fair
Everyone is happy
Priority
Some are more important
Efficiency
Make best use of equipment
3|Page
Support heavy load
Degrade gracefully
Adapt to different environment
Interactive, real-time, multi-media
1. BATCH
2. INTERACTIVE
3. REAL-TIME
NON-PREEMPTIVE SCHEDULING
The running process keeps the CPU until it voluntarily gives up the CPU
PREEMPTIVE SCHEDULING
The running process can be interrupted and must release the CPU
ALL SYSTEMS
o Fairness – giving each process a fair share of the CPU
o Policy enforcement – seeing that stated policy is carried out.
o Balance – keeping all parts of the system busy.
BATCH SYSTEMS
o Throughput – maximize jobs per hour
o Turnaround Time – Minimize time between submission and termination.
o CPU utilization – Keep the CPU busy all the time.
4|Page
INTERACTIVE SYSTEMS
o Response time – respond to request quickly.
o Proportionality – meets users’ expectation.
REAL – TIME SYSTEMS
o Meeting Deadlines – avoid losing data.
o Predictability – avoid quality degradation in multimedia systems.
SCHEDULING ALGORITHMS
BATCH SYSTEMS
• First-Come, First-Served (FCFS)
“Real-world” scheduling of people in lines (e.g., supermarket)
A single queue of ready jobs
Jobs are scheduled in order of arrival to ready queue
Typically non-pre-emptive (no context switching at market)
Jobs treated equally, no starvation.
When the running process blocks, the first process on the queue is
run next.
• When a blocked process becomes ready, like a newly arrived job, it is
put on the end of the queue, behind all waiting processes.
5|Page
• If small jobs wait behind long ones (high turnaround time)
• Non-preemptive
• You’re stuck behind someone with a cart, when you only have two items
• Solution?
• Express lane (10 items or less)
6|Page
Shortest Job First – Problems
• Starvation
a job is waiting forever
• All jobs must be available at start
Suited for batch systems
SCHEDULING ALGORITHMS
Interactive Systems
Round-Robin Scheduling
Priority Scheduling
Multi-Queue & Multi-Level Feedback
ROUND-ROBIN SCHEDULING
algorithm.
7|Page
ROUND – ROBIN SCHEDULING - EXAMPLE
PRIORITY SCHEDULING
8|Page
MULTIPLE-LEVEL FEEDBACK QUEUES (MLFQ)
REAL-TIME SYSTEMS
9|Page
deadline to run
THREAD SCHEDULING
THREAD SCHEDULING
Scheduling Summary
o Scheduler is the module that gets invoked when a context switch needs to happen
o Scheduling algorithm determines which process runs and where processes are placed on
queues
10 | P a g e
o Scheduling algorithms have many goals
Utilization, throughput, wait time, response time, etc.
o Various algorithms to meet these goals
FCFS/FIFO, SJF, RR, Priority
o Can combine algorithms
Multiple-level feedback queues
It is essential to understand some of the basic communication methods that can be used to
interconnect systems
Characteristics of communication methods:
• Data Flow - Simplex, Duplex & Semi Duplex
• Data Transfer - Serial vs. Parallel
• Synchronous vs. Asynchronous
• Data Throughput
Data Flow
11 | P a g e
TYPES OF DATA TRANSFER
PARALLEL COMMUNICATION
12 | P a g e
PARALLEL COMMUNICATION
SERIAL COMMUNICATION
SERIAL COMMUNICATION
13 | P a g e
Words transmitted one bit at a time
Single data wire, possibly also control and power wires
Higher data throughput with long distances
o Less average capacitance, so more bits per unit of time
Cheaper, less bulky
More complex interfacing logic and communication protocol
o Sender needs to decompose word into bits
o Receiver needs to recompose bits into word
o Control signals often sent on same wire as data increasing protocol complexity
A serial connection requires fewer interconnecting cables and hence occupies less space.
The extra space allows for better isolation of the channel from its surroundings.
Crosstalk is not a much significant issue, because there are fewer conductors in proximity
Many devices and sensors relevant to control systems have serial interfaces, as opposed to
parallel ones, so that they have fewer pins and are therefore less expensive.
There are various protocols that can be used with digital control systems for serial communication.
14 | P a g e
o SPI (Serial Peripheral Interface)
o I2C (Inter-Integrated Circuits)
o CAN (Controller Area Network)
o 1-wire
Wireless communication
No physical connection needed for transport at physical layer
NETWORKING
CONNECT TO A NETWORK
Home office devices might connect as follows:
15 | P a g e
CONNECT TO A NETWORK
Desktop PCs, VoIP phones, and corporate resources such as file servers and printers connect to
Layer 2 switches using Ethernet cables.
Laptops and smartphones connect wirelessly to wireless access points (WAPs).
The WAPs connect to switches using Ethernet cables.
Layer 2 switches connect to an Ethernet interface on the edge router using Ethernet cables.
The edge router connects to a WAN service provider.
CONNECT TO A NETWORK
16 | P a g e
Layer 3 multilayer switches connect to an Ethernet interface on the edge router using Ethernet
cables.
The corporate website server connects to the edge router interface.
The edge router connects to a WAN SP and also to an ISP for backup purposes.
CHARACTERISTICS OF A NETWORK
Security
indicates how protected the network is, including the
information that is transmitted over the network
Availability
refers to the likelihood that the network is available
for use when it is required
Scalability
17 | P a g e
indicates how easily the network can accommodate
more users and data transmission requirements as
they increase
Reliability
indicates the dependability of the components that
make up the network including the routers, switches,
PCs, and servers; often measured as MTBF (mean
time between failures)
Type of Connection
Physical Topology
Connection of devices
Type of transmission - unicast, multicast, broadcast
TYPE OF CONNECTION
Point-to-point networks
Each node connected to every node
Simple and reliable
Costly due to many wires required
Multipoint networks
Nodes are connected via bus or other topologies
Less wiring and hence cheaper
Easily extendable by adding new nodes to network
Complex network protocol
NETWORK TOPOLOGY is the description of the arrangement of nodes (e.g. networking switches
and routers) and connections in a network, often represented as a graph.
18 | P a g e
No matter how identical two organizations are, no two networks are exactly alike. However, many
organizations are relying on well-established network topology models. Network topologies outline
how devices are connected together and how data is transmitted from one node to another.
A network topology map is a map that allows an administrator to see the physical network layout of
connected devices. Having the map of a network’s topology on hand is very useful for
understanding how devices connect to each other and the best techniques for troubleshooting.
There are many different types of topologies that enterprise networks have built on today and in the
past. Some of the network topologies we’re going to look at include bus topology, ring topology,
star topology, mesh topology, and hybrid topology.
Physical Topology
Physical Topology
A Star Topology is a topology where every node in the network is connected to one central switch. Every
device in the network is directly connected to the switch and indirectly connected to every other node. The
relationship between these elements is that the central network hub is a server and other devices are
treated as clients. The central node has the responsibility of managing data transmissions across the whole
network and acts as a repeater. With star topologies, computers are connected with a coaxial cable, twisted
pair, or optical fiber cable.
Advantages
19 | P a g e
Star topologies are most commonly-used because you can manage the entire network from one
location: the central switch. As a consequence, if a node that isn’t the central node goes down then
the network will remain up. This gives star topologies a layer of protection against failures that
aren’t always present with other topology setups. Likewise, you can add new computers without
having to take the network offline like you would have to do with a ring topology.
In terms of physical network structure, star topologies require fewer cables than other topology
types. This makes them simple to set up and manage over the long-term. The simplicity of the
overall network design makes it much easier for administrators to run troubleshooting when dealing
with network performance faults.
Disadvantages
Though star topologies may be relatively safe from failure, if the central switch goes down then the
entire network will go down. As such, the administrator needs to manage the health of the central
node closely to make sure that it doesn’t go down. The performance of the network is also tied to
the central node’s configurations and performance. Star topologies are easy to manage in most
ways but they are far from cheap to set up and use.
MESH TOPOLOGY
A mesh topology is a point-to-point connection where nodes are interconnected. In this form of topology,
data is transmitted via two methods: routing and flooding. Routing is where nodes use routing logic to work
out the shortest distance to the packet’s destination. In contrast, flooding is where data is sent to all nodes
within the network. Flooding doesn’t require any form of routing logic to work.
20 | P a g e
There are two forms of mesh topology: partial mesh topology and full mesh topology. With partial mesh
topology, most nodes are interconnected but there are a few which are only connected to two or three other
nodes. A full mesh topology is where every node is interconnected.
Advantages
Mesh topologies are used first and foremost because they are reliable. The interconnectivity of nodes
makes them extremely resistant to failures. There is no single machine failure that could bring down the
entire network. The absence of a single point of failure is one of the reasons why this is a popular topology
choice. This setup is also secure from being compromised.
Disadvantages
However, mesh topologies are far from perfect. They require an immense amount of configuration once they
are deployed. The topological layout is more complex than many other topologies and this is reflected by
how long it takes to set up. You’ll need to accommodate a whole host of new wiring which can add up to be
quite expensive.
BUS TOPOLOGY
Bus topology is a network type where every device is connected to a single cable that runs from one end of
the network to the other. This type of network topology is often referred to as line topology. In a bus
topology, data is transmitted in one direction only. If the bus topology has two endpoints then it is referred to
as a linear bus topology.
Smaller networks with this type of topology use a coaxial or RJ45 cable to link devices together. However,
the bus topology layout is outdated and you’re unlikely to encounter a company using a bus topology today.
Advantages
Bus topologies were often used in smaller networks. One of the main reasons is that they keep the layout
simple. All devices are connected to a single cable so you don’t need to manage a complex topological
setup.
The layout also helped make bus topologies cost-effective because they can be run with a single cable. In
the event that more devices need to be added then you could simply join your cable to another cable.
Disadvantages
However, relying on one cable does mean that bus topologies have a single point of failure. If the cable fails
then the entire network will go down. A cable failure would cost organizations a lot of time while they attempt
to resume service. Further to this, high network traffic would decrease network performance because all the
data travels through one cable.
This limitation makes bus topologies suitable only for smaller networks. The primary reason is that the more network
nodes you have, the slower your transmission speeds are going to be. It is also worth noting that bus topologies are
limited in the sense that they are half-duplex, which means that data can’t be transmitted in two opposite directions
simultaneously.
21 | P a g e
RING TOPOLOGY
In networks with ring topology, computers are connected to each other in a circular format. Every
device in the network will have two neighbors and no more or no less. Ring topologies were
commonly used in the past but you would be hard-pressed to find an enterprise still using them
today.
The first node is connected to the last node to link the loop together. As a consequence of being
laid out in this format packets need to travel through all network nodes on the way to their
destination.
Within this topology, one node is chosen to configure the network and monitor other devices. Ring
topologies are half-duplex but can also be made full-duplex. To make ring topologies full-duplex
you would need to have two connections between network nodes to form a Dual Ring Topology.
22 | P a g e
DUAL RING TOPOLOGY
As mentioned above, if ring topologies are configured to be bidirectional then they are referred to
as dual ring topologies. Dual ring topologies provide each node with two connections, one in each
direction. Thus, data can flow in a clockwise or counterclockwise direction.
Advantages
o With ring topologies, the risk of packet collisions is very low due to the use of token-based
protocols, which only allow one station to transmit data at a given time. This is
compounded by the fact that data can move through network nodes at high speeds which
can be expanded on when more nodes are added.
o Dual ring topologies provided an extra layer of protection because they were more
resistant to failures. For instance, if a ring goes down within a node then the other ring can
step up and back it up. Ring topologies were also low cost to install.
Disadvantages
o One of the reasons why ring topologies were replaced is because they are very vulnerable
to failure. The failure of one node can take the entire network out of operation. This means
that ring topology networks need to be constantly managed to ensure that all network
nodes are in good health. However, even if the nodes were in good health your network
could still be knocked offline by a transmission line failure!
o Ring topologies also raised scalability concerns. For instance, bandwidth is shared by all
devices within the network. In addition, the more devices that are added to a network the
more communication delay the network experiences. This means that the number of
23 | P a g e
devices added to a network topology needed to be monitored carefully to make sure that
the network resources weren’t stretched beyond their limit.
Making changes to a ring topology was also complicated because you need to shut down the network to
make changes to existing nodes or add new nodes. This is far from ideal as you’ll need to factor in
downtime every time you want to make a change to the topological structure!
HYBRID TOPOLOGY
When a topology is composed of two or more different topologies it is referred to as a hybrid topology.
Hybrid topologies are most-commonly encountered in larger enterprises where individual departments have
network topologies that different from another topology in the organization. Connecting these topologies
together will result in a hybrid topology. As a consequence, the capabilities and vulnerabilities depend on
the types of topology that are tied together.
Advantages
There are many reasons why hybrid topologies are used but they all have one thing in common: flexibility.
There are few constraints on the network structure that a hybrid topology cannot accommodate, and you
can incorporate multiple topologies into one hybrid setup. As a consequence, hybrid topologies are very
scalable. The scalability of hybrid setups makes them well-suited to larger networks.
Disadvantages
Unfortunately, hybrid topologies can be quite complex, depending on the topologies that you decide to use.
Each topology that is part of your hybrid topology will have to be managed according to its unique network
requirements. This makes administrators’ jobs more difficult because they are going to have to attempt to
manage multiple topologies rather than a single one. In addition, setting up a hybrid topology can end up
being quite costly.
24 | P a g e
Categories of Networks
• Local Area Network (LAN)
Short distances
Designed to provide local interconnectivity
• Wide Area Network (WAN)
Long distances
Provide connectivity over large areas
• Personal Area Network (PAN)
Network organized around an individual person within a single building
• Metropolitan Area Network (MAN)
Provide connectivity over areas such as a city, a campus
25 | P a g e
Wide Area Network (WAN)
26 | P a g e
The Internet
There is a range of factors that you need to take into account when choosing which topology to use. Before
choosing a topology, you’ll want to closely consider the following:
Length of cable needed
Cable type
Cost
Scalability
First, you need to take into account the length of the cable you need to provide service to all your network
devices. A bus topology is the most lightweight in terms of cable needs. In this sense, this would be the
simplest topology to install and buy cables for. This ties into the second factor, you need to consider the
type of cable you’re going to use. Cable types range from twister pairs to coaxial cables and optical fiber
cables.
The cost of installing the topology is also very important. The more complex the topology you choose is, the
more you’ll need to pay in terms of resources and time to create that setup.
The final factor you’ll want to take into account is scalability. If you’re planning to upscale your network
infrastructure in the future you want to make sure that you use a network that is easy to add devices to. A
27 | P a g e
star topology network is ideal for this because you can add network nodes with minimal disruption. This
isn’t as simple within a ring network because you will incur downtime if you add any nodes.
28 | P a g e