JAVA NIO ÖÐÎÄ1
If the requested address is not a valid virtual memory address (it doesn't belong to any of
the memory segments of the executing process), the page cannot be validated, and
a segmentation fault is generated. This vectors control to another part of the kernel and
usually results in the process being killed.
Èç¹û±»ÇëÇóµÄµØÖ·²»ÊÇÒ»¸öÓÐЧÐéÄâÄÚ´æµØÖ·£¨Ëü²»ÊôÓÚÈκε±Ç°½ø³ÌµÄÄÚ´æ¶ÎÖУ©£¬ÔòÒ³²»Äܱ»È·ÈÏ£¬Ò»¸ö¶Î´íÎó»á±»Éú³É¡£¿ØÖÆ»á±»×ªÒÆµ½Äں˵ıðµÄ²¿·Ö£¬³£³£µ¼Ö½ø³Ì±»É±ËÀ
Once the faulted page has been made valid, the MMU is updated to establish the new virtualto-
physical mapping (and if necessary, break the mapping of the stolen page), and the user
process is allowed to resume. The process causing the page fault will not be aware of any of
this; it all happens transparently.
Ò»µ©Ò³´íÎó±»È·ÈÏÓÐЧ£¬MMU¾Í»á¸üУ¬°ÑеÄÐéÄâ-ÎïÀíÓ³Éä¼ûÁËÆðÀ´£¨Èç¹û±ØÐ룬°Ñ±»ÍµµÄÒ³ÃæµÄÓ³Éäµ·»Ù£©£¬È»ºóÓû§½ø³Ì¾Í±»ÔÊÐí¼ÌÐøÁË¡£µ¼ÖÂÁËÒ³´íÎóµÄ½ø³Ì¶Ô´ËÒ»ÎÞËùÖª£¬¶ÔËü¶øÑÔÕâЩÊÇ͸Ã÷µÄ¡£
This dynamic shuffling of memory pages based on usage is known as demand paging. Some
sophisticated algorithms exist in the kernel to optimize this process and to prevent thrashing, a
pathological condition in which paging demands become so great that nothing else can get
done.
Õâ¸ö¶¯Ì¬»ùÓÚʹÓõÄÄÚ´æ²½·¨±»³Æ×÷°´Ðè·ÖÒ³¡£ÄÚºËÖÐһЩÀϵ½µÄËã·¨»áÓÅ»¯Õâ¸ö¹ý³Ì·ÀֹŹ´ò£¨Ì«±¯²ÒÁË£¬ÏµÍ³³ÌÐòÔ±ÈÕ×Ó°µÎÞÌìÈÕ°¡£©
£¬Ö¸Ò»¸öÎÞ·¨¿ØÖƵÄÇé¿öÏ£¬Ò³ÇëÇó±äµÃÌ«´óÒÔÖÁÓÚ¿¨ËÀÁË¡£
1.4.4 File I/O
File I/O occurs within the context of a filesystem. A filesystem is a very different thing from a
disk. Disks store data in sectors, which are usually 512 bytes each. They are hardware devices
that know nothing about the semantics of files. They simply provide a number of slots where
data can be stored. In this respect, the sectors of a disk are similar to memory pages; all are of
uniform size and are addressable as a large array.
1.4.4 Îļþ I/O
ÎļþI/O·¢ÉúÔÚÎļþϵͳÉÏÏÂÎÄÖС£Ò»¸öÎļþϵͳºÍ´ÅÅÌÊǷdz£²»Ò»ÑùµÄ¶«¶«¡£´ÅÅ̰ÑÊý¾Ý´æÔÚÉ
Ïà¹ØÎĵµ£º
һЩÆóÒµÔÚÕÐÆ¸³ÌÐòÔ±µÄʱºò£¬×Ü»áÌØÒâÌá³öÒ»¸öÒªÇ󣬼´ÒªÇó¾ßÓÐÁ¼ºÃµÄ±àÂë¹æ·¶¡£È·ÊµÏÖÔÚ³ÌÐò¿ª·¢ÈËÔ±ÒѾ²»ÔÚÊǵ¥Ç¹Æ¥ÂíµÄµ¥¸É£¬¶øÊǽ²¾¿ÍÅÌå×÷Õ½¡£´Ëʱ¾ÍÒªÇóÍŶÓÄڵijËÔ±¶¼¿ÉÄܹ»ã¡ÊØ´úÂëµÄ±àд¹æ·¶£¬Õâ¶ÔÓÚ³ËÔ±Ö®¼ä¹²Ïí´úÂë¡¢ÅÅ´íµÈ×÷Òµ¶¼¾ßÓзdz£ÏÖʵµÄÒâÒå¡£ÕâÔÚJavaÓïÑÔÖе±È»Ò²²»ÀýÍâ¡£±ÊÕß½èÕâ´Î»ú»á£¬¾Í¸ú´ó¼Ò·Ö ......
À´Ô´£ºhttp://www.blogjava.net/lcs868/archive/2008/12/16/246644.html
ÓÃjavaʵÏÖ¶Ô´¿ÕæIPÊý¾Ý¿âµÄ²éѯ£¬Ê×Ïȵ½ÍøÉÏÏÂÔØQQwry.daÎļþ£¬¶ÁÈ¡´úÂëÈçÏ£º
1.IP¼Ç¼ʵÌåÀà package com.guess.tools; /** *
* Ò»ÌõIP·¶Î§¼Ç¼£¬²»½ö°üÀ¨¹ú¼ÒºÍÇøÓò£¬ ......
ÏîÄ¿ÖÐÄã²»µÃ²»ÖªµÄ11¸öJavaµÚÈý·½Àà¿â
ÔðÈα༣ºñûÀï×÷ÕߣºJavaeye 2009-11-02 À´Ô´£ºIT168ÍøÕ¾
Îı¾Tag£º ITÒµ½ç Java Java¿ª·¢¹¤¾ß
¡¡¡¡¡¾IT168 ÆÀÂÛ¡¿JavaµÚÈý·½library ecosystemÊÇÒ»¸öºÜ¹ãÀ«µÄ·¶³ë¡£²»¾ÃǰÓÐÈË׫ÎÄ£ºÃ¿¸öÏîÄ¿ÖУ¬Äã±ØÐëÖªµÀµÄ11¸öJavaµÚÈý·½Àà¿â¡£
¡¡¡¡µ¥Ôª²âÊÔ
¡¡¡¡ ......
import java.io.File;
/**
* @description <p>java ·¾¶</p>
* @author swandragon
* @date Nov 5, 2009
*/
public class FilePath{
/**
* ¿ª·¢Öв»ÒªÊ¹ÓÃSystem.getProperty("user.dir")»ñÈ¡µ±Ç°Óû§Ä¿Â¼µÄÏà¶Ô·¾¶
* Ò²¾¡¿ÉÄܲ»ÒªÊ¹Óþø¶Ô·¾¶£¬Ê¹Óþø¶Ô·¾¶Ê±¿ÉÒÔÔÚÅäÖÃÎļþÖÐ ......
ÎÄ˼ÐÅÏ¢¼¼ÊõÓÐÏÞ¹«Ë¾www.vanceinfo.com£¨Å¦½»ËùÉÏÊдúÂ룺VIT£©³ÉÁ¢ÓÚ1995Ä꣬ÊÇÒ»¼ÒÐÅÏ¢¼¼Êõ·þÎñÌṩÉ̼°ÔÚÖйú¾ÓÁìÏȵØÎ»µÄÀë°¶Èí¼þ¿ª·¢¹«Ë¾Ö®Ò»¡£ÎÄ˼ÊǵÚÒ»¼ÒÔÚŦԼ¹ÉƱ½»Ò×ËùÉÏÊеÄÖйúÈí¼þ·þÎñÍâ°üÆóÒµ¡£¾Ý¹ú¼ÊÊý¾Ý¹«Ë¾(IDC)µÄͳ¼Æ, ÒÔ2007ÄêÏúÊÛ¶îºâÁ¿, ÎÄ˼ÐÅÏ¢¼¼ÊõÔÚΪŷÃÀÊг¡ÌṩÀë°¶Èí¼þ¿ª·¢ÐÐÒµÖÐλ¾ÓÖйúµÚÒ ......