JP2005044363A - Device and method for simultaneously processing two or more threads - Google Patents

Device and method for simultaneously processing two or more threads Download PDF

Info

Publication number
JP2005044363A
JP2005044363A JP2004214506A JP2004214506A JP2005044363A JP 2005044363 A JP2005044363 A JP 2005044363A JP 2004214506 A JP2004214506 A JP 2004214506A JP 2004214506 A JP2004214506 A JP 2004214506A JP 2005044363 A JP2005044363 A JP 2005044363A
Authority
JP
Japan
Prior art keywords
memory
thread
microprocessor
address
threads
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004214506A
Other languages
Japanese (ja)
Inventor
Min-Su Kim
金▲ミン▼修
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020030050123A external-priority patent/KR100591755B1/en
Application filed by Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Publication of JP2005044363A publication Critical patent/JP2005044363A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microprocessor. <P>SOLUTION: This application is characterized by that a memory space independent of respective threads in a process is allocated when a virtual memory is allocated to the process by this microprocessor. Independent allocation of a process memory space and a thread memory space to the process has effect capable of preventing problems of conflict of memories among the threads and protection of a program can be prevented, and particularly capable of relieving effort applied to memory management in programming by a programmer. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は電子回路装置に関するものであって、さらに詳細には、マイクロプロセッサに関するものである。   The present invention relates to electronic circuit devices, and more particularly to microprocessors.

マイクロプロセッサはマイクロチップを備えるコンピュータプロセッサであり、論理チップとも呼ばれる。マイクロプロセッサは、コンピュータがオンすると、すぐに動作する一種の“エンジン”である。マイクロプロセッサはレジスタと呼ばれる非常に小さな記憶素子を利用して算術及び論理演算を実行するように設計されている。マイクロプロセッサの代表的な演算には、足し算、引き算、二つの数の比較、及びある場所から他の場所に数字を移すことなどが含まれる。このような演算はマイクロプロセッサの設計の一部分である命令セットの実行結果である。コンピュータが作動されると、マイクロプロセッサは基本入出力システム、すなわち、BIOSの一番目の命令(コマンド)を自動に実行するように設計されており、その後、BIOSやOSまたはアプリケーション・プログラムが実行する命令を提供することによってマイクロプロセッサが動作する。
半導体のプロセス技術の発達に伴って、単位面積あたりに実現することができるトランジスタの個数が幾何級数的に増加した。これによって、チップ上に実現された回路は徐々に複雑になっている。マイクロプロセッサ分野でも、このような現象が生じ、マイクロプロセッサも徐々にさらに複雑な構造になっている。
A microprocessor is a computer processor comprising a microchip and is also called a logic chip. A microprocessor is a type of “engine” that runs as soon as the computer is turned on. Microprocessors are designed to perform arithmetic and logical operations using very small storage elements called registers. Typical microprocessor operations include addition, subtraction, comparison of two numbers, and moving numbers from one place to another. Such operations are the result of executing an instruction set that is part of the microprocessor design. When the computer is activated, the microprocessor is designed to automatically execute the basic input / output system, ie, the first instruction (command) of the BIOS, which is then executed by the BIOS, OS, or application program. The microprocessor operates by providing instructions.
With the development of semiconductor process technology, the number of transistors that can be realized per unit area has increased geometrically. This gradually complicates the circuit implemented on the chip. Such a phenomenon also occurs in the microprocessor field, and the microprocessor is gradually becoming a more complicated structure.

マイクロプロセッサで処理するデータの量の増加によって、その処理速度もマイクロプロセッサの重要な性能要因になっている。マイクロプロセッサの処理速度を向上させるために様々な方法が研究されている。5ステージパイプライン(5 stage pipeline)、スーパスケーラ(super scaler)、仮想メモリアドレス(virtual memmory address)、内部キャッシュ(internal−cache)などがマイクロプロセッサの処理速度を向上させるための技術である。特に、最近では、一つのCPUに二つの以上のプログラム、すなわち、二つの以上のプロセスを性能の低下なしに実行しようとするSMT(simultaneous−multi−thread)技術がマイクロプロセッサの処理速度を向上させるための技術として利用される。   As the amount of data processed by the microprocessor increases, the processing speed also becomes an important performance factor of the microprocessor. Various methods have been studied to improve the processing speed of the microprocessor. A 5-stage pipeline, a super scaler, a virtual memory address, an internal cache, and the like are techniques for improving the processing speed of the microprocessor. In particular, recently, the SMT (simultaneous-multi-thread) technology that attempts to execute two or more programs, that is, two or more processes, on a single CPU without performance degradation improves the processing speed of the microprocessor. Used as a technology for

多くのマイクロプロセッサはメモリを効率的に使用するために、仮想のメモリ空間及び仮想のメモリアドレスを有する。仮想メモリを支援するマイクロプロセッサで仮想メモリアドレスと物理メモリアドレスは異なる意味を有する。仮想メモリアドレスはプログラムまたはプログラマが参照するアドレス領域であり、物理メモリアドレスは実際のメインメモリをアクセスするためのメモリアドレス空間である。   Many microprocessors have a virtual memory space and a virtual memory address in order to use the memory efficiently. In a microprocessor supporting virtual memory, a virtual memory address and a physical memory address have different meanings. The virtual memory address is an address area referred to by a program or a programmer, and the physical memory address is a memory address space for accessing an actual main memory.

従来のマイクロプロセッサでは、一つのプロセスが一つの仮想メモリ空間を有する。例えば、32ビットマイクロプロセッサの場合、一つのプロセスは最高4GB(Giga Byte)の一つの仮想メモリ空間を有する。そして、この仮想メモリ空間は仮想メモリアドレスを物理メモリアドレスに変換するアドレス変換テーブルを利用して物理メモリ空間にマッピングされる。すなわち、アドレス変換テーブルを通じて仮想ページ番号を物理ページ番号に転換して実際のメモリにアクセスする。SMTを支援しないマイクロプロセッサだけではなく、SMTを実現したマイクロプロセッサでもこのような変換技術を使用する。   In a conventional microprocessor, one process has one virtual memory space. For example, in the case of a 32-bit microprocessor, one process has one virtual memory space of up to 4 GB (Giga Byte). The virtual memory space is mapped to the physical memory space using an address conversion table for converting virtual memory addresses into physical memory addresses. That is, the virtual page number is converted into a physical page number through the address conversion table, and an actual memory is accessed. Such a conversion technique is used not only by a microprocessor that does not support SMT but also by a microprocessor that realizes SMT.

代表的なアドレス変換テーブルとして、アドレス変換参照バッファ(translation lookaside buffer;TLB)が挙げられる。   A typical address translation table includes an address translation reference buffer (TLB).

図1A及び図1Bは従来のアドレス変換参照バッファを利用して仮想メモリアドレスを物理メモリアドレスに変換することを示す図面である。図1Aはプロセス識別番号(Process ID)を含む場合のアドレス変換を示し、図1Bはプロセス識別番号(Process ID)を含まない場合のアドレス変換を示す図面である。プロセス識別番号はアドレス空間番号(address space number;ASN)で表現されることもある。   1A and 1B are diagrams illustrating conversion of a virtual memory address to a physical memory address using a conventional address translation reference buffer. FIG. 1A illustrates address conversion when a process identification number (Process ID) is included, and FIG. 1B illustrates address conversion when a process identification number (Process ID) is not included. The process identification number may be expressed by an address space number (ASN).

図1Aで、仮想メモリアドレスはプロセス識別番号(process ID)、仮想ページ番号(virtual page number)、ページオフセット(page offset)で構成される。図1Bでは、プロセス識別番号がなく、仮想ページアドレスとページオフセットだけで仮想メモリアドレスが構成される。   In FIG. 1A, the virtual memory address includes a process identification number (process ID), a virtual page number (virtual page number), and a page offset (page offset). In FIG. 1B, there is no process identification number, and a virtual memory address is configured only by a virtual page address and a page offset.

仮想メモリアドレスから物理メモリアドレスに変換する場合では、変換効率のために、通常、4Kバイトのページ単位に変換を行なう。この場合、仮想メモリアドレスの全体を物理メモリアドレスの全体に変換するのではなく、上位の仮想ページ番号(またはプロセス識別番号を含み)だけを物理ページ番号に変換する。そして、仮想ページと物理ページの変換は実行せず、そのまま同一に通過させる。   When converting from a virtual memory address to a physical memory address, the conversion is usually performed in units of 4K bytes for conversion efficiency. In this case, the entire virtual memory address is not converted into the entire physical memory address, but only the upper virtual page number (or the process identification number is included) is converted into the physical page number. Then, the conversion between the virtual page and the physical page is not executed, but is passed through as it is.

図2A及び図2Bは従来の技術におけるアドレス変換参照番号の構造を示し、図2Aはプロセス識別番号を含む場合を示し、図2Bはプロセス識別番号を含まない場合を示す。従来のアドレス変換参照バッファはタグ(tag)とデータ(data)に大きく分けられる。   2A and 2B show the structure of an address translation reference number in the prior art, FIG. 2A shows a case where a process identification number is included, and FIG. 2B shows a case where a process identification number is not included. A conventional address translation reference buffer is roughly divided into a tag (tag) and data (data).

図2A及び図2Bで、アドレス変換参照バッファのタグは、プロセス識別番号、仮想メモリページバッファ、ページオフセット、V(valid)、L(lock)で構成されており、データは物理ページ番号とアクセス許可のような保護情報で構成される。   2A and 2B, the address translation reference buffer tag is composed of a process identification number, a virtual memory page buffer, a page offset, V (valid), and L (lock), and data is a physical page number and access permission. It consists of protection information like

上述のように構成されたアドレス変換参照バッファの動作は次の通りである。入力されたプロセス識別番号と仮想メモリページ番号をアドレス変換参照バッファに保持されたタグ内容と比較して一致し、Vが有効な(valid)値を有する場合には、当該入力(entry)の物理メモリページ番号と保護情報が出力される。   The operation of the address translation reference buffer configured as described above is as follows. If the input process identification number and the virtual memory page number match the contents of the tag held in the address translation reference buffer and match, and V has a valid value, the physical of the input (entry) The memory page number and protection information are output.

SMTは一つのCPUに多数のプロセスまたは多数のスレッドが同時に実行されるように、これらのプロセスが多数のスレッドで構成されうる。現在までSMTを実現したマイクロプロセッサの場合では、メモリ管理ユニット(memory management unit:MMU)またはアドレス変換参照バッファを利用して多数のプロセスを一つのCPUに同時に実行させることが可能である。しかし、多数のスレッドを有する一つのプロセスをSMT環境で実行する場合、スレッド間の保護の問題のような多くの問題点が引き起こされる。   In SMT, these processes can be composed of multiple threads so that multiple processes or multiple threads are executed simultaneously on one CPU. In the case of a microprocessor that has realized SMT to date, it is possible to cause a single CPU to simultaneously execute a number of processes using a memory management unit (MMU) or an address translation reference buffer. However, when a single process having a large number of threads is executed in an SMT environment, many problems such as protection problems between threads are caused.

マイクロプロセッサで、一つのプログラムを実行する場合では、一つの上位プロセスがあり、その内に多数の下位プロセスを置いて実行することができる。このような場合には、次のような問題点がある。先ず、下位プロセスは上位プロセスとは完全に独立したプロセスであり、独立したメモリ空間を有して、実行も独立的になされる。すなわち、完全に異なるプログラムがともに実行されることと同一である。もし、この二つの間に通信(communication)が必要であれば、ハードディスクのファイル(file)やOSのカーネル(kernel)を通じてのみ、互いに通信することができる。したがって、これらの間の通信は非常に遅くて非効率的である。したがって、互いのメモリ領域を直接アクセスすることはできない。   When a microprocessor executes one program, there is one upper process, and a number of lower processes can be placed in the upper process. In such a case, there are the following problems. First, the lower process is a process completely independent of the upper process, has an independent memory space, and is executed independently. That is, it is the same as executing completely different programs together. If communication between the two is necessary, communication can be performed only through a file on the hard disk or an OS kernel. Thus, communication between them is very slow and inefficient. Therefore, it is impossible to directly access each other's memory area.

マイクロプロセッサで、一つのプログラムを実行する場合では、一つのプロセスがあり、その内に多数のスレッドがある構造でプログラムを実行することもできる。この場合、一つのプロセス内のすべてのスレッドはメモリをともに使用するだけではなく、プロセスのすべての資源(resource)をともに使用することができる。また、スレッド同士の通信が必要である場合では、相手メモリを直接アクセスすることも可能であるので、非常に速くて効率的にデータを処理することができる。しかし、スレッド同士でメモリをともに使用するので、保護(protection)の問題が発生しうる。また、スレッド生成によるメモリ管理についてプログラマが責任を持たなければならないので、プログラミングの段階で効率的なメモリ管理のための多くの労力が必要であるという問題点がある。
Richard L. Sites, Richard T. Witek, “Alpha AXPArchitecture Reference Manual, Second Edition.”, Copyright(C);1995 Butterworth-Heinemann, Order number:EY-T132E-DP II-A/3-12p.,II-B/3-9p. “ARM Architecture Reference Manual,”june 2000, ARMDDI0100E, “Chap.B6 Fast Context Switch Extension.”
When one program is executed by the microprocessor, there is one process, and the program can be executed with a structure having a large number of threads in the process. In this case, all threads within a process can use not only the memory together, but also all the resources of the process. Further, when communication between threads is necessary, it is also possible to directly access the other party's memory, so that data can be processed very quickly and efficiently. However, since the threads use the memory together, a protection problem may occur. In addition, since the programmer must be responsible for memory management by thread generation, there is a problem in that much effort is required for efficient memory management at the programming stage.
Richard L. Sites, Richard T. Witek, “Alpha AXP Architecture Reference Manual, Second Edition”, Copyright (C); 1995 Butterworth-Heinemann, Order number: EY-T132E-DP II-A / 3-12p., II- B / 3-9p. “ARM Architecture Reference Manual,” june 2000, ARMDDI0100E, “Chap.B6 Fast Context Switch Extension.”

本発明は、上述の問題点を鑑みてなされたものでありプロセス内部のスレッド間の高速な通信が可能であり、プログラマのメモリ管理負担を最小化することができるマイクロプロセッサを提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a microprocessor capable of high-speed communication between threads in a process and minimizing a memory management burden on a programmer. And

上述の目的は達成するために本発明の構成は、多数個のプロセスを同時に処理するマイクロプロセッサにおいて、前記各々のプロセスには各々一つずつのプロセスメモリ空間が割り当てられ、前記各々のプロセス内のスレッドには各々の一つずつのスレッドメモリ空間が割り当てられ、前記スレッドメモリ空間は前記プロセスメモリ空間とは独立的なメモリ空間であることを特徴とする。   In order to achieve the above object, according to the present invention, in a microprocessor that processes a plurality of processes simultaneously, one process memory space is allocated to each of the processes, One thread memory space is allocated to each thread, and the thread memory space is a memory space independent of the process memory space.

望ましい実施の形態において、前記スレッドメモリ空間は互いに独立的なメモリ空間であり、前記プロセスメモリ空間は前記プロセスに属したスレッドにより共通に使用される。   In a preferred embodiment, the thread memory space is a memory space independent of each other, and the process memory space is commonly used by threads belonging to the process.

上述の目的は、多数個のプロセスを同時に処理するマイクロプロセッサに仮想メモリを割り当てられる方法において、前記各々のプロセスには各々一つずつのプロセスメモリ空間を割り当て、前記各々のプロセス内のスレッドには各々一つずつのスレッドメモリ空間を割り当て、前記スレッドメモリ空間は前記プロセスメモリ空間とは独立的なメモリ空間になるようにするために達成することができる。   The above object is to allocate a virtual memory to a microprocessor that simultaneously processes a large number of processes, in which a process memory space is allocated to each process, and threads in each process are allocated to each process. Each thread memory space can be allocated so that the thread memory space is independent of the process memory space.

望ましい実施の形態において、前記スレッドメモリ空間は互いに独立的なメモリ空間であり、前記プロセスメモリ空間は前記プロセスに属したスレッドにより共通に使用される。   In a preferred embodiment, the thread memory space is a memory space independent of each other, and the process memory space is commonly used by threads belonging to the process.

前記の目的は、スレッド識別番号と仮想メモリページ番号を含むタグ部と、物理メモリページ番号を含むデータ部と、を具備し、前記タグ部に対応する前記データ部を決めることによって、仮想メモリアドレスを物理メモリアドレスにマッピングすることを特徴とするアドレス変換参照バッファを利用することによって達成されることができる。   The object includes a tag portion including a thread identification number and a virtual memory page number, and a data portion including a physical memory page number, and determining the data portion corresponding to the tag portion to thereby determine a virtual memory address. Can be achieved by utilizing an address translation reference buffer characterized by mapping to a physical memory address.

本発明によれば、一つのプロセスにメモリを割り当てる場合では、プロセス内のスレッドに対して独立的なメモリ空間を割り当て、各々のスレッドが共通にアクセスして共有することができるプロセスメモリ空間を割り当てることによって、スレッド間のメモリ衝突やプログラムの保護の問題を防止することができる。   According to the present invention, when allocating memory to one process, an independent memory space is allocated to threads in the process, and a process memory space that can be commonly accessed and shared by each thread is allocated. As a result, it is possible to prevent memory collision between threads and the problem of program protection.

また、プログラマがプログラミング時にメモリ管理にかける労力を低減することができるという効果がある。   In addition, there is an effect that it is possible to reduce the labor that a programmer spends on memory management during programming.

以下、添付の図面を参照して本発明の好適な実施の形態を詳細に説明する。本発明による図面で、実質的に同一の構成と同一の機能を有する構成要素に対しては同一の参照番号を使用する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings according to the present invention, the same reference numerals are used for components having substantially the same configuration and the same function.

本発明は一つのプロセスが多数のスレッドで構成され、このスレッドが同時に実行される時に発生しうる様々な問題を防止することができるメモリ構造を提供する。   The present invention provides a memory structure that can prevent various problems that may occur when a process is composed of a large number of threads and the threads are executed simultaneously.

図3及び図4は本発明の好適な実施の形態に従って一つのプロセスにメモリ空間を割り当てる方法を説明するための図面であり、図3は一つのプロセスに一つのスレッドが属する時(single−process single−thread)のメモリ構造を示す図面であり、図4は一つのプロセスに多数個のスレッドが属する時(single−process multiple−thread)のメモリ構造を示す図面である。   FIGS. 3 and 4 are views for explaining a method of allocating memory space to one process according to a preferred embodiment of the present invention. FIG. 3 shows a case where a single thread belongs to one process (single-process). FIG. 4 is a diagram illustrating a memory structure when a plurality of threads belong to one process (single-process multiple-thread).

本発明の好適な実施の形態では、一つのプロセスがプロセスメモリ空間及びこれとは独立的なスレッドメモリ空間を有する。図3を参照すると、一つのスレッドを有するプロセスには一つのプロセスメモリ空間VP10及びこれとは独立的な一つのスレッドメモリ空間VT10が割り当てられる。   In the preferred embodiment of the present invention, one process has a process memory space and a thread memory space independent of the process memory space. Referring to FIG. 3, a process having one thread is assigned one process memory space VP10 and one thread memory space VT10 independent of the process memory space VP10.

図4を参照すると、n個のスレッドを有するプロセスには一つのプロセスメモリ空間VP10と各々のスレッドに対するn個のスレッドメモリ空間VT10〜VTn0を仮想メモリ空間に割り当てる。   Referring to FIG. 4, one process memory space VP10 and n thread memory spaces VT10 to VTn0 for each thread are allocated to a virtual memory space for a process having n threads.

プロセスメモリ空間VP10はn個のすべてのスレッドがアクセス可能なメモリ空間であり、主にメッセージ(message)/パラメータ(parameter)/汎用データ(global data)などの伝送又は受信に使用される。n個のスレッドメモリ空間VT10〜VTn0は各スレッドが独立的に実行されるメモリ空間である。   The process memory space VP10 is a memory space that can be accessed by all n threads, and is mainly used for transmission / reception of messages / parameters / global data. The n thread memory spaces VT10 to VTn0 are memory spaces in which each thread is executed independently.

前記n個のスレッドメモリ空間VT10〜VTn0は前記プロセスメモリ空間VP10と仮想メモリ空間で独立的な空間を有する。また、前記n個のスレッドメモリ空間VT10〜VTn0も仮想メモリ空間で互いに独立的な空間を有する。これらメモリ空間は互いに独立しており、互いにアクセスすることも読み込むこともできない。スレッド同士の通信を行う必要がある場合にはプロセスメモリ空間VP10を使用しなければならない。各々のスレッドはプロセスのすべての資源がそのまま割り当てられ、これを自由に利用することができる。   The n thread memory spaces VT10 to VTn0 are independent of the process memory space VP10 and the virtual memory space. Also, the n thread memory spaces VT10 to VTn0 are virtual memory spaces that are independent from each other. These memory spaces are independent of each other and cannot be accessed or read from each other. When it is necessary to communicate between threads, the process memory space VP10 must be used. Each thread is allocated all the resources of the process as it is, and can use it freely.

図5A及び図5Bは本発明の好適な実施の形態による仮想メモリアドレスを物理メモリアドレスに変換する方法を説明するための図面であり、図6A及び図6Bは本発明の好適な実施の形態によるアドレス変換参照バッファの構成を示す図面である。   5A and 5B are diagrams for explaining a method of converting a virtual memory address to a physical memory address according to a preferred embodiment of the present invention, and FIGS. 6A and 6B are diagrams according to a preferred embodiment of the present invention. It is drawing which shows the structure of an address translation reference buffer.

図5A及び図6Aはプロセス識別番号を利用する場合であり、図5B及び図6Bはプロセス識別番号を利用しない場合である。   5A and 6A show a case where a process identification number is used, and FIGS. 5B and 6B show a case where a process identification number is not used.

図5A及び図6Aを参照すると、本発明の好適な実施の形態によるアドレス変換参照バッファで、タグ部分はプロセス識別番号、スレッド識別番号、スレッドビットT、仮想メモリページ番号、ページオフセット、V(Valid)、L(lock)で構成され、データ部分は物理メモリページ番号と保護情報で構成される。   Referring to FIGS. 5A and 6A, in the address translation reference buffer according to the preferred embodiment of the present invention, the tag portion includes a process identification number, a thread identification number, a thread bit T, a virtual memory page number, a page offset, and V (Valid ), L (lock), and the data portion includes a physical memory page number and protection information.

前記スレッド識別番号は現在生成されているスレッドの識別番号を示す。例えば、スレッド識別番号が3ビットで構成されている場合では、一つのプロセスが生成することができる最大のスレッド数は8個になる。   The thread identification number indicates the identification number of a currently generated thread. For example, when the thread identification number is composed of 3 bits, the maximum number of threads that can be generated by one process is eight.

スレッドビット(T bit)は現在変換するメモリアドレスがプロセスメモリ空間のメモリアドレスであるか、スレッドメモリ空間のメモリアドレスであるかを識別するためのものである。スレッドビット(T bit)が0である場合、プロセスメモリ空間を使用し、スレッドビット(Tbit)が1である場合、現在スレッドが一致しているスレッドメモリ空間を使用する。すなわち、スレッドビット(T bit)が1である場合、スレッド識別番号を比較し、0である場合には比較しない。これを通じてスレッドビットが1である場合、スレッドはスレッドメモリ空間で実行されて、他のスレッドとは個別であり、独立的なメモリ空間を有し、スレッドビットが0である場合、プロセスメモリ空間を使用してスレッド間のデータ/メッセージ/パラメータなどを伝達する。   The thread bit (T bit) is used to identify whether the memory address to be currently converted is a memory address in the process memory space or a memory address in the thread memory space. When the thread bit (T bit) is 0, the process memory space is used, and when the thread bit (T bit) is 1, the thread memory space with which the current thread matches is used. That is, when the thread bit (T bit) is 1, the thread identification numbers are compared, and when it is 0, no comparison is made. Through this, if the thread bit is 1, the thread is executed in the thread memory space and is separate from other threads, has an independent memory space, and if the thread bit is 0, the process memory space is Use to communicate data / messages / parameters etc. between threads.

図7を参照すると、Tビットが1である時、スレッドメモリ空間でスレッド動作が実行されてメモリ空間が生成される。生成されたメモリ空間は他のスレッドとは独立的である。また、Tビットが0である時、スレッドはデータ、メッセージ、パラメータ及び/またはこれらと関連した情報を伝送するためにプロセッサメモリ空間を使用する。   Referring to FIG. 7, when the T bit is 1, a thread operation is performed in the thread memory space to generate a memory space. The generated memory space is independent of other threads. Also, when the T bit is 0, the thread uses processor memory space to transmit data, messages, parameters and / or information associated therewith.

スレッド識別番号とスレッドビットは仮想メモリアドレスの一部分になることもでき、別途のレジスタで別途に実現されることもできる。例えば、64ビット装置でスレッド識別番号(3bit)、スレッドビット(1bit)、プロセス識別番号(8bit)、仮想メモリページ番号(40bit)、ページオフセット(12bit)のような仮想メモリアドレスを実現することもでき、32ビット装置で、スレッド識別番号(3bit)、スレッドビット(1bit)、プロセス識別番号(8bit)を別途のレジストで実現し、仮想メモリページ番号(20bit)、ページオフセット(12bit)のように仮想メモリアドレスを実現することもできる。   The thread identification number and the thread bit can be a part of the virtual memory address, or can be realized separately by a separate register. For example, virtual memory addresses such as a thread identification number (3 bits), a thread bit (1 bit), a process identification number (8 bits), a virtual memory page number (40 bits), and a page offset (12 bits) may be realized by a 64-bit device. In a 32-bit device, a thread identification number (3 bits), a thread bit (1 bit), and a process identification number (8 bits) are realized by separate registers, such as a virtual memory page number (20 bits) and a page offset (12 bits). Virtual memory addresses can also be realized.

ここで、スレッドビットは別途のインストラクション(instruction)を通じて0または1に設定することもでき、仮想メモリアドレスの一部分に置いてアドレスに従って区分することもできる。   Here, the thread bit can be set to 0 or 1 through a separate instruction, or can be set in a part of the virtual memory address and classified according to the address.

以上、本発明による回路の構成及び動作を上述の説明及び図面に従って図示したが、これは例をあげて説明したに過ぎず、本発明の技術的思想及び範囲を逸脱しない範囲内で多様な変形及び変更が可能であることはもちろんである。   The configuration and operation of the circuit according to the present invention have been illustrated in accordance with the above description and the drawings. However, this is merely described by way of example, and various modifications can be made without departing from the technical idea and scope of the present invention. Of course, changes are possible.

従来のアドレス変換参照バッファを利用して仮想メモリアドレスを物理メモリアドレスに変換することを示す図面である。6 is a diagram illustrating conversion of a virtual memory address into a physical memory address using a conventional address conversion reference buffer. 従来のアドレス変換参照バッファを利用して仮想メモリアドレスを物理メモリアドレスに変換することを示す図面である。6 is a diagram illustrating conversion of a virtual memory address into a physical memory address using a conventional address conversion reference buffer. 従来の技術のアドレス変換参照バッファの構造を示す図面である。6 is a diagram illustrating a structure of a conventional address translation reference buffer. 従来の技術のアドレス変換参照バッファの構造を示す図面である。6 is a diagram illustrating a structure of a conventional address translation reference buffer. 本発明の好適な実施の形態に従って一つのプロセスにメモリ空間を割り当てる方法を説明するための図面である。3 is a diagram illustrating a method for allocating memory space to one process according to a preferred embodiment of the present invention. 本発明の好適な実施の形態に従って一つのプロセスにメモリ空間を割り当てる方法を説明するための図面である。3 is a diagram illustrating a method for allocating memory space to one process according to a preferred embodiment of the present invention. 本発明の好適な実施の実施の形態による仮想メモリアドレスを物理メモリアドレスに変換する方法を説明するための図面である。3 is a diagram for explaining a method of converting a virtual memory address into a physical memory address according to an exemplary embodiment of the present invention; 本発明の好適な実施の実施の形態による仮想メモリアドレスを物理メモリアドレスに変換する方法を説明するための図面である。3 is a diagram for explaining a method of converting a virtual memory address into a physical memory address according to an exemplary embodiment of the present invention; 本発明の好適な実施の形態によるアドレス変換参照バッファの構成を示す図面である。3 is a diagram illustrating a configuration of an address translation reference buffer according to a preferred embodiment of the present invention. 本発明の好適な実施の形態によるアドレス変換参照バッファの構成を示す図面である。3 is a diagram illustrating a configuration of an address translation reference buffer according to a preferred embodiment of the present invention. 本発明の好適な実施の形態によるアドレス変換参照バッファの順序図である。FIG. 3 is a flow chart of an address translation reference buffer according to a preferred embodiment of the present invention.

符号の説明Explanation of symbols

VP10 プロセスメモリ空間
VP10〜VPn0 スレッドメモリ空間
PA 物理メモリ空間
VP10 process memory space VP10 to VPn0 thread memory space PA physical memory space

Claims (19)

複数のプロセスを同時に処理するマイクロプロセッサにおいて、
複数のプロセスに割り当てられる少なくとも一つのプロセスメモリと、
前記複数のプロセス内の複数のスレッドに各々割り当てられる複数のスレッドメモリとを含み、
前記複数のスレッドメモリは前記プロセスメモリとは独立的であることを特徴とするマイクロプロセッサ。
In a microprocessor that processes multiple processes simultaneously,
At least one process memory allocated to a plurality of processes;
A plurality of thread memories respectively allocated to a plurality of threads in the plurality of processes;
The microprocessor according to claim 1, wherein the plurality of thread memories are independent of the process memory.
前記複数のスレッドメモリの各々は対応するスレッドに割り当てられることを特徴とする請求項1に記載のマイクロプロセッサ。   The microprocessor according to claim 1, wherein each of the plurality of thread memories is assigned to a corresponding thread. 前記プロセスメモリは複数のスレッドによって使用されることを特徴とする請求項1に記載のマイクロプロセッサ。   The microprocessor of claim 1, wherein the process memory is used by a plurality of threads. 複数のプロセスを同時に処理するマイクロプロセッサで、仮想メモリを割り当てる方法において、
プロセスメモリを複数の対応するプロセスに割り当てる段階と、
スレッドメモリを複数の対応するプロセス内のスレッドに割り当てる段階とを含み、
前記スレッドメモリは前記プロセスメモリとは独立的であることを特徴とするマイクロプロセッサで仮想メモリを割り当てる方法。
In a method of allocating virtual memory in a microprocessor that processes a plurality of processes simultaneously,
Allocating process memory to multiple corresponding processes;
Allocating thread memory to threads in a plurality of corresponding processes,
A method of allocating virtual memory in a microprocessor, wherein the thread memory is independent of the process memory.
前記スレッドメモリの各々は対応するスレッドに割り当てられることを特徴とする請求項4に記載のマイクロプロセッサで仮想メモリを割り当てる方法。   The method of claim 4, wherein each of the thread memories is assigned to a corresponding thread. 前記プロセスメモリは、前記スレッドによって使用されることを特徴とする請求項4に記載のマイクロプロセッサで仮想メモリを割り当てる方法。   The method of claim 4, wherein the process memory is used by the thread. マイクロプロセッサの変換参照バッファにおいて、
スレッドID及び仮想メモリページ番号を含むタグユニットと、
物理メモリページ番号を含むデータユニットであって、前記タグユニットに対応し、仮想メモリアドレスを物理メモリアドレスに変換するため使用されるデータユニットとを含むことを特徴とするマイクロプロセッサの変換参照バッファ。
In the conversion reference buffer of the microprocessor,
A tag unit including a thread ID and a virtual memory page number;
A conversion reference buffer for a microprocessor, comprising: a data unit including a physical memory page number, the data unit corresponding to the tag unit and used for converting a virtual memory address into a physical memory address.
前記タグユニットはプロセスIDを含むことを特徴とする請求項7に記載のマイクロプロセッサの変換参照バッファ。   The microprocessor conversion reference buffer according to claim 7, wherein the tag unit includes a process ID. 前記タグユニットは前記仮想メモリアドレスがプロセスメモリまたはスレッドメモリのアドレスであるか否かを判別するためのスレッドビットを含むことを特徴とする請求項7に記載のマイクロプロセッサの変換参照バッファ。   8. The conversion reference buffer according to claim 7, wherein the tag unit includes a thread bit for determining whether the virtual memory address is an address of a process memory or a thread memory. 少なくとも一つのスレッドを有するプロセスに対応するプロセスメモリと、
前記プロセスメモリとは独立的であり、前記少なくとも一つのスレッドに対応するスレッドメモリとを含み、
前記プロセス及び前記少なくとも一つのスレッドは前記プロセスメモリにアクセスすることを特徴とする装置。
Process memory corresponding to a process having at least one thread;
A thread memory that is independent of the process memory and that corresponds to the at least one thread;
The apparatus, wherein the process and the at least one thread access the process memory.
少なくとも一つのプロセスメモリ及び少なくとも二つのスレッドメモリを具備した仮想メモリを含み、
前記少なくとも二つのスレッドメモリの各々は別個のスレッドに対応し、前記少なくとも一つのプロセスメモリから独立していることを特徴とする装置。
Including virtual memory with at least one process memory and at least two thread memories;
The apparatus wherein each of the at least two thread memories corresponds to a separate thread and is independent of the at least one process memory.
前記スレッドメモリは、他のスレッドメモリにアクセスせず、前記少なくとも一つのプロセスメモリにだけアクセスし、前記スレッドメモリは前記少なくとも一つのプロセスメモリによってのみアクセスされることを特徴とする請求項11に記載の装置。   12. The thread memory is accessed only by the at least one process memory without accessing another thread memory, and the thread memory is accessed only by the at least one process memory. Equipment. 前記少なくとも一つのプロセスメモリによってアクセスされる前記スレッドメモリは読み出し動作を含むことを特徴とする請求項11に記載の装置。   The apparatus of claim 11, wherein the thread memory accessed by the at least one process memory includes a read operation. 前記少なくとも二つのスレッドのうちの一つにアクセスするために前記少なくとも一つのプロセスメモリは前記二つのスレッドのうちの他の一つによって使用されることを特徴とする請求項11に記載の装置。   12. The apparatus of claim 11, wherein the at least one process memory is used by another one of the two threads to access one of the at least two threads. 前記少なくとも一つのプロセスメモリは前記複数のスレッドのうちのいずれか一つにアクセスするために前記少なくとも二つのスレッドのうちの一つによって使用されることを特徴とする請求項13に記載の装置。   The apparatus of claim 13, wherein the at least one process memory is used by one of the at least two threads to access any one of the plurality of threads. 仮想メモリを割り当てるための方法において、
少なくとも一つのプロセスをプロセスメモリに割り当てる段階と、
前記プロセス内の少なくとも一つのスレッドをスレッドメモリに割り当てる段階とを含み、前記スレッドメモリは前記プロセスメモリとは独立的であることを特徴とする仮想メモリ割り当て方法。
In a method for allocating virtual memory,
Allocating at least one process to process memory;
Allocating at least one thread in the process to a thread memory, wherein the thread memory is independent of the process memory.
仮想メモリアドレスを物理メモリアドレスに変換する方法において、
スレッドビットの値を判別する段階と、
前記判別されたスレッドビット値に従ってスレッドメモリまたはプロセスメモリ内の動作を実行する段階とを含むことを特徴とするアドレス変換方法。
In a method of converting a virtual memory address to a physical memory address,
Determining the value of the thread bit;
Performing an operation in a thread memory or a process memory according to the determined thread bit value.
前記判別されたスレッドビット値はスレッド動作を実行することによって決められ、前記スレッド動作は対応するスレッドメモリ内で実行されることを特徴とする請求項17に記載のアドレス変換方法。   The address conversion method of claim 17, wherein the determined thread bit value is determined by executing a thread operation, and the thread operation is executed in a corresponding thread memory. 前記判別されたスレッドビット値はデータ、メッセージまたはパラメータのうちの少なくとも一つを伝送するための前記プロセスメモリを使用する動作を実行することに起因することを特徴とする請求項17に記載のアドレス変換方法。   The address of claim 17, wherein the determined thread bit value is due to performing an operation using the process memory to transmit at least one of data, a message, or a parameter. Conversion method.
JP2004214506A 2003-07-22 2004-07-22 Device and method for simultaneously processing two or more threads Pending JP2005044363A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020030050123A KR100591755B1 (en) 2003-07-22 2003-07-22 Apparatus and method for processing multiple threads simultaneously
US10/840,374 US20050022192A1 (en) 2003-07-22 2004-05-07 Apparatus and method for simultaneous multi-thread processing

Publications (1)

Publication Number Publication Date
JP2005044363A true JP2005044363A (en) 2005-02-17

Family

ID=34277789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004214506A Pending JP2005044363A (en) 2003-07-22 2004-07-22 Device and method for simultaneously processing two or more threads

Country Status (1)

Country Link
JP (1) JP2005044363A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008536224A (en) * 2005-04-05 2008-09-04 インテル コーポレイション Sequencer address management
WO2008155849A1 (en) * 2007-06-20 2008-12-24 Fujitsu Limited Processor, tlb control method, tlb control program, and information processor
JP2010503115A (en) * 2006-09-22 2010-01-28 インテル コーポレイション Sharing information between guests in a virtual machine environment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10133888A (en) * 1996-09-03 1998-05-22 Fujitsu Ltd Soft parts combining control device and method therefor
WO2002008908A2 (en) * 2000-07-24 2002-01-31 Sun Microsystems, Inc. A method for scalable memory efficient thread-local object allocation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10133888A (en) * 1996-09-03 1998-05-22 Fujitsu Ltd Soft parts combining control device and method therefor
WO2002008908A2 (en) * 2000-07-24 2002-01-31 Sun Microsystems, Inc. A method for scalable memory efficient thread-local object allocation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008536224A (en) * 2005-04-05 2008-09-04 インテル コーポレイション Sequencer address management
JP2010503115A (en) * 2006-09-22 2010-01-28 インテル コーポレイション Sharing information between guests in a virtual machine environment
WO2008155849A1 (en) * 2007-06-20 2008-12-24 Fujitsu Limited Processor, tlb control method, tlb control program, and information processor
JPWO2008155849A1 (en) * 2007-06-20 2010-08-26 富士通株式会社 Arithmetic processing device, TLB control method, TLB control program, and information processing device

Similar Documents

Publication Publication Date Title
US7509391B1 (en) Unified memory management system for multi processor heterogeneous architecture
US8386750B2 (en) Multiprocessor system having processors with different address widths and method for operating the same
US9594521B2 (en) Scheduling of data migration
US9472248B2 (en) Method and apparatus for implementing a heterogeneous memory subsystem
JP2019050027A (en) Processor
US7734892B1 (en) Memory protection and address translation hardware support for virtual machines
US9218302B2 (en) Page table management
US10565131B2 (en) Main memory including hardware accelerator and method of operating the same
US7290112B2 (en) System and method for virtualization of processor resources
US8954707B2 (en) Automatic use of large pages
US6742103B2 (en) Processing system with shared translation lookaside buffer
US11550731B2 (en) Processing method and apparatus for translation lookaside buffer flush instruction
US20140189192A1 (en) Apparatus and method for a multiple page size translation lookaside buffer (tlb)
US9183161B2 (en) Apparatus and method for page walk extension for enhanced security checks
TW201810027A (en) Aperture access processors, methods, systems, and instructions
KR100591755B1 (en) Apparatus and method for processing multiple threads simultaneously
US7337300B2 (en) Procedure for processing a virtual address for programming a DMA controller and associated system on a chip
US7389398B2 (en) Methods and apparatus for data transfer between partitions in a computer system
JP2013016187A (en) Cache locking without interference from normal allocations
EP1067461B1 (en) Unified memory management system for multi process heterogeneous architecture
US20210200858A1 (en) Executing code in protected memory containers by trust domains
JP2005044363A (en) Device and method for simultaneously processing two or more threads
US20220100871A1 (en) Scalable multi-key memory encryption
CN113849262A (en) Techniques for moving data between virtual machines without replication
US20220327063A1 (en) Virtual memory with dynamic segmentation for multi-tenant fpgas

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070402

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20080207

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091222

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100601