0% found this document useful (0 votes)
4 views

computer_systems_notes

The document covers fundamental concepts of computer systems, including bits, memory types (RAM and ROM), logical gates, and data representation. It explores programming languages, operating systems, and their architecture, detailing processes, memory management, and the boot process. Additionally, it addresses issues such as overflow and floating-point notation in data representation.

Uploaded by

ocelkapine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

computer_systems_notes

The document covers fundamental concepts of computer systems, including bits, memory types (RAM and ROM), logical gates, and data representation. It explores programming languages, operating systems, and their architecture, detailing processes, memory management, and the boot process. Additionally, it addresses issues such as overflow and floating-point notation in data representation.

Uploaded by

ocelkapine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Computer systems - notes :)

2024 m. rugsėjo 30 d., pirmadienis 10:25

Computer systems - notes puslapis 1


Bits and their storage
2024 m. rugsėjo 30 d., pirmadienis 13:01

Bits are the smallest data unit, basically, 0 and 1.


0 is false and 1 is true.
Boolean operations – operations that manipulate true and false.

Boolean expressions:

• AND – reflects true or false. P and Q – two different statements, both should be true.

• OR – true or false – one of statements is true.

• XOR – true is when one is true and other is false. Either P or Q but not both.

• NOT – opposite from other boolean expressions. True –-> false.


>

Memory types

Aspect RAM ROM


Definition Random Access Memory - memory in which individual cells can be easily Read Only Memory - non-volatile memory, data cannot be
accessed in any order. electronically modified.
Features Fast, temporary storage, used for active processes and data. Permanent storage, used for firmware and system software.
Volatility Volatile - data is lost when power is turned off. Non-volatile - data is retained even when power is turned off.
Data Data can be read and written. Data can only be read, not written.

Bits and their storage puslapis 2


Gates and flip flops :)
2024 m. rugsėjo 30 d., pirmadienis 13:13

Gate - a device that generates output of boolean operation


Purpose of Logical Gates:
1. Perform Basic Operations: Execute fundamental Boolean operations (AND, OR, NOT, XOR).
2. Build Digital Circuits: Serve as the building blocks for complex digital components.
3. Process Data: Manipulate binary data for arithmetic, comparisons, and decisions.
4. Control Signals: Manage data flow within systems.
5. Store Memory: Create memory cells for data storage.
6. Route Signals: Direct signals in multiplexers and demultiplexers.
7. Error Handling: Detect and correct errors in data.
8. Digital Communication: Encode and decode data for transmission.

Types of Gates:
AND Gate: Outputs true (1) only if both inputs are true.
OR Gate: Outputs true if at least one input is true.
NOT Gate: Outputs the opposite of the input (inverts the input).
XOR Gate: Outputs true if exactly one of the inputs is true.

Gates:
• Relays
• Gears
• Optic devices
Universal gates – NOR (NOT OR), NAND (NOT AND)
Flip flops
A flip-flop is a fundamental unit of computer memory.

Gates and flip flops puslapis 3


Hexadecimal notation
2024 m. rugsėjo 30 d., pirmadienis 13:47

Hexadecimal notation - uses a single symbol to represent a pattern of 4 bits.

Hexadecimal Notation puslapis 4


Main memory
2024 m. rugsėjo 30 d., pirmadienis 14:33
Initial State:
+-------+-------+
| Cell 5 | Cell 6 |
Cells - managable units of computer memory. +-------+-------+
| 8 | |
String of 8 bits - byte. +-------+-------+

Memory is arranged in a row. Case 1:


+-------+-------+
Left end <- high order end // low order end -> right end | Cell 5 | Cell 6 |
+-------+-------+
| 8 | 5 |
+-------+-------+

Case 2:
+-------+-------+
| Cell 5 | Cell 6 |
Each cell has its address. But data can be accessed in any order. +-------+-------+
| 8 | 8 |
+-------+-------+

Computer main memory:


• RAM - random access memory:
○ Advantages: faster response time, greater miniaturization
○ Disadvantages: require additional circuitry
• DRAM - dynamic memory
○ Created using RAM technologies

How many bits would be in the memory of a computer with 4KB


memory? 4*1024*8 = 32768 bits

Main memory puslapis 5


Representing information as bit patterns
2024 m. rugsėjo 30 d., pirmadienis 15:06

Representing text

American National Standards Institute - ANSI - adopted ASCII.

ASCII uses bit patterns of 7 to represent the upper and lowercase letters of the English alphabet, punctuation
symbols, the digits 0 through 9, and certain control information such as line feeds, carriage returns,
and tabs.

ASCII size - > 8 BIT PER SYMBOL

ISO
Created number extensions for ASCII.

Issues:
• Symbols are not enough to represent Asian, Eastern European Languages.
• Initial document was in only one standard.
Solution:
• Unicode
○ Uses a unique pattern of up to 21 bits to represent each symbol.

Text file:
• A file containing long sequences encoded in ASCII.

Representing numeric values

Numbers are represented by a binary system.

Two complement notation:


For storing whole numbers

Floating point notation:


Represents numbers with fractional parts.

Images
Pixels
Entire image is represented in a bitmap.

Disadvantage:
• an image cannot be rescaled easily to any arbitrary size.

Bit patterns puslapis 6


The binary system
2024 m. spalio 3 d., ketvirtadienis 11:15
Fractions in binary

In binary, decimal point is a radix point.

Binary system puslapis 7


Storing integers
2024 m. spalio 3 d., ketvirtadienis 11:26

Two complement's notation

This system uses a fixed number of bits to represent each of the values in the system. Each value is represented in size of
32 bits.

The leftmost bit represents sign. It is a sign bit. Negative values have sign bit of 1 and positive values - 0.

There's convenient relationship between patterns of negative and positive values. The complement of a pattern is the
pattern obtained by changing all the 0s to 1s and all the 1s to 0s; 0110 and 1001 are complements.

Overflow problem

Overflow is the problem that occurs when a computation produces a value


that falls outside the range of values that can be represented. Happens when two negative values
added or two positive values create a value which is over the range.

Excess Notation
each of the values in an excess notation system is represented by a bit pattern of the same length.

Excess eight notation Excess four notation

Binary system puslapis 8


Excess eight notation Excess four notation

Binary system puslapis 9


Floating point notation
2024 m. spalio 3 d., ketvirtadienis 13:45

Floating point notation Truncation errors

Storing integers with fractional part requires to When there's not enough space to copy value to the
store both integer and its radix point - > Floating Mantissa field, and the rightmost bit is lost.
point notation.
Solutions:
Floating point notation Longer mantissa field, nowadays 32 bits- > more space.

High order bit of the byte is a sign bit. 0 for


positive and non negative values, 1 for negative
values.

8 -1 = 7

7 remaining bits are divided into exponent field


and mantissa.

Another reason:
Some values cannot be accurately expressed. In binary,
There are more nonterminating values than in decimal notation.

01101011 Solution:
Manipulate data in units of pennies so that all values are integers that can
.1011 Be accurately stored using method such as two's complement.

From binary to decimal:

First extract exponent - 110. 110 in binary is 6,


we use 3 bit excess notation : 6 - 4 = 2.

We move radix point towards right by 2 bits.


Because of excess. And we get 2¾.

From decimal to binary using floating point


notation:
1 and 1/8 - > 1.001 - > into mantissa
field - > .1001

To get 1.001, we must move . 1 position to the


right. Therefore, exponent part is 5 -> 101. 1+4 =
5 . Number is positive, so we also add 0.
Therefore, 1 and 1/8 in floating point notation is
01011001. Normalized form -> because
mantissa has to start with 1. We fill starting with
the left most bit.

Binary system puslapis 10


Data and programming
2024 m. spalio 3 d., ketvirtadienis 18:15

What is a programming language?

A programming language is a computer system created to allow humans to precisely express


algorithms to the computer
using a higher level of abstraction.

Python is an interpreted language, which for beginners means that Python instructions can be typed
into an interactive prompt, or can be stored in a plain text file (called a “script”) and run later.

Python - > first code is interpreted, no need for compiler.

What is output?
a result of the program that will be made visible to the user.

Variables
In script, the first line is an assignment statement. Python is a dynamically typed language, which
means that our script need not establish ahead of time that there will be a variable called message,
orwhat type of value should be stored in message.

Rules in Python:
Variable must begin with an alphabetic character
Name may consist of an arbitrary number of letters, digits, and the underscore character, _.
Python variable names are case-sensitive, meaning that capitalization matters.
A small number of keywords, names that are reserved for special meaning in Python, cannot be used
as variable names.

Data and Programming puslapis 11


Operating systems
2024 m. spalio 24 d., ketvirtadienis 21:49

History of the operating systems:

Each task was called job.

Machine prepared for a task - task was executed - all tapes retrieved.

This is a batch processing - the execution of jobs by collecting them in a one batch and then executing
them without further interaction of the user.

Jobs were collected into a job queue, first in first out. Objects removed in an order they were received.

Why FIFO is not used?


As a job waiting in line can be bumped by higher priority job.

Interactive processing

Allowed more user interaction.

Operating systems puslapis 12


(The task of processing)

payroll can be scheduled to conform to the amount of time required


by the computer, but using a word processor would be frustrating if the
machine did not respond promptly as characters are typed.)

Real time processing - actions are performed in real time.

Problem - real time processing could process only one user, not multiple users.

Solution - multiprogramming - OS that can process multiple users at the same time.

Time is divided into intervals and then the execution of each job is restricted to only one interval at a
time.

At the end of each interval, the current job is temporarily set aside and another is allowed to execute
during the next interval.

Operating systems problems:


Load balancing - dynamically allocating tasks to the various processors so that all processors are used
efficiently.
Scaling - breaking tasks into a number of subtasks compatible with the number of processors available

Embedded systems - computer systems found in various devices.


Embedded operating systems are often expected to conserve battery power, meet demanding, real-
time deadlines, or operate continuously with little or no human oversight.

Operating systems puslapis 13


Operating system architecture
2024 m. spalio 27 d., sekmadienis 12:13

Software classification

Application software
Programs for performing tasks particular to machine's utilization. Examples -
spreadsheets, database systems, desktop publishing systems, accounting
systems, program development software, and games.

System software
performs those tasks that are common to computer systems in general.
the system software provides the infrastructure that the application software requires.

System software categories:


Operating system
Utility software -
The majority of an installation’s utility software consists of programs for performing activities that are fundamental to
computer installations but not included in the operating system. Examples - antivirus.

Utility software consists of software units that extend (or perhaps customize) the capabilities of the operating system.

Operating system:
User interface - OS communicates with users. Examples of user interface - shell, GUI.
Graphical User Interface - GUI - files and programs, are represented pictorially on the display as icons. Allows to
perform commands.

GUI shell - Windows manager - Windows - allocates blocks of space on the screen.

Kernel - internal part of OS.


Performs basic functions required by computer's installation.

Kernel components:

File manager - the file manager maintains records of all the files stored in mass storage, including where each file is
located, which users are allowed to access the various files, and which portions of mass storage are available for new
files or extensions to existing files.

Files are grouped into directories or folders.


Directories have a directory path - chain of directories.

Device drivers - the software units that communicate with the controllers (or at times, directly with peripheral devices)
to carry out operations on the peripheral devices attached to the machine. Through device drivers we can manipulate,

Operating system architecture puslapis 14


to carry out operations on the peripheral devices attached to the machine. Through device drivers we can manipulate,
update drivers.

Memory manager - coordinates machine's use of the memory. The memory manager must find and assign memory
space for these needs and ensure that the actions of each program are restricted to the program’s allocated space.
Memory manager also creates virtual memory by paging when memory is not enough.

Scheduler -
• maintains a record of the processes present in the computer system,
• introduces new processes to this pool
• removes completed processes from the pool.
• Creates a new entry in a process table
• Keeps track of all processes

Dispatcher -
• Oversees the execution of process. Done by multiprogramming.

Operating system architecture puslapis 15


Operating system - start
2024 m. spalio 27 d., sekmadienis 13:44

Operating system starts by bootstrapping when it is turned on.

It is this procedure that transfers the operating system from mass storage (where it is permanently
stored) into main memory (which is essentially empty when the machine is first turned on).

Computer Boot Process animation

When computer is turned off, main memory is erased as it is volatile. Part of memory is transferred
to ROM, where contents can be only read and not changed.

Boot loader:
Permanently stored in ROM. Executed when computer is turned on. Directs CPU to transfer OS from
the predetermined location in volatile memory. Once OS is in volatile memory, boot loader directs
CPU to perform jump to that area of the memory.

Operating system architecture puslapis 16


Process is called booting.

When such a machine is first turned on, the boot loader loads and activates the operating system.

Operating system architecture puslapis 17


Process
2024 m. spalio 27 d., sekmadienis 14:31

Process - the activity of executing a program.

Process state - the current state of the activity.

Includes:
• Current position in the program
• Values in the other CPU registers
• Associated memory cells.

Process administration
Scheduler maintains blocks of info in the main memory by process table.

Process table contains info about memory area, priority in the process, process status (waiting //
ready).

Process statuses:
• Ready - process can be continued.
• Waiting - progress currently delayed until external event occurs.

Dispatcher oversees process of scheduled processes -- > divides tasks into time slots and switches
contexts.

Multiprogramming - dividing time into timeslots.

Context switch - switching from one processor to another.

Dispatcher initiates timer circuit which generates a signal at the end. This is an interrupt signal.

Interrupt signals

Operating system architecture puslapis 18


Then CPU stops the task, saves it, and takes care of the interrupt, CPU starts to execute the interrupt
handler.

Interrupt handler is a part of dispatcher and describes how dispatcher should react to interrupt
signal.

Function of the interrupt signal - to stop the current process and take control back to the dispatcher.

Dispatcher selects process according to its priority, restarts timer and allows to begin the selected
process.

Multiprogramming allows to stop and restart the process later. This way - increases efficiency of the
machine.

Operating system architecture puslapis 19


Competition of the processes
2024 m. spalio 27 d., sekmadienis 16:34

Functions:

• The file manager allocates access to files and allocates mass storage space for the construction of new files
• The memory manager allocates memory space.
• The scheduler allocates space in the process table
• The dispatcher allocates time slices

Semaphores

Operating system must keep track of whether device is available (0) or not (1).
Solutions:
• processes of setting flags and allocating should be not interrupted.
• Test and set system - This instruction directs the CPU to retrieve the value of a flag, note the value received, and
then set the flag—all within a single machine instruction. Process is not recognized by interrupt signals, everything
is done in one operation.

Properly implemented flag - semaphore.


Sequence of instructions - critical region.

There should be only one process executed at the time in the critical region - mutual exclusion.

Deadlock

two or more processes are blocked from progressing because each is waiting for a resource that is
allocated to another.

Main reasons for deadlock:

Solutions?

One of the solutions - to kill some processes.

Another - deadlock avoidance schemes.

The operating system would make the nonshareable resource appear shareable by creating the illusion
of more than one printer. This technique of holding data for output at a later but more convenient time
is called spooling. (Printer example)

Operating system architecture puslapis 20


Networking and the internet
2024 m. lapkričio 4 d., pirmadienis 10:14

Network:
• PAN - personal area network, less than a few meters
• LAN - local area network
• WAN - wide area network

Network:

• Open - public domain. Example,


Internet - open system.
• Closed - individual, restricted by
Conditions

Communication in the internet handled by protocols, everyone are free to use.

Also network is classified by a topology:


• Bus - all machines are connected between each other. BUS - example - Ethernet.
• Star - one machine serves as a center. Example - wireless networks.

Network and the internet puslapis 21


HUB - central location to which computers are connected. It just passes along any signal it receives,
possibly with some amplification, to all connected devices.

Network and the internet puslapis 22


Protocols
2025 m. sausio 2 d., ketvirtadienis 16:29

Protocol - set of rules.

CSMA / CD protocol - Carrier Sense, Multiple Access with Collision Detection.

The right to transmit messages is controlled by CSMA / CD.

Message be broadcast to all machines in the bus.


Each machine monitors all the messages, but keeps only the addressed ones.

CSMA / CD

Network and the internet puslapis 23


Hidden terminal problem - the signals from the different machines are blocked from each other by
objects or distance even though they can all communicate with the central AP.

CSMA / CA - policy which avoids collisions, helps to prevent collisions.

Difference between CSMA / CA and CSMA / CD:


when a machine first needs to transmit a message and finds the communication channel silent, it does
not start transmitting immediately. Instead, it waits for a short period of time and then starts
transmitting only if the channel has remained silent throughout that period. Waits for channel to be
silent for a period of time.

Network and the internet puslapis 24


Devices
2025 m. sausio 2 d., ketvirtadienis 16:55

Devices:
• Bridges - connect two busses, does not necessarily pass all the messages. Looks at the
destination address that accompanies each message and forwards a message across the
connection only when that message is destined for a computer on the other side.
• Switches - bridge with multiple connections, connects several busses.
• Repeater - passes signals between the buses.

The point where network is connected to the internet - gateway.

Network and the internet puslapis 25


Methods of process communication
2025 m. sausio 2 d., ketvirtadienis 17:17

Communication between processes - interprocess communication.

Client / server model


• Client - makes request of other processes.
• Server - satisfies the requests by clients.

Print server - early application of client / server model. Printer was used as a server and made connection
available for all the machines in the network.

File server - machine which contained all the records was a server, other machines - clients.

Peer to peer -

Network and the internet puslapis 26


Distributed Systems
2025 m. sausio 2 d., ketvirtadienis 17:51

Distributed systems - software units that execute processes on different countries.

Cluster computing - A distributed system in which many independent computers work closely
together to provide computation or services comparable to a much larger machine.

Provides high availability - because it is more likely that at least one member of the cluster will be
able to answer
a request, even if other cluster members break down or are unavailable. At least one is available.

Load balansing - load is balanced equally, reduced from members who have too much to members
who have too little.

Grid computing - distributed systems that are more loosely coupled than clusters but that still work
together to accomplish large tasks.

Grids are decentralized, cloud is centralized.

Cloud computing -- cloud -- google Drive, google Apps, Amazon Elastic Cloud.

Questions and exercises --


What is an open network?
Open network is a network where all members can access information freely.

Summarize the distinction between a bridge and a switch.


Bridge can connect two busses, switch can connect several busses. Switch is a bus with multiple
connections. Bridge transfers a message only to a particular bus. Switch can connect multiple
devices.

A bridge connects two network segments and transfers messages to a specific destination based on
the MAC address. A switch, on the other hand, acts as a multi-port bridge, connecting multiple
devices and allowing direct communication between them.

What is a router?
Router is a device which connects several networks into one network, and directs data packets
between them. and allows the internet connection between them. Router is a gateway from the
network to the internet.

Identify some relationships in society that conform to the client/server model.


It could be student and a professor - student gets information from the professor, student enrolls
courses of the professor and professor provides the information to the student.

Salesman and customer ---> customer buys service, salesman provides that service to the customer.

Identify some protocols used in society.

Everyone speaks by one. You should wait for other person to finish talking to start talking.
You should wait for your place in queue. You cannot step over the other person.

Summarize the distinction between cluster computing and grid computing.


Cluster computing is available just for computers in a particular network, grid is more accessible.
Grid systems are more loosely connected than cluster systems. Runs entire application on each
server. Two computer are connected. Creates redundancy. Grid computing - works independent

Network and the internet puslapis 27


server. Two computer are connected. Creates redundancy. Grid computing - works independent
problems in parallel. Grid - distributes model across multiple computers.

Cluster Computing: Computers are tightly connected, typically within the same network or location,
working together as a unified system. It provides high performance by leveraging the combined
resources of the machines in a controlled, often homogeneous environment.

Grid Computing: Computers are more loosely connected and can be spread across different
geographical locations. It involves pooling resources from diverse systems to perform large-scale
tasks. Grid computing is more flexible and can be accessed by different organizations or individuals,
often using public or private networks.

Network and the internet puslapis 28


Internet
2025 m. sausio 2 d., ketvirtadienis 20:57

Internet architecture

Internet is managed by internet service providers.

Area within AP -- hot spot

END TO END ARCHITECTURE

Internet addressing

IP addresses are awarded to ISP by ICANN.

Internet Corporation for Assigned Names and Numbers (ICANN) - a nonprofit corporation established
to coordinate the Internet’s operation.

IP addresses written in dotted decimal notation.

Each domain is registered by ICANN, domain is assigned a domain name.

Top level domains - edu, org, .com, .org.

Subdomains - extensions, added to the left from the domain name.

DNS - The Domain Name System (DNS) is a hierarchical and distributed name service that provides a
naming system for computers, services, and other resources on the Internet or other Internet Protocol
(IP) networks.

Using DNS - DNS lookup.

Network and the internet puslapis 29


Internet Applications
2025 m. sausio 2 d., ketvirtadienis 21:26

NNTP - Network News Transfer Protocol

Application layer client/server protocol that enables servers and clients to exchange news articles in
a manner similar to SMTP for emails.

File Transfer Protocol (FTP) - application for moving files among computers.

SSH - Secured Shell Protocol


a network protocol that gives users -- particularly systems administrators -- a secure way to access a
computer over an unsecured network.

Protocols

SMTP - (Simple Mail Transfer Protocol) - used for sending email.

SMTP - Sending Mail to People

So SMTP is used when sending emails, POP3 and IMAP are used when receiving emails.
POP3 downloads emails to the computer.

POP3 does not synchronize. No copies are kept on the server.

IMAP - > for retrieving emails, allows to view emails from multiple devices, keeps copies and
synchronizes.

VoIP - Voice over internet protocol


Phone calls over internet connection - messenger, line, whatsapp.
Soft phones - are applications install on PC, smartphones.

Multimedia streaming -
unicast refers to one sender sending messages to one receiver,
whereas N-unicast refers to a single sender involved with multiple unicasts.

Similar to streaming

Multicast - a packet is sent from one host to selected hosts.

Anycast - one of the nearest association. Anycast enables to connect to the nearest server.

Content delivery networks CDN - groups of servers distributed strategically around the Internet that
specialize in streaming copies of content to nearby end users in their network “neighborhood”.

Questions
What is the purpose of tier-1 and tier-2 ISPs? What is the purpose of access ISPs?
Tier 1 and tier 2 provide the internet service. Tier 1 is a backbone of the internet.
Access ISP provides internet access to the hosts for a charge. Link between tier 1/2 and users.

Tier 1 ISPs
• Purpose: Tier 1 ISPs form the backbone of the internet by interconnecting and providing global
internet access. They typically have peering agreements with other Tier 1 ISPs, which means
they exchange traffic without paying each other.
• Customers: Other ISPs (Tier 2 or lower), large organizations, or governments.

Network and the internet puslapis 30


• Customers: Other ISPs (Tier 2 or lower), large organizations, or governments.
• Characteristics: They own extensive networks of high-capacity fiber-optic cables spanning
countries and continents.
Tier 2 ISPs
• Purpose: Tier 2 ISPs buy transit services from Tier 1 ISPs to access the global internet. They
also may engage in peering agreements with other Tier 2 ISPs to reduce costs.
• Customers: Often serve as regional providers, selling services to smaller ISPs (Access ISPs),
businesses, or individuals.
Access ISPs
• Purpose: Access ISPs (also known as last-mile providers) connect end-users (individuals,
homes, or businesses) to the internet.
• Role: They serve as a bridge between users and the larger internet infrastructure maintained
by Tier 1 and Tier 2 ISPs.
• Business Model: Charge users for internet access, usually offering plans based on speed and
bandwidth.
Simplified Flow
1. Tier 1: Interconnects globally, forming the internet's backbone.
2. Tier 2: Regional or intermediary, linking to Tier 1 and smaller ISPs.
3. Access ISPs: Provide internet access directly to end-users.

What is DNS?
DNS is domain naming service. Using this system, name to domain is provided. Translates domain
names to IP addresses which computers can use for a communication.

What bit pattern is represented by 3.6.9 in dotted decimal notation?


000000110000010100001001
Express the bit pattern 0001010100011100 using dotted decimal notation.
21.28

In what way is the structure of a mnemonic address of a computer on the Internet (such as
overthruster.propulsion.
yoyodyne.com) similar to a traditional postal address? Does this same structure occur in IP
addresses?

Traditional post address also has a street and house noted next to the post code and country, same
as ip address has subdomains.

Name three types of servers found on the Internet and tell what each does
Types of servers - DNS servers, FTP servers, mail servers. DNS servers translates domain name to IP
address, FTP servers are beneficial for file transfer, mail servers - send, receive, store email
messages.

What aspects of network communication are described by a protocol?


Protocols define the rules, how message is delivered, order and meaning of the messages.

In what way do the P2P and multicast approaches to Internet radio broadcast differ from N-
unicast?
N unicast is one way, information is shared only with the recipient, multicast allows to share
information with multiple hosts. N unicast sends the information to each host separately.Multicast
and P2P only when needed.

N-unicast: Inefficient for large audiences due to separate streams for each user.
Multicast: Efficient for large audiences but depends on network support.
P2P: Highly scalable and efficient as peers share the distribution load.

What criteria should one consider when choosing one of the four types of VoIP?

Network and the internet puslapis 31


What criteria should one consider when choosing one of the four types of VoIP?
Internet connection and accessability, cost, security, reliability.

Network and the internet puslapis 32


Networking and the internet II
2024 m. lapkričio 12 d., antradienis 22:33

Tim Berners Lee - created a hypertext - the concept of linked documents.

The world wide web:


• a hypertext document format for embedding hyperlinks to other documents;
• a protocol for transferring hypertext across the network, and a server process that supplied
hypertext pages upon request.

Software packages:
• Browsers:
○ Resides on the computer
○ Charges with tasks of obtaining materials requested by the user.
• Web servers
○ Resides on the computer containing hypertext documents
○ Provides access to the documents under its control by browser.
○ Apache, Nginx

Difference between browsers and web servers?


The key difference between browsers and web servers lies in their roles in the web ecosystem:
Browsers
• Purpose: Browsers are client-side applications used to access and display web content.
• Examples: Google Chrome, Mozilla Firefox, Microsoft Edge, Safari.
• Functionality:
○ Resides on the user's device.
○ Sends requests to web servers for resources (HTML, CSS, images, etc.).
○ Renders and displays the received content to the user.
• User Interaction: Directly interacts with the user, allowing them to browse websites, fill forms,
and interact with web applications.
Web Servers
• Purpose: Web servers are server-side software responsible for hosting and serving web content to
browsers.
• Examples: Apache, Nginx, Microsoft IIS.
• Functionality:
○ Resides on a remote machine (or local in some cases) containing the hosted files.
○ Responds to HTTP requests from browsers by providing the requested resources.
○ Can process dynamic requests with server-side scripts or serve static files.
• User Interaction: Indirectly interacts with the user by responding to browser requests.
Key Difference in Role
• Browser: Acts as the client that requests and displays content.
• Web Server: Acts as the server that provides the content requested by the browser.
In simpler terms:
• A browser is what you use to view a website.
• A web server is what makes the website available for the browser to access.

Hypertext documents are transferred through HTTP.

URL
A unique address to access a website.

HTML

Hypertext markup language -> language of tags.

HTML consists of <head></head> and <body></body> tags.

Network and the internet puslapis 33


Activities:

If performed by client - > client side

If performed by server -> server side

XML

eXtensible Markup Language (XML)

Created to represent:
• Mathematics
• Multimedia presentations
• Music

HTML is based on XML, but focus more on semantics rather than appearance itself.

Security
In HTML problems:
- > ingredients as list, in XML - could be used with <ingredient></ingredient> tags.

• It has
Semantic a risk of-malicious
approach activities.
search engines.

• Clients
Client can
side and causeside
server programs to be executed.

Network and the internet puslapis 34


Internet Protocols
2024 m. lapkričio 13 d., trečiadienis 00:05

Main task - to provide the INFRASTRUCTURE required to pass messages between machines.

Layers of internet software:

1. Application layer
2. Transport layer
a. Divides messages in order to prevent obstruction of flow of other messages.
b. Segments are packets.
c. Packets are treated as individual messages.
d. Assigns ports
3. Network layer
a. Decides where messages should be sent
4. Link layer

Network and the internet puslapis 35


TCP / IP protocols

Open System Inconnection reference model -


• Sevel Level hierarchy

Transmission Control Protocol (TCP) -


• Defines a version of a transport layer

Internet Protocol (IP)

TCP vs UDP:

Before sending a message, as requested by application layer, a transport layer


Based on TCP sends its own message to the transport layer of the destination.

UDP - Transport layer does not establish connection, differently from TCP.

UDP - just sends a message without establishing a connection. Does not retransmission.

UDP - connectionless protocol.

TCP - TCP transport layers at the origin and destination work together by means of acknowledgments
and packet retransmissions to assure that all segments of a message are successfully transferred to the
destination.

TCP reliable protocol, UDP - unreliable protocol.

TCP has:
• Flow control -> less efficient, reduces the transmitting speed
• Congestion control -> adjusts message's transmission speed at TCP origin destination.
Transport layer based on UDP - more effective, is more streamlined than a layer based on TCP.

Mail servers use TCP as email is less sensitive.

IP

IP - implements tasks assigned to the network layer.

Forwarding - > relays packets through the internet


Routing - > updates the layer’s forwarding table to reflect changing conditions

Network and the internet puslapis 36


Network and the internet puslapis 37
TCP / IP protocols
2024 m. gruodžio 31 d., antradienis 14:34

Network and the internet puslapis 38


Algorithms
2024 m. lapkričio 18 d., pirmadienis 10:00

Network and the internet puslapis 39


Iterative Structures
2024 m. lapkričio 19 d., antradienis 00:25

Sequential Search Algorithm

If value is in list - success, if not - fail.

One of the conditions must be true to terminate.

the first statement in our routine, which selects the first entry in the list as the test entry, is based on the assumption
that the list in question contains at least one entry.

Sequential order - > entries are in sequential order, linear search. Used for short lists. Disadvantage -> long lists are not
as efficient.

Loops

One of ways to implement repetitions - > Loops.

VS

But we cannot produce a similar sequence that is equivalent to the loop structure, because we don't know how many
drops we need.

Network and the internet puslapis 40


Will run into infinite loop and loop will never terminate.

Flowchart

This is how for loop was created:

Insertion sort algorithm

Goal - to sort the algorithm within the list.

Network and the internet puslapis 41


Binary Search Algorithm

We search in an area where value could be located. We are searching in the middle of the list.

Network and the internet puslapis 42


Recursive control

Recursion - Whereas the sequential search involves a circular form of repetition, the binary search
executes each stage of the repetition as a subtask of the previous stage

Recursive function is mainly for testing. It is created to test for the termination condition.

Network and the internet puslapis 43


Network and the internet puslapis 44
Efficiency and correctness
2024 m. gruodžio 3 d., antradienis 00:34

Algorithm efficiency

Network and the internet puslapis 45

You might also like