Face collection

operating system

1. Process and Thread

  1. A process can have multiple threads, and threads depend on the existence of the process
  2. The process has an independent memory unit, and multiple threads share the memory unit (code segment, data segment, extended segment (heap)) of the process, and the thread is unique: the stack segment.
  3. The process is the smallest unit of resource allocation, and the thread is the smallest unit of CPU scheduling.
  4. System overhead: The process switching overhead is much greater than the thread switching overhead. (When a process is created or cancelled, the system must allocate or reclaim resources, such as memory space, I/O devices, etc., threads only need to save and set the contents of a few registers.)'
  5. Thread communication is easy, and inter-process communication requires synchronization and mutual exclusion.
    Insert picture description here

2. Inter-process communication method:

  1. pipeline
  2. System IPC (message queue, semaphore, shared memory)
  3. Socket socket

3. Communication between threads

  1. Critical section
  2. Mutex
  3. signal
  4. Event (signal)
    Insert picture description here

computer network

1. HTTP header structure

Request message:
Insert picture description hereInsert picture description here

Response message
Insert picture description hereInsert picture description here

2. The difference between HTTP HTTPS

Insert picture description here

3. HTTP status code

1xx: Prompt message
2xx: Success
3xx: Redirect
4xx: Client error
5xx: Server error
Insert picture description here

4. The difference between GET and POST

get: request resource
post: submit resource

Algorithm question

  1. Symmetric Binary Tree
  2. Spiral matrix
  3. Use rand()% 5 to generate the function of rand()% 7.
  4. A string of length N deletes K characters, making the lexicographical maximum (monotonic stack)
  5. Linked list sorting (merge sort, there is also a non-recursive unanswered up).

Reference

2021 Autumn Recruitment Faced by
Niuke.com Operating System Knowledge
Knowing Interview Sharing (Faced by)
Meituan Backstage Development (one side)

Guess you like

Origin blog.csdn.net/weixin_43154149/article/details/113833570