顯示具有 系統 標籤的文章。 顯示所有文章
顯示具有 系統 標籤的文章。 顯示所有文章

2014年11月28日 星期五

The Intel Microprocessors筆記

第一章    Introduction to The Microprocessor And Computer
8086->80286->80386->80486->Pentium->Pentium II->Pentium III->Pentium 4->Intel Core 2 Duo->Core i5
L1 Cache
Figure 1-11
-7AE2=851D+0001=851E
單倍精single-precision
Binary  Normalized  Sign  Biased Exponent Mantissa
1100   1.1*2^3      0      10000010  10000000 00000000 00000000

Exp = 7F+3 = 111111+11=10000010

2014年11月5日 星期三

subversion使用

sudo svnadmin create /svn/repo/myfile

sudo chown -R www-data /svn/repo/myfile

sudo chgrp -R www-data /svn/repo/myfile

cd /svn/repo/myfile/conf

修改vim svnserv.conf


svn co htttp://127.0.0.1/svn/myfile

//input user name passwd


svn add file
svn commit -m "2014???"


2014年10月17日 星期五

nVidia gamework opengl samples build error

./../../../extensions/externals/lib/linux64/libglfw3.a(x11_gamma.c.o): In function `_glfwInitGammaRamp':
x11_gamma.c:(.text+0x49): undefined reference to `XRRGetScreenResources'
====================================================
linux ubuntu 14.04
  1. cd /usr/bin/
  2. sudo rm ld
  3. sudo ln -s ld.gold ld

2014年10月14日 星期二

安裝jre

1. 從http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
下載jre runtime
2. cp -r jre-7u67-linux-x64.tar.gz /usr/local/java/
3. cd /usr/local/java
4. sudo tar xvzf jre-7u67-linux-x64.tar.gz
5. cd ~
6. sudo vim .profile
7. 加上
JAVA_HOME=/usr/local/java/jre1.7.0_67
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
7. source .profile
8. java -version

2013年3月24日 星期日

Compiler(1)


第一章

Programming languages are notations for describing computations to people
and to machines.
It first must be translated into a form in which it can be executed by a computer.
The software systems that do this translation are called compilers.

a compiler is a program that can read a program in one lan­
guage - the source language - and translate it into an equivalent program in
another language - the target language.


f we open up this box
a little, we see that there are two parts to this mapping: analysis and synthesis .The analysis part
is often called the front end of the compiler; the synthesis part is the back end. 

2013年2月2日 星期六

作業系統(3)


第三章 Process Concept

Current-day computer systems allow multiple programs to be loaded into memory and executed concurrently. This evolution required firmer control amd more compartmentalization of various programs;and these needs resulted in the notion of a process, which is a program in execution. A process is the unit of work in modern time-sharing system.

A process is more than the program code, which is sometimes known as the text section. It also includes the current activity, as represented by the value of the program counter and the contents of processor's registers. A process generally also includes the process stack and a data section, which contains global variables. A process may also include a heap, which is memory that is dynamically allocated during process run time.

As a process executes, it changes state: The state of a process is defined in part by the current activity of that process.

1.New – The process is being created.
2.Running – Instructions are being  executed.
3.Waiting – The process is waiting for some event to occur.
4.Ready – The process is waiting to be assigned to a processor.
5.Terminated – The process has finished execution.

Each process is represented in the operating system by a process control block(PCB) – also called a task control block.
1. Process state
2. Program counter
3. CPU registers
4. CPU-scheduling information
5. Memory-management information
6. Accounting information  – the amount of CPU and real time used, time limits, account numbers, job or process numbers, and so on.
7. I/O status information.


The operating system must select, for scheduling purposes, processes from these queues in some fashion. The selection process is carried out by the appropriate scheduler.


A socket is defined as an endpoint for communication. A pair of processes communicating over a network employ a pair of sockets.
The RPC(Remote Procedure Calls) was designed as a way to abstract the procedure-call mechanism for use between systems with network connections.

2013年1月29日 星期二

作業系統(2)


第二章 System Structures

An operating System provides the environment within which programs are executed.

User interface. Almost all operating systems have a user interface(UI). The interface cam take several forms. One is DTrace Command-line interface(CLI), which uses text commands and a method for entering them.

Another is a batch interface, in which commands and directives to control those commands are entered into files, and those files are executed.

Most commonly, a graphical user interface(GUI) is used. Here, the interface is a window system with a pointing device and direct I/O, choose from menus, and make selections and a keyboard to enter text.

On systems with multiple command interpreters to choose from, the interpreters are known as shells.

System calls provide an interface to the services made available by an operating system.

System programs, also known as system utilities, provide a convinient environment for program development and execution.

The kernel has a set of core components and links in additional services either during boot time or during run time. Such a strategy uses dynamically loadable modules and is common in modern implementations of UNIX.

Seven types of loadable kernel modules
1. Scheduling classes
2. File systems
3. Loadable system calls
4. Executable formats
5. STREAMS modules
6. Miscellaneous
7. Device and bus drivers.

2013年1月26日 星期六

作業系統(1)


第一章 Introduction

An operating systen is a program that manages the computer hardware.
The hardware—the central processing unit(CPU), the memory, and the input/ouput(I/O) devices – provides the basic computers resources for the system.

The application programs—such as word processors, spreadsheets, compiler, and Web browsers—define the ways in which these resources are used to solve users' computing problems.

The operating system controls the hardware and coordinate its use among various application programs fir the various users.

A more common definition, and the one that we usually follow, is that the operating system is the one program running at all times on the computer—usually called the kernel.

Softeare may trigger an interrupt by executing a special operation called a system call.

On a single-processor system, there is one main CPU capable of excuting a general-purpose instuction set, including instructions from user processes.

Multiprocessor systems(also known as parallel systems or tightly coupled systems) are growing in importance. Such systems have two or more processors inclose communication, sharingthe computer bus and sometimes the clock, memory, and peripheral devices.

A trap (or an exception) is software-generated interrupt caused either by an error(for example, division by zero or invalid memory access) or by a specific request from a user program that an operating-system service be performed.

User mode amd kernel mode(also called supervisor mode, system mode, or privileged mode). A bit, called the mode bit, is added to the hardware of the computer to indicate the current mode : kernel(0) or user(1).

Embedded systems almost always run real-time operating system. A real-time system is used when rigid time requirements have been placed on the operation of a processor or the flow of data.


The operating system is responsible for the following activities in connection with process management

i)Scheduling processes and threads on the CPUs
ii)Creating and deleting both user and system processes
iii)Suspending and resuming processes
iv)Providing mechanisms for process synchronization
v)Proving mechanisms for process communication.