Monday, June 15, 2009

Saturday, June 13, 2009

cache memory

Figure shows three levels of cache and introduces the nomenclature we will use in the remainder of the document. L1d is the level 1 data cache, L1i the level 1 instruction cache, etc. Note that this is a schematic; the data flow in reality need not pass through any of the higher-level caches on the way from the core to the main memory. CPU designers have a lot of freedom designing the interfaces of the caches. For programmers these design choices are invisible.

In addition we have processors which have multiple cores and each core can have multiple “threads”. The difference between a core and a thread is that separate cores have separate copies of (almost {Early multi-core processors even had separate 2nd level caches and no 3rd level cache.}) all the hardware resources. The cores can run completely independently unless they are using the same resources—e.g., the connections to the outside—at the same time. Threads, on the other hand, share almost all of the processor's resources. Intel's implementation of threads has only separate registers for the threads and even that is limited, some registers are shared.

Thursday, June 11, 2009

operating system



The most important program that runs on a computer. Every general-purpose computer must have an operating system to run other programs. Operating systems perform basic tasks, such as recognizing input from thekeyboard, sendingoutput to the display screen, keeping track offiles and directories on thedisk, and controllingperiperal devices such as disk drives and printers.

For large systems, the operating system has even greater responsibilities and powers. It is like a traffic cop -- it makes sure that different programs and user running at the same time do not interfere with each other. The operating system is also responsible for security, ensuring that unauthorized users do not access the system.

Operating systems can be classified as follows:

  • multi-user: Allows two or more users to run programs at the same time. Some operating systems permit hundreds or even thousands of concurrent users.
  • multiprocessing: Supportsrunning a program on more than one CPU
  • multitasking: Allows more than one program to run concurrently.
  • multithreading: Allows different parts of a single program to run concurrently.
  • real time: Responds to input instantly. General-purpose operating systems, such asDOS andUNIX, are not real-time.
  • Operating systems provide a software platformon top of which other programs, called applicationprograms,can run. The application programs must be written to run on top of a particular operating system. Your choice of operating system, therefore, determines to a great extent the applications you can run. For PCs, the most popular operating systems are DOS, OS/2, and Windows, but others are available, such as Linux.

    As a user, you normally interact with the operating system through a set of commands. For example, the DOS operating system contains commands such as COPY and RENAME for copying files and changing the namesof files, respectively. The commands are accepted and executed by a part of the operating system called thecommand processor or command line interpreter. graphical user interfaceallow you to enter commands by pointing and clicking at objectsthat appear on the screen.