What is the Internet and Resource Management? Flashcards
(30 cards)
Internet fundamentals
Hosts:
* Billions of connected hosts, a.k.a., “end-systems”
* Each runs one or more distributed (networked) applications
Communication links:
* Fibre, copper, radio, satellite
* Key characteristics of transmission rate and delay: cf. bandwidth,
latency
Packet switches:
* Used to forward packets (chunks of data) arriving on an incoming
link to an outgoing link
* Routers and link-layer switches
Internet infrastructure
Internet: “network of networks”
Interconnected ISPs(and other
neworks)
Protocols control sending, receiving of
messages, e.g., HTTP (Web),
streaming video, Skype, TCP, IP, WiFi,
4/5G, Ethernet
Internet standards
Deliver standardised protocols that
the world can use
IETF: Internet Engineering Task Force
RFC: “Request for
comments”documents
Billions of Connected Computing Devices
Hosts = End Systems
These are devices like phones, laptops, tablets, servers, etc.
They run network applications (e.g., web browsing, email, video calls).
Hosts are located at the Internet’s “edge” (not inside the core of the network).
Networks
A network is a collection of devices, routers, and communication links.
These elements are connected together to allow data to flow between hosts.
Each network is usually managed by an organization (like a company, university, or ISP).
Packet Switches
Forward packets (chunks of data) through the network
Examples:
Routers
Switches
Communication links:
Fibre, copper, radio, satellite
Key characteristics of transmission rate: cf. bandwidth
Internet fundamentals
The Internet is the infrastructure that supports distributed applications like:
Web, VoIP, email, games, e-commerce, social networks, etc.
Distributed applications are:
Programs running on multiple hosts
They need to communicate by sending data to each other over the Internet.
What is a Protocol?
A protocol is a set of rules that define:
The format of messages
The order in which messages are sent and received
What actions to take when:
A message is sent
A message is received
A message is not received
all communication activity in Internet
governed by protocols
What is OS?
OS is the main software that controls the hardware resources and serves as an interface between
hardware and user applications
Main Jobs:
-Controls Processes
- Allocates Memory
-File System management
- I/O management
Kernel: The core component of the OS
Operating System Structures
Has two main types:
Monolithic Kernel OS (lhs)
* set of OS services accessible via
software interrupt mechanism called
system calls
- Tightly coupled/faster/all communicate with each other less secure due to if one breaking everything can break
Microkernel OS (rhs)
* push various OS services into server
processes
* access servers via some interprocess
communication (IPC) scheme.
* increased modularity (decreased
performance?)
Contention for Computing Resources
Process Abstraction:
* The OS abstracts running programs as processes.
Resource Contention:
* Multiple processes compete for CPU time, memory, and I/O
Kernal view of process
- Kernal keeps a data structure for each process
- Process Control Block (PCB)
- Called proc in Unix, task_struct in Linux
- Tracks state of the process
- Running, ready (runnable), waiting, etc.
- Includes information necessary to run
- Registers, virtual memory mappings, etc.
- Open files (including memory mapped files)
Process states
Process can be in one of several states:
* new & terminated at beginning & end of life
* running – currently executing (or will execute on
kernel return)
* ready – can run, but kernel has chosen different
process to run
* waiting – needs async event (e.g., disk operation)
to proceed
Which process should kernel run?
* if 0 runnable, run idle loop (or halt CPU), if 1
runnable, run it
* if >1 runnable, must make scheduling decision
Process Scheduling
Process scheduling is how the OS decides which process gets CPU time.
Types of Processes Scheduling (Preemptive):
Preemptive: The OS can interrupt a running process to switch to another (e.g., Round
Robin, Priority scheduling).
* System call, page fault, illegal instruction, etc.
* May put current process to sleep—e.g., read from disk (blocking I/O)
* May make other process runnable—e.g., fork()
- Periodic timer interrupt
* If running process used up quantum, schedule another
- Device interrupt
* Disk request completed, or packet arrived on network
* Previously waiting process becomes runnable
* Schedule if higher priority than current running proc.
Types of scheduling (non-preemptive)
- Non-preemptive: The running process is allowed to finish before switching (e.g., First
Come, First-Served).
Context switch
Changing running process
is called a context switch
- Multitasking in Operating Systems
-Types of Multitasking
The OS executes multiple tasks simultaneously, improving CPU efficiency and user experience. - Multitasking
Types of Multitasking:
* Preemptive Multitasking: OS allocates CPU time in time slices, interrupting tasks when needed (e.g.,
Windows, Linux).
* Cooperative Multitasking: Tasks voluntarily give up CPU time, allowing others to run (e.g., early Windows,
Mac OS)
pros and cons of Multitasking
Benefits:
* Efficient resource use and improved productivity.
* Better user experience with simultaneous task execution.
* Challenges:
* Context switching overhead and potential synchronization issues like deadlocks
Threads
Threads can help reduce context switching overhead in
multitasking
-A thread is a flow of execution within a process
-Threads share resources like memory
but execute independently
- Multi-threading is ability of a process
to spawn multiple threads of execution
that run concurrently.
Why Multi-threading?
* Allows one process to use
multiple CPUs or cores
* Allows program to overlap I/O and
computation
Kernel-level threads vs
User-level threads
Kernel-level threads:
* Each user-level thread is mapped to a
kernel-level thread
slower
higher overhead
* User-level Threads:
* Multiple user-level threads are
mapped to a single kernel thread.
faster
lower overhead
How does OS Relate to Networking?
Networking Protocols (like TCP/IP, UDP) are implemented in the OS kernel.
* The OS/kernel is responsible for managing networking resources.
* Just as processes contend for CPU and memory, devices and users contend for network
bandwidth/resources
OS uses multi-threading and non-blocking I/O to handle many network connections efficiently.
The OS provides tools like:
TCP/IP stack management (e.g., traffic shaping)
Threading models to efficiently handle network requests.
Bandwidth Contention in Networked Systems
Why Bandwidth Contention?
*When multiple processes,
devices, or users compete for limited network bandwidth.
Causes of Contention:
*High network traffic.
*Limited available bandwidth.
*Congested network paths
Packet Switching vs Circuit Switching
Packet Switching:
* Data is broken into packets and sent independently over the network.
* Example: Internet, TCP/IP protocol.
* Pros: Efficient bandwidth use, better for bursty traffic.
* Cons: Variable latency, possible packet loss.
Circuit Switching:
* A dedicated path is established between two nodes for the entire duration
of the communication.
* Example: Traditional telephone networks.
* Pros: Guaranteed bandwidth, low latency.
* Cons: Inefficient use of resources during idle periods