- linux -- 内存管理 -- 虚拟内存的管理
三境界
嵌入式Linux操作系统linux
虚拟内存的管理32位处理器的寻址能力为2^32B,即4GB大小的地址空间,这部分空间称为虚拟地址空间。使用MMU作虚拟地址空间到物理地址空间的映射。操作系统必须建立页表,来支持MMU执行此操作。linux内核将4GB的虚拟地址空间分为两大块:顶部的1GB空间给内核使用,称为内核空间底部的3GB空间给用户空间使用,称为用户空间。(PAGE_OFFSET宏即为虚拟地址空间中内核部分的起始地址)内核虚拟
- 内存管理之页转换 virt_to_page
山羊哥-老宋
操作系统linux内存管理
3项技术:mmap系统调用可以实现将设备内存映射到用户进程的地址空间。使用get_user_pages,可以把用户空间内存映射到内核中。DMA的I/O操作,使得外设具有直接访问系统内存的能力。kernel5.8.11/arch/x86/include/asm/page.h#ifndef__va#define__va(x)((void*)((unsignedlong)(x)+PAGE_OFFSET)
- CPU实战知识--问答
yaoming168
Linux学习linux
CPU实战知识1.ARM64处理器中有两个页表基地址寄存器TTBR0和TTBR1,处理器如何使用它们?2.请简述ARM64处理器的4级页表的映射过程,假设页面粒度为4KB,地址宽度为48位。3.在L0~L2页表项描述符中,如何判断一个页表项是块类型还是页表类型?4.在ARM64Linux内核中,用户空间和内核空间是如何划分的?5.在ARM64Linux内核中,PAGE_OFFSET表示什么意思?6
- Linux内存管理中对PAGE_OFFSET的理解
艾特号
#Linux内存与存储linux内存结构内核
Linux简化了分段机制,使得虚拟地址与线性地址总是一致,因此,Linux的虚拟地址空间也为0~4G。Linux内核将这4G字节的空间分为两部分。将最高的1G字节(从虚拟地址0xC0000000到0xFFFFFFFF),供内核使用,称为"内核空间".而将较低的3G字节(从虚拟地址0x00000000到0xBFFFFFFF),供各个进程使用,称为"用户空间")。因为每个进程可以通过系统调用进入内核,
- linux 内存管理
我要暴富
linux运维服务器
用户空间与内核空间人间还是仙界?聊一聊linux系统的用户空间和内核空间以32位Linux系统为例,虚拟地址的大小是4GB(0x0000_0000~0xffff_ffff)。Linux用户空间和内核空间的大小可以通过设置宏PAGE_OFFSET来配置,默认PAGE_OFFSET=0xc000_0000。当PAGE_OFFSET=0xc000_0000时用户空间为0-3G,内核空间为3-4G。应用进
- malloc kmalloc vmlloc 的区别
郄郄郄
对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间。区别如下:1、kmalloc和vmalloc是
- linux 内存管理(10)- phys_to_virt/virt_to_phys
Hacker_Albert
linux内存管理
了解phys_to_virt/virt_to_phys1.概述 对于提供了MMU的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。进程的4GB内存空间被人为的分为两个部分:用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间。 内核空间中,从3G到vmalloc_start
- kmalloc、get_free_page、vmalloc的区别(根据自己的理解总结了一下)
bdwht2008
对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间。如下图所示:内核空间中,从3G到vmalloc
- Linux设备驱动编程之内存与I/O操作
zhoujunyi
Linux编程
对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间,如下图:内核空间中,从3G到vmalloc_s
- EEPROM连续写多个字节函数接口
datacw
ARM/STM32
EEPROM连续写多个字节函数接口voidee_24c256_writebytes(u16write_addr,char*pwrite_buff,u16writebytes){u8write_len,page_offset;while(writebytes>0){page_offset=EE_PAGESIZE-(write_addr%EE_PAGESIZE);/*EE_PAGESIZE为页大小,如
- linux中kmalloc和vmalloc的使用
iteye_3759
kmalloc和get_free_page申请的内存位于物理内存映射区域,而且在物理上也是连续的,它们与真实的物理地址只有一个固定的偏移,因此存在较简单的转换关系,virt_to_phys()可以实现内核虚拟地址转化为物理地址:#define__pa(x)((unsignedlong)(x)-PAGE_OFFSET)externinlineunsignedlongvirt_to_phys(vola
- Linux 内存管理机制
weixin_34162629
1.内存空间布局:对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间。内核空间中,从3G到vmal
- 嵌入式Linux移植之内存初始化和地址映射
漂洋过海blog
嵌入式Linux
Linux内核有两个重要的宏:PHYS_OFFSET和PAGE_OFFSET。PHYS_OFFSET是物理内存的起始地址,PAGE_OFFSET是Linux内核空间的虚拟起始地址(默认为0xC0000000,可通过menuconfig配置,CONFIG_PAGE_OFFSET)。PHYS_OFFSET可通过menuconfig配置(CONFIG_PHYS_OFFSET),但一般不直接配置。如果定义
- 内核线程
fxssnowshuang
内核线程的真正含义是:内核线程没有独立的地址空间,地址空间的mm域为空NULL,他们没有用户上下文。《linux内核设计与实现30页、250页》。内核线程只运行于内核空间,它只能使用大于PAGE_OFFSET[3G]的地址空间:0x'FFFF000-0XFFFFFFFF。可以通过ps-ef查看内核线程。内核线程接口:1:kthread_create():创建内核线程注意:创建完线程一定要用IS_E
- linux内核虚拟内存之高端物理内存与非连续内存分配
coolice87
linux内核
1、高端物理内存在第一章已经讲过,在usr/kernel为3:1的情况下,在一台32位的体系结构上最多只有896MB的内存可以直接访问,而超过部分就只能通过映射后进行访问。而64位机器有足够多的虚拟地址空间,就不会存在这个问题。结合第一章线性空间布局,内核空间映射情况如下(以本系统为例):直接内存映射区:PAGE_OFFSET~PAGE_OFFSET+highmem(最大0~896M):0xc00
- Linux设备驱动编程之内存与I/O操作
dong_shi_bo_
Linux
对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间,如下图:内核空间中,从3G到vmalloc_s
- 比较kmalloc/vmalloc/get_free_pages
vc66vcc
对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间。内核空间中,从3G到vmalloc_start
- powerpc e500系列,linux初始化的tlb汇编,添加人肉代码注释
linux
powerpc e500的内核启动,关于tlb的初始化可以说是重头戏。看懂这段代码后,powerpc的虚实映射基本不在话下。
这段初始化tlb要考虑的,主要是将boot可能初始化过的tlb全清零,然后自己建立一套PAGE_OFFSET的虚实映射,即为0xc打头的地址
建立映射。
inux kernel 3.10.7将这段初始化代码,全部放到fsl_booke_entry_mapping.S里
- 临时2级页表的初始化过程 head_32.S 相关代码解释
head
page_pde_offset = (__PAGE_OFFSET >> 20); /* __PAGE_OFFSET是0xc0000000,page_pde_offset = 3072 = 0xc00,是页目录中的偏移 */
36
37 movl $(pg0 - __PAGE_OFFSET), %edi
- LINUX 内核代码备忘录
linux
1.
swapper_pg_dir : Global Page Directory (全局页目录,即最顶层页目录,PGD) 的地址
pgd_index(addr): 宏函数,返回PGD包含的项中,地址字段 值为addr的项的索引。
PAGE_OFFSET:宏函数,返回进程地址空间(线性地址)中kernel所属的地址空间的起始地址,x86_32下是0xc0000000
PAGE_SIZE:宏
- Linux设备驱动编程之 内存与I/O操作
linux
对于提供了MMU(存储管理器,辅助操作系统进行内存管理,提供虚实地址转换等硬件支持)的处理器而言,Linux提供了复杂的存储管理系统,使得进程所能访问的内存达到4GB。
进程的4GB内存空间被人为的分为两个部分--用户空间与内核空间。用户空间地址分布从0到3GB(PAGE_OFFSET,在0x86中它等于0xC0000000),3GB到4GB为内核空间,如下图:
- Linux 物理内存和虚拟内存设置(zt)
linux
使用内核源代码中的定义 PHYS_OFFSET:系统内存的物理起始地址,板级相关,在include/asm-arm/arch-xxx/memory.h中 PAGE_OFFSET:系统内存的虚拟起始地址,体系结构相关,为0xC0000000,在include/asm-arm/memory.h中 MEM_SIZE:系统内存大小,如果板级(include/asm-arm/arch-xxx/xxx.
- About TEXTADDR, ZTEXTADDR, PAGE_OFFSET etc
text
About TEXTADDR, ZTEXTADDR, PAGE_OFFSET etc
Initial definitions ------------------- The following symbol definitions rely on you knowing the translation that __virt_to_phys() does for your mac
- 内核线程&&系统调用exit&&wait4&&撤销进程
u012681083
在linux中,内核线程在以下几个方面运行:内核线程只运行在内核态,普通进程可以运行于内核态和用户态内核线程用大于page_offset的线性地址,普通进程可以用所有的创建内核线程kernel_thread()函数创建一个新的内核线程;fn所要执行的内核函数的地址fn,要传递给函数的参数arg,一组clone标志/*
*Createakernelthread
*/
intkernel_thread
- 用户级线程和内核级线程
tonylau_hnu
linux内核
一、关于用户空间以及内核空间的介绍Linux为内核代码和数据结构预留了几个页框。这些页永远不会被转出到磁盘上。从0x0到0xc0000000(PAGE_OFFSET)的线性地址可由用户代码和内核代码进行引用。从0xc0000000(PAGE_OFFSET)到0xffffffff的线性地址只能由内核代码进行访问。内核代码及其数据结构都必须位于这1GB的地址空间中,但是对于此地址空间而言,更大的消费者
- 内核中的内存申请
xhh4u
linux程序虚拟内存处理器管理系统
在内核模块中申请分配内存需要使用内核中的专用API:kmalloc、vmalloc、kzalloc、kcalloc、get_free_pages;当然,设备驱动程序也不例外;对于提供了MMU功能的处理器而言,Linux提供了复杂的内存管理系统,使得进程所能访问到的地址空间可以达到4GB;而这4GB的空间又被划分为两个部分:0GB~3GB(PAGE_OFFSET,x86中的值是0xC0000000)
- 3.4.2 特定于体系结构的设置 (四):内存备选划分、虚拟地址空间的划分
xiangpingli
物理地址的备选划分将虚拟地址空间按3:1划分不是唯一的选项。由于所有边界在源代码中定义为常数,因此选择一种不同的划分很方便。在某些场合可能最好将地址空间对称划分,2GB用于用户地址空间,2GB用于内核地址空间。那么__PAGE_OFFSET必须设置为0x80000000,而不是通常的默认值0xC0000000。如果系统执行的任务需要将大量的内存用于内核,而几乎没有多少内存用于用户进程,对称划分可能
- kmap的实现分析与实验
michaelcao1980
kmap/unkmap系统调用是用来映射高端物理内存页到内核地址空间的api函数,他们分配的内核虚拟地址范围属于[PKMAP_BASE,PAGE_OFFSET]即[0xbfe00000,0xc0000000]范围,大小是2M的虚拟空间,为了映射该块虚拟地址,所使用的二级页表的大小刚好是一个物理page的总计是两个ptetable(4KB)kmap的调用流程分析:arch/arm/mm/highme
- Linux内存管理 - PAGE_OFFSET理解
vonzhoufz
PAGE_OFFSET
Linux内存管理-PAGE_OFFSET理解 PAGE_OFFSET代表的是内核空间和用户空间对虚拟地址空间的划分,对不同的体系结构不同。比如在32位系统中3G-4G属于内核使用的内存空间,所以 PAGE_OFFSET = 0xC0000000。在X86-64架构下是ffff880000000000。可以看到内核程序可以可以访问从PAGE_OFFSET之后的内存,访问所有的信息(注意页的写保
- Linux 物理内存和虚拟内存设置(zt)
哭你吃完
linux内存
使用内核源代码中的定义 PHYS_OFFSET:系统内存的物理起始地址,板级相关,在include/asm-arm/arch-xxx/memory.h中 PAGE_OFFSET:系统内存的虚拟起始地址,体系结构相关,为0xC0000000,在include/asm-arm/memory.h中 MEM_SIZE:系统内存大小,如果板级(include/asm-arm/arch-xxx/xxx.h)没
- html页面js获取参数值
0624chenhong
html
1.js获取参数值js
function GetQueryString(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = windo
- MongoDB 在多线程高并发下的问题
BigCat2013
mongodbDB高并发重复数据
最近项目用到 MongoDB , 主要是一些读取数据及改状态位的操作. 因为是结合了最近流行的 Storm进行大数据的分析处理,并将分析结果插入Vertica数据库,所以在多线程高并发的情境下, 会发现 Vertica 数据库中有部分重复的数据. 这到底是什么原因导致的呢?笔者开始也是一筹莫 展,重复去看 MongoDB 的 API , 终于有了新发现 :
com.mongodb.DB 这个类有
- c++ 用类模版实现链表(c++语言程序设计第四版示例代码)
CrazyMizzz
数据结构C++
#include<iostream>
#include<cassert>
using namespace std;
template<class T>
class Node
{
private:
Node<T> * next;
public:
T data;
- 最近情况
麦田的设计者
感慨考试生活
在五月黄梅天的岁月里,一年两次的软考又要开始了。到目前为止,我已经考了多达三次的软考,最后的结果就是通过了初级考试(程序员)。人啊,就是不满足,考了初级就希望考中级,于是,这学期我就报考了中级,明天就要考试。感觉机会不大,期待奇迹发生吧。这个学期忙于练车,写项目,反正最后是一团糟。后天还要考试科目二。这个星期真的是很艰难的一周,希望能快点度过。
- linux系统中用pkill踢出在线登录用户
被触发
linux
由于linux服务器允许多用户登录,公司很多人知道密码,工作造成一定的障碍所以需要有时踢出指定的用户
1/#who 查出当前有那些终端登录(用 w 命令更详细)
# who
root pts/0 2010-10-28 09:36 (192
- 仿QQ聊天第二版
肆无忌惮_
qq
在第一版之上的改进内容:
第一版链接:
http://479001499.iteye.com/admin/blogs/2100893
用map存起来号码对应的聊天窗口对象,解决私聊的时候所有消息发到一个窗口的问题.
增加ViewInfo类,这个是信息预览的窗口,如果是自己的信息,则可以进行编辑.
信息修改后上传至服务器再告诉所有用户,自己的窗口
- java读取配置文件
知了ing
1,java读取.properties配置文件
InputStream in;
try {
in = test.class.getClassLoader().getResourceAsStream("config/ipnetOracle.properties");//配置文件的路径
Properties p = new Properties()
- __attribute__ 你知多少?
矮蛋蛋
C++gcc
原文地址:
http://www.cnblogs.com/astwish/p/3460618.html
GNU C 的一大特色就是__attribute__ 机制。__attribute__ 可以设置函数属性(Function Attribute )、变量属性(Variable Attribute )和类型属性(Type Attribute )。
__attribute__ 书写特征是:
- jsoup使用笔记
alleni123
java爬虫JSoup
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.7.3</version>
</dependency>
2014/08/28
今天遇到这种形式,
- JAVA中的集合 Collectio 和Map的简单使用及方法
百合不是茶
listmapset
List ,set ,map的使用方法和区别
java容器类类库的用途是保存对象,并将其分为两个概念:
Collection集合:一个独立的序列,这些序列都服从一条或多条规则;List必须按顺序保存元素 ,set不能重复元素;Queue按照排队规则来确定对象产生的顺序(通常与他们被插入的
- 杀LINUX的JOB进程
bijian1013
linuxunix
今天发现数据库一个JOB一直在执行,都执行了好几个小时还在执行,所以想办法给删除掉
系统环境:
ORACLE 10G
Linux操作系统
操作步骤如下:
第一步.查询出来那个job在运行,找个对应的SID字段
select * from dba_jobs_running--找到job对应的sid
&n
- Spring AOP详解
bijian1013
javaspringAOP
最近项目中遇到了以下几点需求,仔细思考之后,觉得采用AOP来解决。一方面是为了以更加灵活的方式来解决问题,另一方面是借此机会深入学习Spring AOP相关的内容。例如,以下需求不用AOP肯定也能解决,至于是否牵强附会,仁者见仁智者见智。
1.对部分函数的调用进行日志记录,用于观察特定问题在运行过程中的函数调用
- [Gson六]Gson类型适配器(TypeAdapter)
bit1129
Adapter
TypeAdapter的使用动机
Gson在序列化和反序列化时,默认情况下,是按照POJO类的字段属性名和JSON串键进行一一映射匹配,然后把JSON串的键对应的值转换成POJO相同字段对应的值,反之亦然,在这个过程中有一个JSON串Key对应的Value和对象之间如何转换(序列化/反序列化)的问题。
以Date为例,在序列化和反序列化时,Gson默认使用java.
- 【spark八十七】给定Driver Program, 如何判断哪些代码在Driver运行,哪些代码在Worker上执行
bit1129
driver
Driver Program是用户编写的提交给Spark集群执行的application,它包含两部分
作为驱动: Driver与Master、Worker协作完成application进程的启动、DAG划分、计算任务封装、计算任务分发到各个计算节点(Worker)、计算资源的分配等。
计算逻辑本身,当计算任务在Worker执行时,执行计算逻辑完成application的计算任务
- nginx 经验总结
ronin47
nginx 总结
深感nginx的强大,只学了皮毛,把学下的记录。
获取Header 信息,一般是以$http_XX(XX是小写)
获取body,通过接口,再展开,根据K取V
获取uri,以$arg_XX
&n
- 轩辕互动-1.求三个整数中第二大的数2.整型数组的平衡点
bylijinnan
数组
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class ExoWeb {
public static void main(String[] args) {
ExoWeb ew=new ExoWeb();
System.out.pri
- Netty源码学习-Java-NIO-Reactor
bylijinnan
java多线程netty
Netty里面采用了NIO-based Reactor Pattern
了解这个模式对学习Netty非常有帮助
参考以下两篇文章:
http://jeewanthad.blogspot.com/2013/02/reactor-pattern-explained-part-1.html
http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf
- AOP通俗理解
cngolon
springAOP
1.我所知道的aop 初看aop,上来就是一大堆术语,而且还有个拉风的名字,面向切面编程,都说是OOP的一种有益补充等等。一下子让你不知所措,心想着:怪不得很多人都和 我说aop多难多难。当我看进去以后,我才发现:它就是一些java基础上的朴实无华的应用,包括ioc,包括许许多多这样的名词,都是万变不离其宗而 已。 2.为什么用aop&nb
- cursor variable 实例
ctrain
variable
create or replace procedure proc_test01
as
type emp_row is record(
empno emp.empno%type,
ename emp.ename%type,
job emp.job%type,
mgr emp.mgr%type,
hiberdate emp.hiredate%type,
sal emp.sal%t
- shell报bash: service: command not found解决方法
daizj
linuxshellservicejps
今天在执行一个脚本时,本来是想在脚本中启动hdfs和hive等程序,可以在执行到service hive-server start等启动服务的命令时会报错,最终解决方法记录一下:
脚本报错如下:
./olap_quick_intall.sh: line 57: service: command not found
./olap_quick_intall.sh: line 59
- 40个迹象表明你还是PHP菜鸟
dcj3sjt126com
设计模式PHP正则表达式oop
你是PHP菜鸟,如果你:1. 不会利用如phpDoc 这样的工具来恰当地注释你的代码2. 对优秀的集成开发环境如Zend Studio 或Eclipse PDT 视而不见3. 从未用过任何形式的版本控制系统,如Subclipse4. 不采用某种编码与命名标准 ,以及通用约定,不能在项目开发周期里贯彻落实5. 不使用统一开发方式6. 不转换(或)也不验证某些输入或SQL查询串(译注:参考PHP相关函
- Android逐帧动画的实现
dcj3sjt126com
android
一、代码实现:
private ImageView iv;
private AnimationDrawable ad;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout
- java远程调用linux的命令或者脚本
eksliang
linuxganymed-ssh2
转载请出自出处:
http://eksliang.iteye.com/blog/2105862
Java通过SSH2协议执行远程Shell脚本(ganymed-ssh2-build210.jar)
使用步骤如下:
1.导包
官网下载:
http://www.ganymed.ethz.ch/ssh2/
ma
- adb端口被占用问题
gqdy365
adb
最近重新安装的电脑,配置了新环境,老是出现:
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
百度了一下,说是端口被占用,我开个eclipse,然后打开cmd,就提示这个,很烦人。
一个比较彻底的解决办法就是修改
- ASP.NET使用FileUpload上传文件
hvt
.netC#hovertreeasp.netwebform
前台代码:
<asp:FileUpload ID="fuKeleyi" runat="server" />
<asp:Button ID="BtnUp" runat="server" onclick="BtnUp_Click" Text="上 传" />
- 代码之谜(四)- 浮点数(从惊讶到思考)
justjavac
浮点数精度代码之谜IEEE
在『代码之谜』系列的前几篇文章中,很多次出现了浮点数。 浮点数在很多编程语言中被称为简单数据类型,其实,浮点数比起那些复杂数据类型(比如字符串)来说, 一点都不简单。
单单是说明 IEEE浮点数 就可以写一本书了,我将用几篇博文来简单的说说我所理解的浮点数,算是抛砖引玉吧。 一次面试
记得多年前我招聘 Java 程序员时的一次关于浮点数、二分法、编码的面试, 多年以后,他已经称为了一名很出色的
- 数据结构随记_1
lx.asymmetric
数据结构笔记
第一章
1.数据结构包括数据的
逻辑结构、数据的物理/存储结构和数据的逻辑关系这三个方面的内容。 2.数据的存储结构可用四种基本的存储方法表示,它们分别是
顺序存储、链式存储 、索引存储 和 散列存储。 3.数据运算最常用的有五种,分别是
查找/检索、排序、插入、删除、修改。 4.算法主要有以下五个特性:
输入、输出、可行性、确定性和有穷性。 5.算法分析的
- linux的会话和进程组
网络接口
linux
会话: 一个或多个进程组。起于用户登录,终止于用户退出。此期间所有进程都属于这个会话期。会话首进程:调用setsid创建会话的进程1.规定组长进程不能调用setsid,因为调用setsid后,调用进程会成为新的进程组的组长进程.如何保证? 先调用fork,然后终止父进程,此时由于子进程的进程组ID为父进程的进程组ID,而子进程的ID是重新分配的,所以保证子进程不会是进程组长,从而子进程可以调用se
- 二维数组 元素的连续求解
1140566087
二维数组ACM
import java.util.HashMap;
public class Title {
public static void main(String[] args){
f();
}
// 二位数组的应用
//12、二维数组中,哪一行或哪一列的连续存放的0的个数最多,是几个0。注意,是“连续”。
public static void f(){
- 也谈什么时候Java比C++快
windshome
javaC++
刚打开iteye就看到这个标题“Java什么时候比C++快”,觉得很好笑。
你要比,就比同等水平的基础上的相比,笨蛋写得C代码和C++代码,去和高手写的Java代码比效率,有什么意义呢?
我是写密码算法的,深刻知道算法C和C++实现和Java实现之间的效率差,甚至也比对过C代码和汇编代码的效率差,计算机是个死的东西,再怎么优化,Java也就是和C