Computer Basics


1.1 Describe the layered style of software architecture
Hierarchical style: organize the system into a hierarchical structure according to different abstraction levels, each level is established as a component, and different components are usually connected by program calls.
Advantages: 1.The design mechanism is clear and easy to understand.  2.Parallel concurrency is supported.  3.Better reusability and internal modifiability.
Cons: 1.Interaction protocols are difficult to modify.  2.performance loss.  3.Difficult to determine number of layers and granularity.

1.2 Please create an analysis class diagram for the following use case description

The specific steps to create an analysis class diagram are as follows:
1.Identify candidate classes
2.Filter Candidates
3.identify association
 4.identify important attributes
 After writing the object classes required for each step above, draw a picture, which includes Chinese class names, such as (user) and attributes (name, number), and then connect each class directly with a straight line, and write two classes in the middle of the line Actions between, such as (submit, initiate, apply, respond), then both ends of the line can be used (1-1,*-*)Represents a 1-to-many or many-to-many relationship.

1.3 Software Engineering

1.Apply a systematic, disciplined, and quantifiable approach to developing, operating, and maintaining software, that is, applying engineering to software.
2.research on the above methods.

1.4 Software requirements

1.Requirements are expectations of users, conditions or abilities that users need to solve problems or achieve certain goals.
2.A condition or capability that a system or system component needs to possess in order to meet the requirements specified in a contract, standard, specification, or other formal document.
3.A documented expression of one of the above conditions or capabilities.

1.5 Please explain the object-oriented software architectural style, and explain its advantages and disadvantages

Object-oriented: This style organizes the system into multiple independent objects, each object encapsulates its internal data, and provides external services based on the data, and different objects jointly complete system tasks through a collaborative mechanism.
Advantages: 1.Modifiability of the internal implementation.  2.Structural organization that is easy to develop, understand, and use.
Cons: 1.Unable to eliminate interface coupling, identity coupling, side effects in object-oriented programming.

1.6 What are the three main methods of software quality assurance

1.Review: Product issues are checked by someone other than the author.
2.Testing: mainly includes unit testing, integration testing, and system testing.
3.Quality metrics: Describe software products in numerical terms.

1.7 Please take the ATM withdrawal task as the theme and write the withdrawal use case

Template for writing use case questions:
 participant: xxx,the goal is xxx
 Triggering conditions: xxx Insert the bank card into the card slot
 precondition: xxx
 Postconditions: xxx
 Normal process:
 Extension process:(abnormal situation)
 Special needs: 1.response time

1.8 Continuous Integration

Continuous integration: early integration and frequent integration, that is, early in the development of the use of stub It can be replaced after starting to integrate and completing some tasks every time the development stub corresponding components in .

1.9 What are the three levels of demand?

1.Business Requirements: Used to describe why the system was developed.
2.User needs: The expectations of users who perform actual work on the specific tasks that the system can accomplish.
3.System-level requirements: user expectations for system-level behavior, each system-level requirement reflects an interaction between the outside world and the system, or an implementation detail of the system.

1.9.1 Starting from three levels, each describes a requirement in the library management system

1.Business requirements: Provide online borrowing and return book services.
2.User requirements: The system should allow users to search online for book information in the library.
3.System-level requirements: After the user enters the book name or other search information, the system should provide a list of all books that can be borrowed.

1.10 What is black box testing

Treat the test object as a black box, and judge the correctness of the test object based entirely on the input and output data.

1.10.1 Method for designing black-box test cases

1.Equivalence class division: Divide all possible input domains into several subsets, and then select representative data from each subset as test cases.
2.Boundary value analysis: Supplementary to equivalence class division, design test cases for boundary cases.
3.Decision tables: Test cases for designing complex logic.
4.State Transition: A complex test object in which the user processes inputs and outputs associated with states.

1.11 Explain the difference between engineering and science

1.Science is the organized and systematic knowledge of the fundamental principles and facts of affairs.
2.The main task of science is to study the objective laws of the changes of all things in the world, and to solve the problem of "why".
3.Engineering is a general term for various disciplines formed by the application of natural science or various specialized technologies to the production sector. Its purpose is to use and transform nature to serve human beings.
4.Through engineering, products useful to society can be produced and developed.
5.Science can be used as the guiding knowledge of engineering. For example, the guiding knowledge of software engineering is computer science.

1.12 What is an integration test, what is a unit test, and what is the difference between a unit test case and an integration test case

1.Unit testing is the testing work to check the correctness of program units.
2.Integration testing: the testing work to verify the correctness of the system interface through the big bang integration strategy or the incremental integration strategy.
Differences in test cases:
Unit testing mainly focuses on the specific logic inside the code segment, so the selection of use cases should verify the correctness of the code logic as much as possible.
Integration testing focuses on the combination of testing units, because use case selection also focuses on selecting use cases that enable interaction between units.

1.13 Functional and non-functional requirements

Functional requirements are the most common, main and important requirements in software system requirements. At the same time, they are also the most complex requirements. They are the basis for a software product to solve user problems and generate value.
Non-functional requirements mainly include performance requirements, quality attributes, external interfaces, constraints, and data requirements. Among them, the quality attribute is the most influential requirement among the non-functional requirements.

1.14 Write four architectural perspectives

1.Composition perspective: focus on functional decomposition and runtime decomposition, construction of subsystems, and reuse of construction.
2.Logical perspective: focus on the reuse of static structures, types and implementations.
3.Dependency perspective: focus on interconnection and sharing.
4.Information perspective: focus on persistent information.
5.Interface perspective: Focus on service definition and service access.

1.15 Availability of quality models

1.Ease of learning: Novice users are easy to learn and can quickly use the system.
2.Efficiency: The speed at which skilled users use the system to complete tasks.
3.Memorability: Users who have used the software system before can effectively remember or quickly relearn to use the system.
4.Error rate: How many mistakes users make when using the system, how serious the mistakes are, and whether they can be easily recovered from the mistakes.
5.Supervisor Satisfaction: Let users have a good experience.

1.16 Give an example of what a software life cycle model describes

A software life cycle model is a model that describes how various activities are performed during the software development process. There are waterfall model, prototype model, incremental model, iterative model, spiral model, etc.
Taking the waterfall model as an example, it requires software development to be divided into requirements analysis, software design, software composition, software testing, software delivery and maintenance stages. Each stage needs to write corresponding documents, and only after review can it enter the next stage.

1.17 Differences between black-box testing and white-box testing

1.Black-box testing is based on specifications, treats the test object as a black box, and judges the correctness of the test object based entirely on input and output data. White-box testing is code-based, treats the test object as transparent, and designs test cases for testing according to the program structure inside the test object.
2.Black box test methods are: 1.Equivalence Class Partitioning 2.Boundary Value Analysis 3.Decision table 4.State transition white box testing methods are: 1.statement coverage 2.condition coverage 3.path coverage
3.Advantages and disadvantages of white box and black box testing:
White box advantages: 1.High coverage 2.High number of defects found Disadvantages: 1.Tests are expensive 2.Unable to verify requirement specification
 Black box advantages: 1.High test efficiency 2.Requirements specification can be checked Cons: 1.Low coverage, less number of defects found

1.18 Relationship between Abstraction and Decomposition

Decomposition is to divide the system horizontally into several relatively simple subsystems and the relationship between the subsystems. After decomposition, each time you only need to pay attention to the abstracted relatively simple subsystems and their relationships, thereby reducing the complexity. ;
Abstraction is to focus on the interface of each system vertically. Abstraction can separate the interface and the implementation process, allowing people to better focus on the essence of the system and reduce complexity.
Decomposition and abstraction are generally used together, which can not only decompose the system into subsystems, but also separate the interface and implementation through abstraction.

1.19 What is refactoring and when does it happen

Refactoring: A rigorous method of modifying a software system to improve its internal structure (i.e., improve the quality of the detailed design structure) without changing the external appearance of the code (i.e., the functionality of the system)
Refactoring occurs after the addition of new features to eliminate the negative impact of new features.

1.20 Differences between unit testing, integration testing, and system testing

Unit testing: testing a unit interface is to check and test the correctness of the program unit (the smallest unit of software design).
Integration testing: testing multiple unit interfaces, that is, assembling the program modules at one time or incrementally, and testing the correctness of the system interfaces.
System test: test all unit interfaces, and the test focuses on the behavior of the entire system.
Unit testing and integration testing focus more on technical correctness, focusing on finding design flaws and code flaws. System testing pays more attention to defects that do not meet the requirements and the inherent defects of the requirements themselves.

1.21 What are the contents of configuration management, five examples

1.Identify configuration items
 The first step is to determine which configuration items need to be saved and managed. Secondly, it is necessary to identify the configuration item and set a unique ID. Finally, the characteristics of configuration items should be detailed, including producers, baseline creation time, users, etc.
2.version management
 Assign an initial version number to each configuration item that has just been included in configuration management, and update the version number when changes occur.
3.change management
4.configuration audit
5.status report
6.Software Release Management


2.1 What are the components of the process image

1.Network segment 3.stack 4.Attributes

2.2 I/O software is generally divided into four-layer structure, please write the name of the four-layer structure in order from top to bottom

1.user level I/O Software: Go I/O system call, format I/O. 
2.Device-Independent Software: Implementing Generic I/O functions and provide an interface to user software.
3.Device Driver: Responsible for the logic submitted by the user I/O request mapping to physical I/O Initiation and execution of operations.
4.Interrupt handler: when I/O Responsible for waking up the driver when finished.

2.3 Mode switching

CPU Switch from core state to user state or from user state to core state.

2.4 Critical section

The piece of code in a process that accesses a critical resource.

2.5 Four Necessary Conditions for Deadlock

1.Mutually exclusive conditions: resources can only be accessed mutually exclusive.
2.No preemption condition: A resource acquired by a process can only be released by itself.
3.Request and hold conditions: only apply for part of the resources each time, and continue to occupy the allocated resources.
4.Circular wait condition: The resource that each process has acquired is circularly waited for by the next process in the chain to request it.

2.6 Seven-process state model state 2.Suspend ready state 3.ready state 4.running state 5.wait state 6.pending wait state 7.terminal state
 If you draw a picture, use an ellipse to represent the state, and an arrow to represent the action
 There are three sets of double arrows:
ready to hang - ready
 ready - running
 hang on wait - wait

2.7 Privileged Instructions

Instructions that can only be used partially by the operating system kernel and are not allowed to be used directly by the user.

2.8 The principle of program locality

Only a part of the program code is used in a short period of time, and correspondingly, the storage space accessed by the program is also limited to a certain area.
Temporal Locality: Loop Structures Spatial Locality: Arrays

2.9 Internal Fragmentation

Memory space that has been allocated to jobs but is not utilized

2.10 System calls

A system service function or procedure provided by the operating system for program use.

2.11 Primitives

The underlying short-running public applets can be called, and the primitives are uninterruptible instruction sequences.

2.12 Structural Schematic Diagram of Spooling System

Input device, pre-input program, input well, output well, well management program, slow output program, output device


3.1 Split horizon

Split horizon: The update message received by the router from a certain interface is not allowed to be sent back through this interface.

3.2 RAPR

Reverse address translation protocol: used to convert the physical address of a host in the LAN to IP address.

3.3 Time division multiplexing

Time division multiplexing: Divide the physical channel into several time slices according to time, and different signals are used in turn.

3.4 PPP

Point-to-point protocol: a byte-oriented data link layer protocol, applied to the link directly connected to two nodes, and used to establish a point-to-point connection to send data through dial-up or dedicated line.


CSMA/CD That is, the carrier sense multiple access protocol with collision detection detects whether other computers on the bus are sending data before sending, and sends data if not. And while sending data, check whether there is a conflict in the channel, if there is, stop sending and wait for a period of time before resending. Collision detection is to listen while sending, so as to judge whether other stations are also sending data when they are sending data.

3.6 Try to describe the working process of single-domain OSPF

1.OSPF Servers send each other HELLO packet to establish a neighbor relationship.
2.Neighboring routers advertise their own link state information to each other ( LSA). 
3.after a while LSA After flooding, all routers form a unified LSDB(link state database).
4.router according to SPF(The shortest path first) algorithm calculates the shortest spanning tree with its own root to form routing and forwarding information.

3.7 Try to describe the main functions of each layer of the network system with five-layer protocol

1.Physical layer (transmission unit: bit): The task of the physical layer is to transmit the bit stream transparently.
2.Data link layer (transmission unit: frame): Pass down the network layer IP Packets are encapsulated into frames. Specific functions include: 1.Packaged into frames.  2.error control.  3.flow control.  4.Transport management.
3.Network layer (transmission unit: datagram/IP group): 1.Encapsulates segments or user datagrams generated by the transport layer into packets.  2.Choose the appropriate route.  3.error control.  4.flow control.  5.congestion control.
4.Transport layer (transmission unit: TCP segment/UDP User Datagram): Responsible for communication between two processes in the host.
5.Application Layer: Handles issues such as high-level protocols, display issues, encoding, and session control.

extension: OSI seven layer model
 Session layer: manage the session process between hosts, that is, establish, manage, and terminate sessions.
Presentation layer: The main user deals with the presentation, such as encoding, of exchanging information between two communication systems.
Application layer: Provides the interface between the system and the user.

3.8 ICMP

Network control message protocol, used to report errors and abnormal conditions to hosts or routers.

3.9 SMTP

The Simple Mail Transfer Protocol specifies two SMTP How information is exchanged between processes.

3.10 ARP

Address Resolution Protocol, the source host is sending the destination host IP before the package, by broadcasting ARP request package, the target host's IP The address maps to MAC address.

3.11 TCP

Provides a connection-oriented, reliable byte stream service.

3.12 HTTP

Hypertext Transfer Protocol. use TCP connection for reliable transmission, HTTP It is a protocol for interaction between client and server.

3.13 What are the layers of the TCP/IP protocol, and what are the functions of each layer?

1.Network interface layer: equivalent to the physical layer in the 7-layer model+data link layer, will receive the IP The packet is sent to the specified physical network.
2.Internet layer: 1.will be generated by the transport layer TCP segment or UDP User datagram encapsulated into packet 2.Choose the right route 3.Error Control 4.flow control 5.congestion control
3.Transport layer: Responsible for communication between two processes in the host.
4.Application Layer: Handles issues such as high-level protocols, display issues, encoding, and session control.

3.14 Try to explain the reasons for using static routing protocols in some scenarios

Static routing application scenarios:
1.The structure of the network itself is extremely simple, and it is sufficient to use static routing
2.For security reasons, static routes are sometimes used.

3.15 TCP/IP

transmission control protocol/Network protocol. It is a protocol family, mainly including the network layer IP protocol and transport layer TCP Protocol composition.

3.16 RIP

It is a routing protocol based on the distance vector algorithm. Use the hop count as a metric. It has low requirements on bandwidth, configuration and management, and is mainly suitable for small-scale networks.
Features: only exchange information with adjacent routers, the information exchanged by routers is all the information currently known by this router, that is, its own routing table, and exchange routing information at fixed time intervals, such as every 30 s. 

3.17 NAT

Network address translation. Realize mutual conversion between private network address and public network address. Hidden from the outside IP address, which makes the entire private network only need one global IP The address can be connected to the Internet, because the private network local IP addresses are reusable, so NAT Great savings IP address consumption.
NAT The basic working principle, when the private network host communicates with the public network host IP Package passed NAT gateway, the IP source in package IP or purpose IP in private IP and NAT the public IP convert between.

3.18 DNS

Domain name resolution protocol, which converts domain names into IP Addresses, mainly recursive and iterative

3.19 FTP

Used to transfer files between arbitrary computers in a heterogeneous network.

3.20 Briefly describe the three-way handshake process and explain why the third handshake is required

1.The client sends a request connection segment to the server, requesting to establish TCP connect.
2.After receiving the request, the server sends back a confirmation message segment, which will not carry data.
3.After receiving the confirmation segment, the client sends the confirmation segment to the server. TCP The connection is established.
In order to ensure that the server can receive the client's information and make a correct response, the first two handshakes are performed
 In order to ensure that the client can receive the information from the server and make a correct response, the last two handshakes are performed

3.21 Comparing the difference between RIP and OSPF

1.RIP Belongs to the distance vector protocol, OSPF Belongs to the link state protocol.
2.RIP Exchange all routing information with neighboring routers, OSPF Exchange adjacent link information with all routers.
3.RIP exchange information on a regular basis, OSPF Only when the link state changes, the routers use flooding to send this information to all routers.
4.RIP "Bad news travels slowly", OSPF The update converges quickly, and there is no such problem.
5.use OSPF,All routers will get a whole network topology, RIP no.
RIP used at the transport layer UDP,is an application layer protocol, OSPF Use directly IP Datagram transmission is a network layer protocol.

3.22 CSMA/CA

Carrier sense multiple access protocol with collision avoidance, broadcast to inform other nodes when sending data, so that other nodes do not send data within a certain period of time, using ACK Signal, reserve the channel to avoid collisions.

3.23 LLC

The Logical Link Control is primarily responsible for the 1.Establish and release logical connections at the data link layer 2.Provides an interface to the network layer.

3.24 OSPF

Based on the link state routing algorithm, using IP,Exchange neighbor node link status with all routers.

3.25 ADSL

belong DSL A kind of technology, also known as asymmetric digital subscriber loop, adopts frequency division multiplexing technology to divide the telephone line into three independent channels of telephone, uplink and downlink, so that users can surf the Internet while making calls.

3.26 DHCP

Dynamic Host Configuration Protocol is a LAN network protocol that uses UDP protocol work, commonly used two ports 67 ( DHCP server),68(DHCP client). DHCP Usually used in LAN environment, the main function is centralized management and distribution IP address to make client dynamic acquisition IP address, GateWay address, DNS Server address and other information, and can improve the utilization rate of the address.

3.27 BGP

BGP is a path vector protocol (interdomain routing protocol) that runs on TCP An autonomous system routing protocol. BGP It is the only protocol designed to handle networks the size of the Internet, and the only protocol that can properly handle multiple connections between unrelated routing domains.

3.28 HTML

Hypertext Markup Language is a marking language, including a series of tags, through which the document format on the network can be unified, and the scattered Internet resources can be connected into a logical whole.

Tags: Software Engineering

Posted by brad_fears on Mon, 05 Dec 2022 00:28:20 +0300