Feeds:
Posts
Comments

解密Offer Letter:每一项和每个数字都意义重大

Offer Letter should conclude the following key parts:

  1. Base Salary: 这与你的学历、经历以及能力等综合因素息息相关
  2. Bonus: Offer Letter上面会列出基本的比例系数,比如10%,也就是说奖金的基本值就是你底薪的10%,然后根据公司和个人每年Performance的状况,由 公司来决定每年(或半年)度的奖金系数。公式是: 个人年度奖金 = 个人底薪x基本奖金系数x Performance系数。年景有好坏之分,但公司通常的奖金系数范围还是比较固定的,特别是对于有些底薪不高的公司,往往以高于同侪的奖金来吸引人 才。作为参考,奖金高的能达到年薪的45%以上,低的甚至没有
  3. Sign-on Bonus: 通常在签约后一个月左右发放,数量从几千到数万美元不等。需要说明的是,这种签约奖金一般都是有年限规定的,也就是签约者必须在该公司工作满一定的时间, 比如一年或两年。 如果不到期满就另择他就的话,则需要根据剩下时间段所占的比例来退还给公司
  4. Stock:
  • RSU(Restricted Stock Unit): 这也就是国内常说的“干股”。即公司将股票作为礼物赠送给你,个人不需要任何资金的投入,而最后的收益是所有这些股票的市场价值,公式是: RSU收益 = RSU配股数x股票卖出时市场价。要注意的是,RSU通常是逐年发放的, 比如一共是一千股的RSU,可能会以每年250股的配额,分四年时间来发到你的个人帐户, 如果提前跳槽,剩下的RSU就拿不到了。此外,股价有涨有跌,什么时候卖出股票就需要自己take care了,这也影响了最终的RSU收益
  • Option: 也就是常说的股票期权。和RSU不同的是,依据公司配给Option时的市场价,最后的收益为这些股票卖出时市场价和配股时市场价的差,公式 为:Option收益 = Option配股数x (股票卖出时市场价-股票配给时市场价)。和RSU一样,Option也是逐年配给的,也不需要任何个人资金的投入。唯一的区别是,收益是前后两次的股票 价格差,当股票市场价格低于配入时价格时,收益为零
  • ESPP(Employee Stock Purchase Plan): 员工股票购买计划。即在美国的公司员工,可以以低于市场价的价格购买本公司股票,通常是以一季度为期,取三个月的首日以及最后一天的股价,两者间取较低值为基准,再加上15%的折扣,作为配给员工的ESPP股价,而配给的股数上限一般是员工季度工资的10%。与RSU以及Option相同的是,ESPP也需要个人及时关注并卖出;不同的是,ESPP需要个人资金的投入,自负盈亏的色彩更明显

3D technology……

3D technology basis

There are lots of ways to achieve a 3D display. Most of them are based on simple principal – display a different image to each eye, and so create the illusion of a 3D image.

Generally, there are following 3D implementation:

  1. In the old days(Anaglyph 3D)

Probably the easiest way to make 3D images is to separate the right and left image using colors. The image has two color “layers”, and you separate the layers using glasses that has blue/red lenses (or cellophane paper, in the cheapest glasses). This is called Anaglyph 3D, it’s cheap and easy to do as you don’t need a new TV and the glasses are very cheap. The problem is that you lose colors in the image. It simply looks bad.

 

 

 

 

 

 

 

  1. Polarized(Passive 3D)

A Polarized 3D uses a polarizing filter on the image so the left and right images each has a different polarization. You use passive glasses that filter the right image for each eye. This technique is popular in the cinemas using two synchronized projectors. Making a polarized 3D LCD panel is not easy as the LCD already has a polarizing filter, and you lose half the resolution, but it is possible. LG for example seems to be better on polarized LCDs as their leading 3D technology. One of the advantages of passive glasses is that they are very cheap.

 

 

 

 

 

 

 

 

 

  1. Shutter 3D(active)

The new breed of 3D TVs and projectors make use of a simple idea – you display images for the left and right eye alternatively – once the image for the left eye, and once for the right. Now all you have to do is wear glasses that block each eye in sync with the display, and you get 3D. Active Shutter 3D glasses main advantage is that the image looks great – just as they look in 2D on the same display.

Active-3D is costly, though. The display must refresh the screen fast enough – at least 60Hz for each eye, which means 120Hz for the display itself. The glasses are also expensive (over $100 usually) – they have to include 2 LCDs, and batteries. And you also has to synchronize the display to the glasses (usually using Infra-red).

In short – you must get a new TV (or projector) that supports active-shutter glasses. It is projected that within a few years, most TVs on the market will support this new 3D technology, and most TV makers (including Sony, Samsung, LG, Toshiba, JVC and Panasonic) have already selling high-end models that are 3D-enabled.

 

 

 

 

 

 

 

  1. No-glass 3D(Auto-Stereoscopic)

Auto-Stereoscopic displays display different pixels to each eye, using optics (lenses or barriers) to direct the correct pixels to each eye. The nice part is that you don’t need to wear any glasses to experience the 3D image! But there are many problems with these new kinds of technologies. Basically there is just one location you can be in order to view the 3D correctly (just one viewpoint). You can add more viewpoints, but each viewpoint actually requires two ‘dedicated display’. This means that if you want 10 places from which you can view the 3D, you need to be able to produce 20 sets of displays – that’s a lot of pixels. Another issue is that the display is always in 3D. You can’t view a 2D image. There are some solutions to that, too (for example Sharp is using 2 sets of LCD layers – one for 3D and one for 2D, and you can turn off the one you do not want to use).

These technologies are starting to appear now commercially, but don’t hold your breath for a 3D TV for home use that will not require glasses – it will probably take a few years as the technology is very costly currently, is usually limited in the number of ‘viewpoints’ it provides and the quality isn’t as good as polarized or active-shutter 3D…

To be continued……

Definition:

EGL is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system.

It mainly handles the following tasks in Graphics System:

  • Graphics context management
  • surface/buffer binding
  • rendering synchronization
  • enabling “high performance, accelerated, mixed-mode 2D and 3D rendering using Khronos APIs”

EGL replaces GLX/AGL/WGL with a platform independent implementation.

Procedures to use EGL to render:

  1. Get EGLDisplay Object
  2. Initialize the connection with EGLDisplay Object
  3. Get EGLConfig Object
  4. Create EGLContext instance
  5. Create EGLSurface instance
  6. Connect EGLContext and EGLSurface
  7. Use GL command to render
  8. Disconnect and release EGLSurface connected with EGLContext
  9. Delete EGLSurface
  10. Delete EGLContext
  11. Disconnect EGLDisplay

Double Buffering

Computer Graphics Double Buffering

In Computer Graphics, double buffering is a technique for drawing graphics that shows no flicker/tearing, etc.

To update a page of text, it is much easier to clear the entire page and then draw the letter than to somehow erase all the pixels that are not in both the old and new letters. However, this intermediate image is seen by the user as flickering. In addition, computer monitor redraw the visible video page, so even a perfect update should be visible momentarily as a horizontal divider between the new image and the old image, known as tearing.

A software implementation of double buffering has all drawing operations store their results in some region of system RAM.and such region is called a back buffer.

When all drawing operations are considered complete, the whole region is copied into the video RAM(called front buffer).

This copying is usually synchronized with the monitor’s raster beam in order to avoid tearing. Double buffering necessarily requires more video memory and CPU times

for the date copying.

Page Flipping

Instead of copying the data, both buffers are capable of being displayed(both allocated in Video RAM). At any one time, one buffer is being displayed and the other is being drawn.

When drawing is completed, the roles of the two buffer are switched.

Page flipping is much faster than copying the data and can guarantee that tearing will not be seen as long as the pages flipping during the monitor’s vertical blank period when no video data

is being drawn. The currently active buffer is called front buffer and the background page is called the back buffer.

Protected mode

Definition:

80386+ provides many new features to overcome the deficiencies of 8086 which has almost no support for memory protection, virtual memory, multitasking or memory about 640K and still remain compatible with the 8086 family. The 386 has all the features of the 8086 and 286, with many enhancements. As in the earlier processors, there is the real mode, like 286, 386 can operate in protected mode, however, the protected mode on 386 is vastly different internally.Protected mode is not to protect your program, instead, it is to protect everyone else from your program.

Addressing:

Protected mode and real mode don’t seem to be very different. They all use memory segmentation, interrupts and device drivers to handle the hardware.

Real mode addressing

Memory is organized by 64K segments at least 16 bytes apart. Segmentation is handled through the use of an internal mechanism in conjunction with segment registers.

The contents of these segment registers(CS, DS, SS…) form part of the physical address that the CPU places on the bus address. The physical address is generated by multiplying the segment register by 16 and then add 16 bit offset. It is this 16 bit offset that limits us to 64K segments.

 

 

 

 

 

 

 
 
 
 
 
Protected Mode addressing

Segmentation is defined via a set of tables called descriptor tables.The segment registers contain pointers into these tables, there are two types of tables used to define memory segmentation:

GDT(Global Descriptor Table) and LDT(Local Descriptor Table).

The GDT contains the basic descriptors that all applications can access. In real mode, one segment is 64K big followed by the next in a 16 byte distance. In protected mode, we can have a segment as big as 4Gb and we can put it wherever we want. The LDT contains segmentation information specific to a task or program.

As OS could set up a GDT with its system descriptors and for each task an LDT with appropriate descriptors. Each descriptor is 8 bytes long. The format shows as the following figure:

Each time a segment register is loaded, the base address is fetched from the appropriate table entry. The contents of the descriptor is stored in a programmer invisible register called shadow registers so that future references to the same segment can use this information instead of reference the table each time. The physical address is formed by adding the 16 or 32 bit offsets to the base address in the shadow register.

We also have another table called interrupt descriptor table or the IDT. The IDT contains the interrupt descriptors. These are used to tell the processor where to find the interrupt handler.

CPU Modes

CPU modes are operating mode for the CPU of some computer architecture that places restrictions on the type and scope of operations that can be performed by certain processes being run by the CPU. This design allows the OS to run with more privileges than application software.

 

 

 

 

 

 

 

 

system calls which need switch between user and kernel space take time and can hurt the performance of a computing system,it is not common to allow time-critical software to run with full kernel privileges.

Any CPU architecture supporting protected execution will offer two distinct operating mode:

  1. Kernel mode (ring 0)
  2. User mode (ring 3)

The hardware is aware of the current ring of the executing instruction thread at all time, thanks to special machine register.

The purpose of distinct operating modes for the CPU is to provide hardware protection against accidental or deliberate corruption of the system environment by software.

Only “trusted” portions of system software are allowed to execute in the unrestricted environment of kernel mode.

All other software executes in one or more user modes.

Microkernel OS attempt to minimize the amount of code running in privileged mode.

ProcCreateWindow

ProcCreateWindow() extracts the fields of the xCreateWindowReq request sent by the client to use them as arguments for a CreateWindow() call:

pWin = CreateWindow(stuff->wid, pParent, stuff->x, stuff->y, stuff->width, stuff->height, …, (XID *)&stuff[1], …) Continue Reading »