
文档翻译
文章平均质量分 80
亲爱的非洲野猪
现在主要负责一款OCR/表格识别的AI产品,欢迎咨询合作: https://ai.maogoujiaoliuqi.com/picToExcel
展开
-
队列的使用注意点
如果允许内存中的队列不受限制,那么对于许多类别的问题,它可以不受限制地增长,直到它达到灾难性失败的地步,因为它耗尽了内存。无界队列在系统中可能很有用,因为生产者保证不会超过消费者,而且内存是一种宝贵的资源,但是如果这个假设不成立,队列无限制地增长,那么总是存在风险。除了在队列上使用单一的大颗粒锁之外,还需要管理生产者对队列头部的要求,消费者对队列尾部的要求,以及中间节点的存储,这些问题使得并发实现的设计非常复杂。在整个队列上的大颗粒锁的投放和获取操作很容易实现,但对吞吐量来说是一个很大的瓶颈。翻译 2023-01-16 23:08:15 · 366 阅读 · 0 评论 -
CPU缓存行的概念和假共享
当以可预测的方式访问内存时,CPU能够通过预测下一个可能被访问的内存并在后台将其预取到缓存中来隐藏访问主内存的延时成本。当对数组的内容进行迭代时,跨度是可预测的,因此内存将被预取到高速缓存中,使访问效率最大化。然而,像链接列表和树这样的数据结构,其节点在内存中的分布更加广泛,没有可预测的访问步长。这意味着,如果两个变量在同一缓存线中,而它们被不同的线程写入,那么它们就会出现与单个变量相同的写入争夺问题。这样的处理器在处理缓存中的数据和指令时效率极高,但相对而言,当发生缓存缺失时,效率就会大大降低。翻译 2023-01-16 22:38:00 · 339 阅读 · 0 评论 -
并发代码要处理的两个关键点
代码的并发执行是关于两件事,相互排斥和变化的可见性。相互排斥是关于管理对某些资源的争夺性更新。变化的可见性是指控制这些变化何时对其他线程可见。如果你能消除对争夺式更新的需求,就有可能避免对相互排斥的需求。如果你的算法能够保证任何给定的资源只被一个线程修改,那么相互排斥就没有必要了。读取和写入操作要求所有的改变都对其他线程可见。然而,只有争先恐后的写操作需要相互排斥的变化。在任何并发环境中,最昂贵的操作是争夺性的写访问。要让多个线程写到同一个资源,需要复杂而昂贵的协调。通常,这是通过采用某种锁定策略来实现的。翻译 2023-01-05 17:00:40 · 143 阅读 · 0 评论 -
Spring Framework Documentation - core - 1. The IoC Container - 1.4 依赖项[TODO]
1.4. 依赖 DependenciesA typical enterprise application does not consist of a single object (or bean in the Spring parlance). Even the simplest application has a few objects that work together to present what the end-user sees as a coherent application. Thi翻译 2021-09-04 16:56:55 · 666 阅读 · 0 评论 -
Spring Framework Documentation - core - 1. The IoC Container - 1.2容器总览
原文链接:https://docs.spring.io/spring-framework/docs/current/reference/html/core.htmlspring version 5.3.91.2. 容器总览 Container Overvieworg.springframework.context.ApplicationContext 接口代表的是Spring IoC 容器,他负责初始化,配置,装配Bean。容器从配置元数据中获取对象的初始化,配置,装配信息。配置可以..翻译 2021-09-04 15:55:24 · 234 阅读 · 0 评论 -
Spring Framework Documentation - core - 1. The IoC Container - 1.3Bean概述
1.3. Bean OverviewA Spring IoC container manages one or more beans. These beans are created with the configuration metadata that you supply to the container (for example, in the form of XML<bean/>definitions).Within the container itself, these...翻译 2021-09-04 15:31:11 · 1294 阅读 · 0 评论 -
Spring Framework Documentation - core - 1. The IoC Container - 1.1对Spring IoC 和Bean的简明介绍
version 5.3.9This part of the reference documentation covers all the technologies that are absolutely integral to the Spring Framework.Foremost amongst these is the Spring Framework’s Inversion of Control (IoC) container. A thorough treatment of the Sp翻译 2021-08-31 21:19:12 · 244 阅读 · 0 评论 -
Spring Framework Documentation - overview
原文:https://docs.spring.io/spring-framework/docs/current/reference/html/overview.html#overviewspring version :5.3.9Spring makes it easy to create Java enterprise applications. It provides everything you need to embrace the Java language in an enterpris.翻译 2021-08-30 20:58:13 · 235 阅读 · 0 评论 -
Spring Data JDBC - Reference Documentation
Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronica...翻译 2021-08-30 20:44:59 · 3711 阅读 · 0 评论 -
MySQL 参数配置 key_buffer_size
key_buffer_size Command-Line Format --key-buffer-size=# System Variable key_buffer_size Scope Global Dynamic Yes Type Integer Default Value 8388608 Minimum Value 8 Maximum Value (64-bit platforms) ..翻译 2021-08-22 11:31:40 · 1170 阅读 · 0 评论 -
MySQL 参数配置 table_open_cache
table_open_cache Command-Line Format --table-open-cache=# System Variable table_open_cache Scope Global Dynamic Yes Type Integer Default Value 2000 Minimum Value 1 Maximum Value 524288 The numbe..翻译 2021-08-22 11:28:39 · 515 阅读 · 0 评论