Server: A software process that provides a service requested by a client.
Client: A software process that requests a service provided by a server.
Server-Client Model: A client initiates a request for a service from a server and the server responds to that request
Protocols: A protocol defines the rules for succesful communication between two devices on a network. The protocol decides signals, codes and rules for the transmission.
Port: A port is an element added to an address to identify which process to pass data through.
Socket: A sockets is the combination of a port and an ip address.
TCP/IP (Transport Control Protocol/Internet Protocol)
These protocols are used together on the internet and are usually found within a four layer protocol stack. Protocols are usually designed in layers, with each layer handling something different, this is called a network protocol stack.
The four layered stack that runs when data is transfered accross the internet is this:
- Application Layer: This layer is in charge of encoding the data so that it is in an understandable format for the reciever.
- Transport Layer: This layer splits the data into chunks (packets). This layer will also deal with lost packets.
- Network Layer: This layer will add the IP address of the recipitent to the packets, it will also deal with the routing of packets (Packet Switching).
- Link Layer: This layer will add the mac address of the devices sent too and from to the packets.
Servers are universally known port numbers reserved for specific functions. Below is some of the well known port numbers and the processes their corrosponding servers carry out.
|| FTP, Control
|80 & 8080
|| Web Server
Domain Names were created so that users could easily access and navigate between websites without having to remember all the IP addresses for them. Whenever you access a website by inputting a domain name into the address bar of a browser, the corrosponding IP for that address will be retrieved. The following process outlines how this happens.
When you type a domain name into your browser address bar, such as google.com, a query will be sent to retrieve the IP address.
Use the featured image above to help you understand!
- The first server that your query encounters is the RR (Recursive Resolver), which is hosted by your ISP (Internet Service Provider).
- The RR will send the query to the Root DNS server, which holds all the information about Top Level Domain (TLD) servers.
- The query will then find its way to the correct TLD server, in this case for google.com it will be the .com TLD server. The server will then send you the IP of the hosting server in which google.com is located.
- Next your query will be sent to the DNS server hosting the domain and the IP will be returned to the RR.
- Finally the RR returns the IP address to the browser on your computer and then your browser can send a request to the IP to retrieve the websites content.
The query in this example would be “What is the IP address for the website domain google.com”.
This Website was very useful in helping me understand the process.
Generations of code
In order of generation, types of code:
- Machine code (Object code)
- Assembly code
- High Level Language (Source code)
- Declaration Language (SQL)
The role of the translator is to take program code/source code and to translate it into machine code.
- Assembler (Assembly code to machine code)
- Compiler (Source code to machine code)
- A compiler takes whole source code and translates it into object code
- Compiled code executes quicker
- Produces an executable file
- Interpreter (Source code to machine code)
- An interpreter translates a programs source code line-by-line
- Interpreters are slower than running compiled code
- Source code is required for the program to be interpreted
Situations translators are used
- So that source code cannot be accessed by user
- When the program is to be distributed as an executible
- Where speed of execution is important
- To allow execution on a wide range of processors
- When prototyping and testing code
- When no compiler yet exists for the processor
This is the simplified version of the fetch-execute cycle outlining everything you would need to know for the A-Level computing exam.
Parts of the cycle
- PC – Program Counter
- MAR – Memory Address Register
- MDR – Memory Data Register (MBR -Memory Buffer Register)
- CIR – Current Instruction Register
- SR – Status Register
- ACC – Accumulator
- CU – Control Unit
This part of the cycle is illustrated above in an easy to understand diagram.
- The address location from the PC is fetched and copied into the MAR
- The contents of the memory location from the MAR is copied to the MDR
- The MDR is copied to the CIR
- The PC is incremented by 1
- The SR is checked for interuptions
- The instruction found in the CIR is interpreted by the decoder. (Decoded by the CPU’s CU)
- The instruction is split into Opcode and a operand.
- The address location from the instruction in the CIR is moved to the MAR
- The contents of the memory address location in the MAR is moved to the MDR
- The results of the computation stored in the MDR are moved to the ACC (Depends on the type of instruction, e.g. LOAD, ADD, STORE).
- SR is updated.
The cycle then repeats itself until there are no more instructions.