notes for mordern operating system









=-=============================================================

The kernels may have to copy the packets to their own memory both on output and on input, for example, to avoid page faults while transmitting over the network.
Also, the receiving kernel probably does not know where to put incoming packets until it has had a chance to examine them.

输出和输入方向同时需要拷贝,防止缺页异常,缺页异常很磨蹭阿

===========================================================

1 some CPU is idle and needs to access the shared ready list to pick a process to run. If the ready list is locked,

2 if some thread on a CPU needs to access the file system buffer cache and it is currently locked,

两种情况很不同啊

=========================================================

there is no alternative for the requesting CPU to just waiting.

alternative .... to--------针对...的替代或者其他选择

=============================================================

Although the protocol is somewhat complicated (to avoid having two CPUs attach themselves to the end of the list simultaneously),

复杂的算法防止两个cpu同时挂接到链上

=====================================================

At first glance, it might appear that the presence of caching should eliminate the problem of bus contention, but it does not. In theory, once the requesting CPU has read the lock word, it should get a copy in its cache. As long as no other CPU attempts to use the lock, the requesting CPU should be able to run out of (get the lock value from its cache)its cache. When the CPU owning the lock writes a 1 to it to release it(write the lock to release it), the cache protocol automatically invalidates all copies of it in remote caches, requiring the correct value to be fetched again


第一,run out of 用在此处明显有歧义,有人翻译成耗尽,用完,有人理解成从...中取得,何不直接使用get out of the lock from 更加明确呢?
第二,如果其他cpu试图使用lock的话(试图使用lock就会首先将cache invalidated,因为获取lock的动作就是write操作),可能使requesting cpu的cache invalidated,当然此处requestin cpu自旋也会使其他cpu的cache invalidated,因为只要获取lock这个操作就含有write操作,所以最好其他cpu不要来获取lock了,让requesting cpu自己独享吧,不跟他争抢了
其实,如果你对cache熟悉的话,cache dirty和cache invalited很细节得差异很复杂,但从大方面来说,本地cpu write操作,导致其他cpu cache invalidated是没什么大问题的e、
  
第三,write a 1 to it to release it修改成 write the lock to relesse it即可,意思明确,没有含糊的字面意义


http://www.cc.gatech.edu/classes/AY2010/cs4210_fall/papers/anderson-spinlock.pdf

=======================================================

http://www.ehomesh.com/htmls/project/detail_xyi.asp


=========================================================================================

皇后问题,是一个古老而著名的问题,是 回溯算法的典型例题。该问题是十九世纪著名的数学家 高斯1850年提出:在8X8格的 国际象棋上摆放八个 皇后,使其不能互相攻击,即任意两个皇后都不能处于同一行、同一列或同一斜线上,问有多少种摆法。 高斯认为有76种方案。1854年在 柏林的象棋杂志上不同的作者发表了40种不同的解,后来有人用图论的方法解出92种结果。计算机发明后,有多种方法可以解决此问题。

============================================================================================

Of course, once the usage frequencies of the movies are known, it may be possible to move some of them to balance the load by hand.

手动调整影片的存放达到在磁盘之间平衡负责的作用

=============================================================================================

In addition, striping  large blocks over multiple drives (discussed below) is possible, whereas striping individual frames over multiple drives is not.

striping individual frames over multiple drives----------无法提高performance

块传输和/帧传输,跟同步传输和异步传输类似,主要区别就是传输的单位不同

=======================================================================================

Ideally, this run of blocks should not cross a disk track boundary, but with head skew, the loss is not serious.

http://alasir.com/books/hards/032-034.html

Most controllers today are capable of transferring data at a 1:1 sectorinterleave. This is especially true of controllers that are built in to IDE andSCSI drives. With a 1:1 interleave controller, the maximum data transfer ratecan be maintained when reading and writing sectors to the disk. Although itwould seem that there is no other way to further improve efficiency and thetransfer rate, many people overlook two important factors that are similar tointerleave:head andcylinder skewing.

When a drive is reading (or writing) data sequentially, first all of thesectors on a given track are read; then the drive must electronically switch tothe next head in the cylinder to continue the operation. If the sectors are notskewed from head to head within the cylinder, no delay occurs after the lastsector on one track and before the arrival of the first sector on the nexttrack. Because all drives require some time (although a small amount) to switchfrom one head to another, and because the controller also adds some overhead tothe operation, it is likely that by the time the drive is ready to read thesectors on the newly selected track, the first sector will already have passedby. By skewing the sectors from one head to another — that is, rotatingtheir arrangement on the track so that the arrival of the first sector isdelayed relative to the preceding track — you can ensure that no extradisk revolutions will be required when switching heads. This method providesthe highest possible transfer rate when head switching is involved.

In a similar fashion, it takes considerable time for the heads to move fromone cylinder to another. If the sectors on one cylinder were not skewed fromthose on the preceding adjacent cylinder, it is likely that by the time theheads arrive, the first sector will already have passed below them, requiringan additional revolution of the disk before reading of the new cylinder canbegin. By skewing the sectors from one cylinder to the next, you can accountfor the cylinder-to-cylinder head-movement time and prevent any additionalrevolutions of the drive.


 -k sector 0 skew, per track
	     Used to describe perturbations in the media format to compensate
	     for a slow controller.  Track skew is the offset of sector 0 on
	     track N relative to sector 0 on track N-1 on the same cylinder.
	     This option is of historical importance only; modern controllers
	     are always fast enough to handle operations back-to-back.

     -l hardware sector interleave
	     Used to describe perturbations in the media format to compensate
	     for a slow controller.  Interleave is physical sector interleave
	     on each track, specified as the denominator of the ratio:
		   sectors read/sectors passed over
	     Thus an interleave of 1/1 implies contiguous layout, while 1/2
	     implies logical sector 0 is separated by one sector from logical
	     sector 1.	This option is of historical importance only; the
	     physical sector layout of modern disks is not visible from out-
	     side.

=============================================================

The only concern is that if a transmission buffer is being filled in little bursts, the buffer is completely full by the deadline so it can be sent to the user in a single operation. Otherwise jitter might be introduced

假设传送buffer正在以小速率装填,假如在限期之前能完成装满,就可以只需一个操作发送给用户。否则(被优先级高得进程抢占,原进程在deadline之前完不成任务)会产生抖动。

=============================================================

especially if the user is planning a trip to the kitchen to locate, microwave, cook, and eat a frozen pizza (especially an extra large).

一连串的动作只为一个pizza

===================================================

The best that can be done is upon returning from the kitchen, to drop back to a streamthat started later, thereby repeating a few minutes of material.


=================================================

单声道/stereo的联系和区别?

http://ilovesiemens.blog.sohu.com/131855611.html

http://www.mcsquared.com/mono-stereo.htm

===============================================

substantial compression is needed to make transmission over the Internet practical.--------make ... practical

================================================

A macroblock is encoded by searching the previous frame for it or something only slightly different from it.

=================================================

but the macroblocks containing the person will be offset in position by some unknown amount and will have to be tracked down.

-----根据宏块的定义,如果某个场景下,背景不变,人物在走动,那么含有人物的宏块在位置上是存在位置偏移的

======================================================================

For example, an implementation might search for a macroblock at the current position in the previous frame, and all other positions offset +Av in the x direction and ±Ay in
the y direction.---------如何搜索"宏块"的算法,在上一帧的相同位置和+-x/+-y的范围内搜索

=========================================================================

The DV (Digital Video) system used by digital camcorders uses only a JPEG-like scheme because encoding has to be done in real time and it is much faster to just encode each frame separately---------需要实时的进行编码,只进行JPEG编码会更加迅速

=====================================================================

何谓空间冗余?

JPEG压缩技术是通过分析每一帧的空间冗余而人手的,所谓空间冗余是指亮度和色度在其中没有任何变化的区域.通过降低核内的空间冗余(所谓的核内编码),JPEG标准获得了高达50:1的无任何图像质量下降的压缩比

相关的像素所携带的信息中存在着冗余这通常称为空间冗余.对每秒钟显示25幅图像的视频信号而言前后相邻的图像之间一般也具有很强的相似性即表现为在时间上的冗余

空间冗余是指同一波段空间相邻像素具有相关性,而谱间冗余是指具有相同空间位置而处于不同波段像素间具有相关性,相关性强弱在很大程度上取决于光谱分辨率

这种冗余是由在同一图像中画面的空间相似性形成的所以称为空间冗余.

======================================================================

### Linux Kernel 5.4.34 Information The Linux kernel version 5.4.34 is a stable release that includes numerous improvements, bug fixes, and security patches over previous versions within the 5.x series[^1]. This particular iteration focuses on enhancing stability while addressing critical issues identified since the initial rollout of this long-term support (LTS) branch. #### Release Notes Highlights Key updates introduced in Linux kernel 5.4.34 encompass: - Enhanced driver compatibility for various hardware components. - Performance optimizations across multiple subsystems including networking stack enhancements. - Security vulnerability mitigations ensuring safer operations against potential threats. - Miscellaneous bug corrections impacting overall reliability and user experience positively. For detailed technical changes, one can refer to the official changelog provided by maintainers which documents each modification meticulously from commit messages submitted during development cycles leading up to final compilation into an officially supported build. #### Download Instructions To obtain the source code package associated with Linux kernel 5.4.34 directly from canonical repositories or mirrors maintained globally, users may follow these instructions tailored specifically towards acquiring verified archives suitable for compiling custom kernels as well as applying necessary configurations according to individual requirements: ```bash wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.34.tar.xz tar -xf linux-5.4.34.tar.xz cd linux-5.4.34/ make menuconfig # Customize configuration options here if needed before proceeding further ``` After preparing desired settings through `menuconfig`, continue building process using preferred methods documented extensively elsewhere regarding best practices when dealing with low-level operating system constructs like those found inside modern Unix-like environments such as GNU/Linux distributions today.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值