baiduwangpan1
码龄11年
关注
提问 私信
  • 博客:6,970
    社区:457
    7,427
    总访问量
  • 16
    原创
  • 1,400,092
    排名
  • 1
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:北京市
  • 加入CSDN时间: 2014-07-14
博客简介:

baiduwangpan1的博客

查看详细资料
个人成就
  • 获得2次点赞
  • 内容获得1次评论
  • 获得2次收藏
创作历程
  • 4篇
    2020年
  • 3篇
    2019年
  • 14篇
    2016年
成就勋章
TA的专栏
  • java并发编程艺术
    2篇
  • 并发编程学习
    4篇
  • PAT
    8篇
  • A+B-Format
  • codeup
    1篇
  • ccf
    2篇
  • spring映射学习一
    2篇
  • spring注解
    1篇
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

Java并发编程艺术---java并发编程机制的底层实现原理

2.1volatile的应用volatile是轻量级的synchronized,它在多处理器开发中保证了变量的“可见性”。由于使用volatile不会引起线程的上下文切换,所以如果使用得当,会比synchronized的使用和执行成本更低。2.1.1volatile的定义与实现原理对volatile修饰的变量进行反编译的时候,可以看到会有一个lock前缀的指令,这个指令在多核处理器下回做如下两件事情:(1)将当前处理器缓存行的数据写回到系统内存。(2)这个写回内存的操作会使在其他CPU里缓存了该内
原创
发布博客 2020.05.13 ·
197 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

JAVA并发编程的艺术---第一章:并发编程的挑战

1.1上下文切换从人物保存到再加载的过程就是一次上下文切换1.1.1 多线程一定快吗答案是不一定的,当并发执行累加操作不查过百万次时,速度会比串行执行累加操作要慢。为什么并发执行速度会比串行慢?这是因为线程有创建和上下文切换的开销。可是使用Lmbench3测试上下文切换的时长。使用vmstat可以测量上下文切换的次数。1.1.3如何减少上下文切换无锁并发编程CAS算法使用最少线程协程:在单线程里实现多任务的调度,并在单线程里维持多个任务间的切换。1.1.4减少上下文切换实战通过减少
原创
发布博客 2020.05.12 ·
210 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

并发编程学习第二章

(1)无状态对象永远是线程安全的。(2)竞争条件:检查再运行,使用一个潜在的过期值作为决定下一步操作的依据。(3)检查再运行的常见手法:惰性初始化。惰性初始化中的竞争条件会破坏其正确性。...
原创
发布博客 2020.04.24 ·
171 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

并发编程学习第一章

第一章线程的风险相关名词解释:(1)活跃度:安全意味着“什么坏事都没有发生”,而活跃度关注的是“好事情最终发生了”。当一个活动进入到某种它永远无法再继续执行的状态时活跃度失败就发生了。(2)远程方法调用:RMI使你能够调用在另外一个JVM上运行的对象的方法。...
原创
发布博客 2020.04.23 ·
143 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

spring注解

https://www.cnblogs.com/liaojie970/p/7879917.html
转载
发布博客 2019.05.09 ·
117 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Spring—请求映射之URL路径映射

https://www.cnblogs.com/Jsonlu/p/4849183.htmlSpring2.5引入注解式处理器支持,通过@Controller 和 @RequestMapping注解定义我们的处理器类。并且提供了一组强大的注解:需要通过处理器映射DefaultAnnotationHandlerMapping和处理器适配器AnnotationMethodHandlerAdapt...
转载
发布博客 2019.05.09 ·
1628 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

@ResponseBody 和 @RequestBody 的作用(转)

@ResponseBody 和 @RequestBody 的作用(转)链接:https://www.cnblogs.com/daimajun/p/7152970.html图片: 带尺寸的图片: 居中的图片: 居中并且带尺寸的图片: 当然,我们为了让用户更加便捷,我们增加了图片拖拽功能。如何插入一段漂亮的代码片去博客设置页面,选择一款你喜欢的代码片高亮样式,下面展示同样高亮的 代码片...
转载
发布博客 2019.05.09 ·
100 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PAT B1003

#include <iostream>#include<stdio.h>#include<cstring>using namespace std;char s[11][110];int main(){ int n; scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%s",s[i]); }
原创
发布博客 2016.03.22 ·
270 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

C++函数重定义、重载、重写

C++函数重定义、重载、重写重写 (override):父类与子类之间的多态性。子类重新定义父类中有相同名称和参数的虚函数。1) 被重写的函数不能是 static 的。必须是 virtual 的 ( 即函数在最原始的基类中被声明为 virtual ) 。2) 重写函数必须有相同的类型,名称和参数列表 (即相同的函数原型)3) 重写函数的访问修饰符可以不同。尽管 virtual 是 private
转载
发布博客 2016.03.08 ·
283 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

PATB1019

#include <iostream>#include<stdio.h>#include<algorithm>using namespace std;int main(){ int n,t[4],m,a,f; scanf("%d",&n); do { f=n; for(int i=3;i>=0;i--) {
原创
发布博客 2016.03.04 ·
412 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PATB1023

#include <iostream>#include <stdio.h>using namespace std;int main(){ int a[10]; for(int i=0;i<10;i++) { scanf("%d",&a[i]); } if(a[0]!=0){ for(int i=1;;i++) {
原创
发布博客 2016.02.25 ·
348 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PATB1020

#include <iostream>#include<stdio.h>#include<algorithm>using namespace std;struct yuebing{ double sum1; double sum2; double d;}y[1010];bool cmp( yuebing a,yuebing b){ if(a.d!=b.d
原创
发布博客 2016.02.25 ·
307 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

ccf201403-2窗口

#include <iostream>#include<cstdio>using namespace std;int main(){ int xy[10][5],dj[10][2]; bool s=false; int n,m,x,y,t1,t2,t3,t4,t5; scanf("%d%d",&n,&m); for(int i=0;i<n;i++)
原创
发布博客 2016.02.18 ·
451 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

图像旋转ccf

#include <iostream>#include <cstdio>using namespace std;int a[1010][1010];int main(){ int n,m; scanf("%d%d",&n,&m); for(int i=0;i<n;i++) { for(int j=0;j<m;j++) s
原创
发布博客 2016.02.17 ·
352 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PATB1009

!PATB1009(http://img.blog.csdn.net/20160216184105416)#include <iostream>#include<stdio.h>using namespace std;int main(){ char a[90][90]; int mun=0; while(scanf("%s",a[mun])!=EOF) {
翻译
发布博客 2016.02.16 ·
376 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

codeup5901 回文串

#include <iostream>#include <stdio.h>#include <string.h>using namespace std;int main(){ int n; bool b=0; char a[256]; scanf("%s",a); n=strlen(a); for(int i=0;i<n/2;i++)
原创
发布博客 2016.02.16 ·
232 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PAT B1036

#include <stdio.h>#include<cmath>using namespace std;int main(){ double n; char a; scanf("%lf %c",&n,&a); for(int i=0;i<n;i++) { printf("%c",a); } printf("
");
原创
发布博客 2016.02.14 ·
269 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

冒泡排序

#include<stdio.h>#include<iostream>#include<string.h>using namespace std;int main(){ int a[10],t; bool b; for(int i=0;i<10;i++) { scanf("%d",&a[i]); } for(int i=0;i<
原创
发布博客 2016.02.03 ·
201 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

codeup

#include <iostream>#include<stdio.h>#include<math.h>using namespace std;int main(){ double a,b,c,r1,r2,d=4.0; scanf("%lf%lf%lf",&a,&b,&c); d=b*b-d*a*c; d=sqrt(d); r1=(-b+d)/(2*
原创
发布博客 2016.01.31 ·
472 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1002. A+B for Polynomials (25)

#include<iostream>#include<malloc.h>#include<iomanip>using namespace std;typedef struct node{ int e; double c; struct node *next;}link;int main(){ int k1,k2,count,e1; double c
原创
发布博客 2016.01.27 ·
216 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多