导论

Wednesday, November 16, 2022
本文共1755字
4分钟阅读时长

⚠️本文是作者P3troL1er原创,首发于https://peterliuzhi.top/principle/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/%E5%AF%BC%E8%AE%BA/。商业转载请联系作者获得授权,非商业转载请注明出处!

Computers are like bikinis. They save people a lot of guesswork. — Sam Ewing

本笔记是笔者在阅读计算机科学导论时的随记

网络

网络:是一系列可用于通信的设备相互连接构成的

设备:

主机(终端)

连接设备

  • 路由器:将一个网络与另一个网络相连接

  • 交换机:讲不同设备连接在一起

  • 调制调节器:可以改变数据形式

局域网(LAN)

  • 私有网络
  • 每台主机都有作为这台主机在局域网中唯一定义的一个标识和一个地址
  • 一台主机向另一台主机发送的数据包中包括源主机目标主机的地址
  • 用交换机(switch)连接所有的主机

广域网(WAN)

  • 地理跨度较 LAN 大得多
  • WAN 将交换机、路由器(router)或调制调节器之类的连接设备互连
  • 局域网为机构私有,而广域网则由通信公司创建并运营

点对点广域网

@——@

通过传输媒介(电缆或无线)连接两个通信设备的网络

交换广域网

至少两个端的网络,交换广域网用于当今全球通信的骨干网,是几个点对点广域网通过交换机(switch)连接产生的结合体

互联网络(internet ,小写)

两个或多个(LAN&WAN)相互连接时,他们构成一个互联网络(网际网)

因特网(Internet,大写)

成千上万个互联网络组成因特网

骨干网

  • 为通信公司拥有
  • 通过网络对等汇点连接

供应商网络

  • 规模较小
  • 付费使用骨干网上的一些服务
  • 与骨干网相连,有时也连接其他供应商网络

客户网络

  • 在边缘
  • 真正使用基于因特网服务的网络
  • 向供应商网络付费得到服务

骨干网和供应商网络并称为因特网服务供应商

骨干网被称为国际因特网服务供应商

供应商网络被称为国内或地域性因特网服务供应商

下面是当时找到的一些参考资料(还有一些笔者自己写的英语笔记,但是是那篇已经忘了),原网址找不到了,如有侵犯作者权益,笔者一定删除

Computer Organization

CPU(central processing unit)

ALU(arithmetic logic unit)

  • logic
  • shift
  • arithmetic operations

control unit

  • contrl the operation of CPU

    • computer divided by instructions

      • CISC(complex instruction set computers)

        • programmer’s works are easier
        • a large set of instructions
      • RISC(reduced instruction set computers)

        • programmer’s works are more difficult
        • simple instructions
    • the process of computer program

      • ways of processing

        • pipelining

        • Parallel processing

          • SISD
          • SIMD
          • MISD(JUST CONCEPT)
          • MIMD
      • a cycle

        • fetch
        • decode
        • execute

a set of registers

  • Data registers

  • Instruction registers

    • instruction set

      • opcode
      • operand
  • Program counter

Cache memory

contains a copy of a portion of main memory

accelerate the process

procedure

  • CPU checks the cache

    • if it’s in cache ,get it
    • if not, cache will go get it

main memory

address space

  • adress

Data(organized as words)

  • RAM(random access memory)

    • SRAM(static)

      • fast
      • expensive
    • DRAM(dynamic)

      • slow
      • inexpensive
  • ROM(read-only) memory

    • PROM(cannot erase)
    • EPROM(can erase by ultraviolet light)
    • EEPROM(can erase by electronic impulses)

I/O(input/output) subsystem

input

  • hard disk
  • USB
  • CD/DVD
  • keyboard

output

  • monitor
  • printer

catagories

  • Nonstorage devices

  • Storage devices

    • magnetic
    • optical

adress

  • isolated I/O method
  • memory-mapped I/O method

connected by bus

data bus

address bus

control bus

Difference between Router and Switch

Router and Switch are both network connecting devices. Router works at network layer and is responsibe to find the shortest path for a packet whereas Switch connects various devices in a network. Router connects devices across multiple networks.

Following are the important differences between Router and Switch.

Sr. No. Key Router Switch
1 Objective Router main objective is to connect various networks. Switch main objective is to connect various devices in a network.
2 Layer Router works in Network Layer. Switch works in Data Link Layer.
3 Usage Router is used in LAN and MAN. Switch is used only in LAN.
4 Data Format Router sends data in form of packets. Switch sends data in form of packets and frames.
5 Mode of Transmission Router follows duplex mode of transmission. Switch also follows duplex mode of transmission.
6 Collision Less collision in case of Router. In full duplex mode, no collision happens in switch too.
7 NAT Compatability Compatible with NAT. Not compatible with NAT.
8 Type Routing type is Adaptive and Non-adaptive routing. Switching type is Circuit, Packet and Message switching.

What are Switches in Computer Network?

A switch has many ports, to which computers are plugged in. When a data frame arrives at any port of a network switch, it examines the destination address, performs necessary checks and sends the frame to the corresponding device(s).It supports unicast, multicast as well as broadcast communications.

img

Features of Switches

  • A switch operates in the layer 2, i.e. data link layer of the OSI model.
  • It is an intelligent network device that can be conceived as a multiport network bridge.
  • It uses MAC addresses (addresses of medium access control sublayer) to send data packets to selected destination ports.
  • It uses packet switching technique to receive and forward data packets from the source to the destination device.
  • It is supports unicast (one-to-one), multicast (one-to-many) and broadcast (one-to-all) communications.
  • Transmission mode is full duplex, i.e. communication in the channel occurs in both the directions at the same time. Due to this, collisions do not occur.
  • Switches are active devices, equipped with network software and network management capabilities.
  • Switches can perform some error checking before forwarding data to the destined port.
  • The number of ports is higher – 24/48.

Types of Switches

There are variety of switches that can be broadly categorised into 4 types −

img

  • Unmanaged Switch − These are inexpensive switches commonly used in home networks and small businesses. They can be set up by simply plugging in to the network, after which they instantly start operating. When more devices needs to be added, more switches are simply added by this plug and play method. They are referred to as u managed since they do not require to be configured or monitored.
  • Managed Switch − These are costly switches that are used in organisations with large and complex networks, since they can be customized to augment the functionalities of a standard switch. The augmented features may be QoS (Quality of Service) like higher security levels, better precision control and complete network management. Despite their cost, they are preferred in growing organizations due to their scalability and flexibility. Simple Network Management Protocol (SNMP) is used for configuring managed switches.
  • LAN Switch − Local Area Network (LAN) switches connects devices in the internal LAN of an organization. They are also referred as Ethernet switches or data switches. These switches are particularly helpful in reducing network congestion or bottlenecks. They allocate bandwidth in a manner so that there is no overlapping of data packets in a network.
  • PoE Switch − Power over Ethernet (PoE) switches are used in PoE Gogabit Ethernets. PoE technology combine data and power transmission over the same cable so that devices connected to it can receive both electricity as well as data over the same line. PoE switches offer greater flexibility and simplifies the cabling connections