Skip to main content

Computer Networks | what happens when you enter a URL? An introduction to Computer Networking

Any data, information or even hardware which are shareable among different computers are known as resources in computer network.

Resource sharing is the major, reason for interconnecting different computing systems. Such a interconnected system of computers are known as network.

Each computer in this interconnected group of computers is called a host computer.

So a network can be termed as a group of interconnected hosts.

Any work which is running on a system is called a process.

In computer networking major focus is for processes which are participating in the resources sharing between host computers.

example : A process sending URL GET get request from a Chrome browser.



A web server is a machine which delivers resources related to content of website, as per the request by any other machine(clients) in the network.

Both server and client machine are hosts of a same network or different networks.

A URL like http://www.wikipedia.org/wiki/Main_Page has three parts.

http:// - File transfer protocol over world wide web(WWW).

www.wikipedia.org - domain name, an unique human understandable address of the server.

Every domain name has its own machine readable unique numerical address called IP (Internet protocol).

Domain Name Server (DNS) is service that has to be provided by every Internet Service Provider (ISP) to convert domain name into an IP address

/wiki/Main_Page - path: refers to the file location on server.

Let us see what happens when you enter the URL http://www.wikipedia.org/wiki/Main_Page

  1. Your system will contact the Domain Name Server (DNS) of your internet service provider (ISP) to get back the IP address of the server.

  2. Contacting a DNS takes some time, which causes for some delay in getting information. The delay is called DNS overhead.

    In order to avoid such delay, your system will contact DNS for IP address conversion, only at its first time access of an URL and stores the IP of domain name in your system itself. So unless the IP has not expired there will not be any DNS over head (no time will not be spend for domain name to IP conversion) for next time.

  3. Using IP address your request will reach the target server system, and find the required resource.

  4. An IP address is a combination of net Network ID and and Host ID.

    A n bit binary number can make 2n numbers,

    of which if we choose first block of k bits to represent network ID, it will be of 2k networks.

    And remaining n-k bit for hosts gives a 2n-k hosts in each network.

Upon reaching at network with NID and then to host( or server in case of web service ) with HID of IP will make connection only till the interface of server machine.

In order to access required resource the system need to know which process is providing the requested resources, for that port number is used.

Port numbers are globally known, and will be different for different protocols.

Example :

For Hypertext Transfer Protocol (http) it is 80

For Hypertext Transfer Protocol Secure (https) it is 443

For Simple Mail Transfer Protocol (smtp) it is 25

Comments

Popular posts from this blog

Operating Systems | Scheduling Algorithms : Round Robin

| FCFS | SJF | SRTS | Round Robin | LJF | Priority Scheduling | HRRN | Round RobinFeatures : Most popular algorithm of allPractically implementableImplementable with basic data structures like queueExtremely lesser starvationOptimum efficiency can be set by controlling time quantumThe round robin algorithm will continuously switch between processes if a process in CPU (under execution) exceeds a time limit set by OS called time quantum.Flow Chart :Scheduler allocated process to for execution.CPU starts monitoring the execution time right after from allocation.If the process completes its execution before exceeding time quantum, OS forwards the process to termination state.else, the processes gets preempted once the time quantum limit exceeded and if the process finished at this moment, OS moves the process to termination state, else it moves to ready queue and iterates over the whole process listed above.Example : Consider the following table of processes and calculate complet…

Operating Systems | Concept of Process

Hard disk drive of the system in called primary memory and secondary memory is Random Access Memory(RAM). Either a program written in High Level Language(HLL) or a executable code generated by the sequence of works done by pre-processor, compiler and assembler, resides in secondary memory of the system. To start an execution, operating system allocates some space in the main memory, for the program to be executed and loads the program in the secondary memory to the allocated space. The piece of work which is loaded by the operating system to the main memory in order to execute program is called processEvery program loaded by operating system will create a focus boundary(or process body), a partitioned memory area where all memory requirements for the execution of program is satisfied.Variable which will not change its value through out life time of process is called static variable and variables which are globally accessible in a process known as global variable.Heap area is reserved f…

Operating Systems | Scheduling Algorithms : SJF

| FCFS | SJF | SRTS | Round Robin | LJF | Priority Scheduling | HRRN | Shortest Job First(SJF)SJF algorithm schedules the shortest job(low burst time) available on main memory at the time of context switching in ready state . It can be either preemptive or non-preemptive depending on the nature of scheduler.Since the SJF select the job which is shorted among available jobs on main memory, Non-preemptive SJF algorithm will have larger waiting time if a job with longer burst time get scheduled first. In short SJF is also vulnerable to Convoy EffectTo find shortest process among min-heap would be the best data structure to be usedExample : Consider the following table of processes and calculate completion time, turn around time and waiting time using SJF algorithm with the following assumptions. No preemption.No I/O request will be there from any process.Arrival time is relative to CPU on time.Process NumberATBT103222324442View Answer

The execution of processes can be visualized …