Showing posts with label Compton. Show all posts
Showing posts with label Compton. Show all posts

Sunday, November 28

Memory protection

Memory protection is a way to control memory access rights on a computer, and is a part of most modern operating systems. The main purpose of memory protection is to prevent a process from accessing memory that has not been allocated to it. This prevents a bug within a process from affecting other processes, or the operating system itself. Memory protection is a behavior that is distinct from ASLR and the NX bit.

Methods

Segmentation
Segmentation refers to dividing a computer's memory into segments.
The x86 architecture has multiple segmentation features, which are helpful for using protected memory on this architecture. On the x86 processor architecture, the Global Descriptor Table and Local Descriptor Tables can be used to reference segments in the computer's memory. Pointers to memory segments on x86 processors can also be stored in the processor's segment registers. Initially x86 processors had 4 segment registers, CS (code segment), SS (stack segment), DS (data segment) and ES (extra segment); later another two segment registers were added – FS and GS.

Paged virtual memory
Main article: Paged virtual memory
In paging, the memory address space is divided into equal, small pieces, called pages. Using a virtual memory mechanism, each page can be made to reside in any location of the physical memory, or be flagged as being protected. Virtual memory makes it possible to have a linear virtual memory address space and to use it to access blocks fragmented over physical memory address space.
Most computer architectures based on pages, most notably x86 architecture, also use pages for memory protection.
A page table is used for mapping virtual memory to physical memory. The page table is usually invisible to the process. Page tables make it easier to allocate new memory, as each new page can be allocated from anywhere in physical memory.
By such design, it is impossible for an application to access a page that has not been explicitly allocated to it, simply because any memory address, even a completely random one, that application may decide to use, either points to an allocated page, or generates a page fault (PF). Unallocated pages simply do not have any addresses from the application point of view.
As a side note, a PF may not be a fatal occurrence. Page faults are used not only for memory protection, but also in another interesting way: the OS may intercept the PF, and may load a page that has been previously swapped out to disk, and resume execution of the application which had caused the page fault. This way, the application receives the memory page as needed. This scheme, known as swapped virtual memory, allows in-memory data not currently in use to be moved to disk storage and back in a way which is transparent to applications, to increase overall memory capacity.

Protection keys
A protection key mechanism divides physical memory up into blocks of a particular size (e.g., 2 kiB), each of which has an associated numerical value called a protection key. Each process also has a protection key value associated with it. On a memory access the hardware checks that the current process's protection key matches the value associated with the memory block being accessed; if not, an exception occurs. This mechanism was used in the System/360 architecture.
The System/360 protection keys described above are associated with physical addresses. This is different from the protection key mechanism used by processors such as the Intel Itanium and the Hewlett-Packard Precision Architecture (HP/PA, also known as PA-RISC), which are associated with virtual addresses, and which allow multiple keys per process.
In the Itanium and PA processor architectures, translations (TLB entries) have keys (Itanium) or access ids (PA) associated with them. A running process has several protection key registers (16 for Itanium, 4 for HP PA). A translation selected by the virtual address has its key compared to each of the protection key registers. If any of them match (plus other possible checks), the access is permitted. If none match, a fault or exception is generated. The software fault handler can, if desired, check the missing key against a larger list of keys maintained by software; thus, the protection key registers inside the processor may be treated as a software managed cache of a larger list of keys associated with a process.
PA has 15–18 bits of key; Itanium mandates at least 18. Keys are usually associated with protection domains, such as libraries, modules, etc.

Simulated segmentation
Simulation is use of a monitoring program to interpret the machine code instructions of some computer. Such an Instruction Set Simulator can provide memory protection by using a segmentation-like scheme and validating the target address and length of each instruction in real time before actually executing them. The simulator must calculate the target address and length and compare this against a list of valid address ranges that it holds concerning the thread's environment, such as any dynamic memory blocks acquired since the thread's inception plus any valid shared static memory slots. The meaning of "valid" may change throughout the thread's life depending upon context: it may sometimes be allowed to alter a static block of storage, and sometimes not, depending upon the current mode of execution which may or may not depend on a storage key or supervisor state.
It is generally not advisable to use this method of memory protection where adequate facilities exist on a CPU, as this takes valuable processing power from the computer. However it is generally used for debugging and testing purposes to provide an extra fine level of granularity to otherwise generic storage violations and can indicate precisely which instruction is attempting to overwrite the particular section of storage which may have the same storage key as unprotected storage. Early IBM teleprocessing systems, such as CICS, multi-threaded commercial transactions in shared and unprotected storage for around 20 years.

Capability-based addressing
Capability-based addressing is a method of memory protection that is unused in modern commercial computers. In this, pointers are replaced by protected objects (called capabilities) that can only be created via using privileged instructions which may only be executed by the kernel, or some other process authorized to do so. This effectively lets the kernel control which processes may access which objects in memory, with no need to use separate address spaces or context switches. Capabilities have never gained mainstream adoption in commercial hardware, but they are widely used in research systems such as KeyKOS and its successors, and are used conceptually as the basis for some virtual machines, most notably Smalltalk and Java.

Measures

A useful estimation of the protection level of a particular implementation, is to measure how closely it adheres to the principle of minimum privilege.

Memory protection in different operating systems

Different Operating Systems use different forms of memory protection or separation. True memory separation was not used in home computer operating systems until Windows XP and Mac OS X, which were released in 2001. It is possible for processes to access System Memory in the Windows 9x family of Operating Systems .
Some operating systems that do implement memory protection include
Microsoft Windows family from Windows NT 3.1
most Unix-like systems, including
Solaris
Linux
BSD
Mac OS X
GNU Hurd


(source:wikipedia0

Input/output

In computing, input/output, or I/O, refers to the communication between an information processing system (such as a computer), and the outside world possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it. The term can also be used as part of an action; to "perform I/O" is to perform an input or output operation. I/O devices are used by a person (or other system) to communicate with a computer. For instance, a keyboard or a mouse may be an input device for a computer, while monitors and printers are considered output devices for a computer. Devices for communication between computers, such as modems and network cards, typically serve for both input and output.
Note that the designation of a device as either input or output depends on the perspective. Mouse and keyboards take as input physical movement that the human user outputs and convert it into signals that a computer can understand. The output from these devices is input for the computer. Similarly, printers and monitors take as input signals that a computer outputs. They then convert these signals into representations that human users can see or read. For a human user the process of reading or seeing these representations is receiving input. These interactions between computers and humans is studied in a field called human–computer interaction.
In computer architecture, the combination of the CPU and main memory (i.e. memory that the CPU can read and write to directly, with individual instructions) is considered the brain of a computer, and from that point of view any transfer of information from or to that combination, for example to or from a disk drive, is considered I/O. The CPU and its supporting circuitry provide memory-mapped I/O that is used in low-level computer programming in the implementation of device drivers. An I/O algorithm is one designed to exploit locality and perform efficiently when data reside on secondary storage, such as a disk drive.

Interface

I/O Interface is required whenever the I/O device is driven by the processor. The interface must have necessary logic to interpret the device address generated by the processor. Handshaking should be implemented by the interface using appropriate commands like (BUSY,READY,WAIT), and the processor can communicate with I/O device through the interface. If different data formats are being exchanged, the interface must be able to convert serial data to parallel form and vice-versa. There must be provision for generating interrupts and the corresponding type numbers for further processing by the processor if required
A computer that uses memory-mapped I/O accesses hardware by reading and writing to specific memory locations, using the same assembler language instructions that computer would normally use to access memory.
Higher-level implementation
Higher-level operating system and programming facilities employ separate, more abstract I/O concepts and primitives. For example, most operating systems provide application programs with the concept of files. The C and C++ programming languages, and operating systems in the Unix family, traditionally abstract files and devices as streams, which can be read or written, or sometimes both. The C standard library provides functions for manipulating streams for input and output.
In the context of the ALGOL 68 programming language, the input and output facilities are collectively referred to as transput. The ALGOL 68 transput library recognizes the following standard files/devices: stand in, stand out, stand errors and stand back.
An alternative to special primitive functions is the I/O monad, which permits programs to just describe I/O, and the actions are carried out outside the program. This is notable because the I/O functions would introduce side-effects to any programming language, but now purely functional programming is practical.
Addressing mode

There are many ways through which data can be read or stored in the memory. Each method is an addressing mode, and has its own advantages and limitations.
There are many type of addressing modes such as direct addressing, indirect addressing, immediate addressing, index addressing, based addressing, based-index addressing, implied addressing, etc.
Direct address
In this type of address of the data is a part of the instructions itself. When the processor decodes the instruction, it gets the memory address from where it can be read/store the required information.
Mov Reg. [Addr]
Here the Addr operand points to a memory location which holds the data and copies it into the specified Register.
Indirect address
Here the address can be stored in a register. The instructions will have the register which has the address. So to fetch the data, the instruction must be decoded appropriate register selected. The contents of the register will be treated as the address using this address appropriate memory location is selected and data is read/written.
Port-mapped I/O

Port-mapped I/O usually requires the use of instructions which are specifically designed to perform I/O operations.


(source:wikipedia)

Signed number representations

In computing, signed number representations are required to encode negative numbers in binary number systems.
In mathematics, negative numbers in any base are represented by prefixing them with a − sign. However, in computer hardware, numbers are represented in binary only without extra symbols, requiring a method of encoding the minus sign. The four best-known methods of extending the binary numeral system to represent signed numbers are: sign-and-magnitude, ones' complement, two's complement, and excess-N. Some of the alternative methods use implicit instead of explicit signs, such as negative binary, using the base -2. Corresponding methods can be devised for other bases, whether positive, negative, fractional, or other elaborations on such themes. In practice the representation most generally used in current computing devices is twos' complement, although there is no definitive criterion by which any of the representations is universally superior.

Sign-and-magnitude method

8 bit signed magnitude
Binary Signed Unsigned
00000000 +0 0
00000001 1 1
... ... ...
01111111 127 127
10000000 −0 128
10000001 −1 129
... ... ...
11111111 −127 255
One may first approach the problem of representing a number's sign by allocating one sign bit to represent the sign: set that bit (often the most significant bit) to 0 for a positive number, and set to 1 for a negative number. The remaining bits in the number indicate the magnitude (or absolute value). Hence in a byte with only 7 bits (apart from the sign bit), the magnitude can range from 0000000 (0) to 1111111 (127). Thus you can represent numbers from −12710 to +12710 once you add the sign bit (the eight bit). A consequence of this representation is that there are two ways to represent zero, 00000000 (0) and 10000000 (−0). Decimal −43 encoded in an eight-bit byte this way is 10101011.
This approach is directly comparable to the common way of showing a sign (placing a "+" or "−" next to the number's magnitude). Some early binary computers (e.g. IBM 7090) used this representation, perhaps because of its natural relation to common usage. Sign-and-magnitude is the most common way of representing the significand in floating point values.

Ones' complement

8 bit ones' complement
Binary value Ones' complement interpretation Unsigned interpretation
00000000 +0 0
00000001 1 1
... ... ...
01111101 125 125
01111110 126 126
01111111 127 127
10000000 −127 128
10000001 −126 129
10000010 −125 130
... ... ...
11111101 −2 253
11111110 −1 254
11111111 −0 255
Alternatively, a system known as ones' complement can be used to represent negative numbers. The ones' complement form of a negative binary number is the bitwise NOT applied to it — the "complement" of its positive counterpart. Like sign-and-magnitude representation, ones' complement has two representations of 0: 00000000 (+0) and 11111111 (−0).
As an example, the ones' complement form of 00101011 (43) becomes 11010100 (−43). The range of signed numbers using ones' complement is represented by −(2N−1−1) to (2N−1−1) and +/−0. A conventional eight-bit byte is −12710 to +12710 with zero being either 00000000 (+0) or 11111111 (−0).
To add two numbers represented in this system, one does a conventional binary addition, but it is then necessary to add any resulting carry back into the resulting sum. To see why this is necessary, consider the following example showing the case of the addition of −1 (11111110) to +2 (00000010).
binary decimal
11111110 -1
+ 00000010 +2
............ ...
1 00000000 0 <-- not the correct answer
1 +1 <-- add carry
............ ...
00000001 1 <-- correct answer
In the previous example, the binary addition alone gives 00000000, which is incorrect. Only when the carry is added back in does the correct result (00000001) appear.
This numeric representation system was common in older computers; the PDP-1, CDC 160A and UNIVAC 1100/2200 series, among many others, used ones'-complement arithmetic.
A remark on orthography: The system is referred to as "ones' complement" because the negation of a positive value x (represented as the bitwise NOT of x) can also be formed by subtracting x from the ones' complement representation of zero that is a long sequence of ones (-0). Two's complement arithmetic, on the other hand, forms the negation of x by subtracting x from a single large power of two that is congruent to +0. Therefore, ones' complement and two's complement representations of the same negative value will differ by one.
The Internet protocols IPv4, ICMP, UDP and TCP all use the same 16-bit ones' complement checksum algorithm. Although most computers lack "end-around carry" hardware, the extra complexity is accepted because "it is equally sensitive to errors in all bit positions". In UDP, the all 0s representation of zero indicates that the optional checksum feature has been omitted. The other representation, FFFF, indicates a checksum value of 0. (Checksums are mandatory in IPv4, TCP and ICMP; they were omitted from IPv6).
Note that the ones' complement representation of a negative number can be obtained from the sign-magnitude representation merely by bitwise complementing the magnitude.

Two's complement

8 bit two's complement
Binary value Two's complement interpretation Unsigned interpretation
00000000 0 0
00000001 1 1
... ... ...
01111110 126 126
01111111 127 127
10000000 −128 128
10000001 −127 129
10000010 −126 130
... ... ...
11111110 −2 254
11111111 −1 255
Main article: Two's complement
The problems of multiple representations of 0 and the need for the end-around carry are circumvented by a system called two's complement. In two's complement, negative numbers are represented by the bit pattern which is one greater (in an unsigned sense) than the ones' complement of the positive value.
In two's-complement, there is only one zero (00000000). Negating a number (whether negative or positive) is done by inverting all the bits and then adding 1 to that result. Addition of a pair of two's-complement integers is the same as addition of a pair of unsigned numbers (except for detection of overflow, if that is done). For instance, a two's-complement addition of 127 and −128 gives the same binary bit pattern as an unsigned addition of 127 and 128, as can be seen from the above table.
An easier method to get the negation of a number in two's complement is as follows:
Example 1 Example 2
1. Starting from the right, find the first '1' 0101001 0101100
2. Invert all of the bits to the left of that one 1010111 1010100

Excess-n

Main article: Offset binary
8 bit excess-127
Binary value Excess-127 interpretation Unsigned interpretation
00000000 -127 0
00000001 -126 1
... ... ...
01111111 0 127
10000000 1 128
... ... ...
11111111 +128 255
Excess-N, also called biased representation, uses a pre-specified number N as a biasing value. A value is represented by the unsigned number which is N greater than the intended value. Thus 0 is represented by N, and −N is represented by the all-zeros bit pattern.
This is a representation that is now primarily used for the exponent of floating-point numbers. The IEEE floating-point standard defines the exponent field of a single-precision (32-bit) number as an 8-bit excess-127 field. The double-precision (64-bit) exponent field is an 11-bit excess-1023 field.

Excess-3
Two's complement


Base −2

In conventional binary number systems, the base, or radix, is 2; thus the rightmost bit represents 20, the next bit represents 21, the next bit 22, and so on. However, a binary number system with base −2 is also possible. The rightmost bit represents (−2)0=+1, the next bit represents (−2)1=−2, the next bit (−2)2=+4 and so on, with alternating sign. The numbers that can be represented with four bits are shown in the comparison table below.
The range of numbers that can be represented is asymmetric. If the word has an even number of bits, the magnitude of the largest negative number that can be represented is twice as large as the largest positive number that can be represented, and vice versa if the word has an odd number of bits.

Comparison table

The following table shows the positive and negative integers that can be represented using 4 bits.
4 bit integer representations
Decimal Unsigned Sign and magnitude Ones' complement Two's complement Excess-7 (biased) Base −2
+16 N/A N/A N/A N/A N/A N/A
+15 1111 N/A N/A N/A N/A N/A
+14 1110 N/A N/A N/A N/A N/A
+13 1101 N/A N/A N/A N/A N/A
+12 1100 N/A N/A N/A N/A N/A
+11 1011 N/A N/A N/A N/A N/A
+10 1010 N/A N/A N/A N/A N/A
+9 1001 N/A N/A N/A N/A N/A
+8 1000 N/A N/A N/A 1111 N/A
+7 0111 0111 0111 0111 1110 N/A
+6 0110 0110 0110 0110 1101 N/A
+5 0101 0101 0101 0101 1100 0101
+4 0100 0100 0100 0100 1011 0100
+3 0011 0011 0011 0011 1010 0111
+2 0010 0010 0010 0010 1001 0110
+1 0001 0001 0001 0001 1000 0001
+0 N/A 0000 0000 N/A N/A N/A
0 0000 N/A N/A 0000 0111 0000
−0 N/A 1000 1111 N/A N/A N/A
−1 N/A 1001 1110 1111 0110 0011
−2 N/A 1010 1101 1110 0101 0010
−3 N/A 1011 1100 1101 0100 1101
−4 N/A 1100 1011 1100 0011 1100
−5 N/A 1101 1010 1011 0010 1111
−6 N/A 1110 1001 1010 0001 1110
−7 N/A 1111 1000 1001 0000 1001
−8 N/A N/A N/A 1000 N/A 1000
−9 N/A N/A N/A N/A N/A 1011
−10 N/A N/A N/A N/A N/A 1010
−11 N/A N/A N/A N/A N/A N/A



(source:wikipedia)

Sunday, August 15

Compton, California


Compton, California,


Compton is a city in southern Los Angeles County, California, United States, southeast of downtown Los Angeles. The City of Compton is one of the oldest cities in the county and in 1889 was the eighth city to incorporate.  It is often considered part of the south side by residents of Los Angeles. As of the 2000 census, the city had a total population of 93,493. It is known as the "Hub City" because of its location in nearly the exact geographical center of Los Angeles County.  An inner suburb of Los Angeles, Compton has seen an increase of middle-class residents in the last few years, due to its affordable housing and the reduction of crime. Compton is still seen as a primarily African-American city, although in the 2000's Latinos became the majority as a result of immigration and shifts in ethnic populations. It is referenced in countless hip hop songs, namely by Compton MC Dr. Dre.
Neighborhoods in Compton include: Sunny Cove, Leland, Downtown Compton, and the Richland Farms.

Early history,

Compton 1914,
In 1784, the Spanish Crown deeded a tract of over 75,000 acres (304 km²) to Juan Jose Dominguez in this area. The tract was named Rancho San Pedro. Dominguez's name was later applied to the Dominguez Hills community south of Compton. The tree that marked the original northern boundary of the rancho still stands at the corner of Poppy and Short streets. The rancho was sub-divided and parcels were sold within the Californios of Alta California until the lands were ceded after the Mexican-American war in 1848. American immigrants acquired most of the rancho lands after 1848.
In 1867, Griffith Dickenson Compton led a group of thirty pioneers to the area. These families had traveled by wagon train south from Stockton, California in search of ways to earn a living other than in the rapid exhaustion of gold fields. Originally named Gibsonville, after one of the tract owners, it was later called Comptonville. However, to avoid confusion with the Comptonville located in Yuba County, the name was shortened to Compton. Compton’s early settlers faced terrible hardships as they tilled the land in inclement weather to scratch out a paltry existence. The weather was cold and wet, and fuel was scarce. Gathering firewood required a three day-trip to the mountains near Pasadena. Confronted with such powerful forces of nature, many in the Compton party considered trying to find a better location to settle down but decided to stay. Also, in those early times, there were only two general stores in the area: one in the pueblo of Los Angeles, the other in Wilmington. Each were several miles away and required a long trip either on foot or by horseback.
By 1887, the settlers sensed the necessity to improve local government. They held a series of town meetings to discuss the possibility of incorporation. In January 1888, they forwarded a petition supporting the incorporation of Compton to the Los Angeles County Board of Supervisors, who in turn forwarded the petition to the State Legislature. The area to be incorporated included all the land one mile east and west of Wilmington Avenue (now Willowbrook Avenue), and from Greenleaf on the south to a quarter mile north of Rosecrans. The City of Compton was officially incorporated on May 11, 1888. The new city, total population of 500 people, held its first City Council meeting on May 14, 1888. 
The 20th Century



Aerial view of Compton, 1920.
The 1920' saw the opening of the Compton Airport, Compton Junior College was founded and city officials moved to a new City Hall on Alameda Street.  On March 10, 1933, a devastating earthquake took lives, toppled schools and caused major damage to the main business district.  Compton grew quickly in the 1950's. While it would soon be home to a large number of African Americans, in 1930 there was only one black resident. In the late 1940's, middle class African-Americans began moving into the area, mostly on the west side. One reason for this was Compton's proximity to Watts, where a significant number of blacks lived at the time. However, the eastern side of the city remained predominantly white into the 1970s. Despite being located in the middle of a major metropolitan area, there remains at least one small pocket of agriculture from its early years.
Crime

Further information: Crime in Los Angeles


Teenagers arrested for hot rod racing in South Compton, 1954
In 2008, the CQ Press using data from F.B.I. "Crime in the United States 2008" Compton was the 17th most dangerous city in the country. However in the same year, the FBI ranked Compton to be the fifteenth most dangerous city. The city used to be notorious for gang violence, primarily caused by the Bloods, the Crips, and Sureños gangs that are allied with the Mexican drug cartels.
Compton's violent reputation was popularized in the late 1980's by the rise to prominence of local gangsta rap groups Compton's Most Wanted and especially N.W.A., who released the famous albums Straight Outta Compton and Eazy-Duz-It in 1988. Although crime rates had been falling for years after the crack epidemic of the 1980's and early 1990's, Compton had witnessed spikes in the rate of violent crime.
Compton had 75 murders in 2005, which is a per capita rate significantly higher than the national average. Recently, in an effort to combat gun violence, the citizens of Compton were given the option to hand over their guns to the police and receive a $100 check for various goods, called the Gifts for Guns Program. During 2006, Compton deployed twice as many sheriff deputies and the murder rate decreased from 22 in four months to five.
Compton's property crime levels tend to be about the same as California's average level. The same data shows violent crime levels in Compton tend to be much higher than California's average level. 
Government and infrastructure

During the 1950s and 1960s, after the United States Federal Government declared all racially exclusive housing covenants (title deeds) unconstitutional, Compton's fledgling black population was still largely ignored or neglected by the city's elected officials. At one time, the City Council even discussed dismantling the Compton Police Department in favor of the Los Angeles County Sheriff's Department in an attempt to exclude blacks from law enforcement jobs. This slowly began to change when in 1958, the first African-American ran for a City Council seat. However, it would be another three years before an African-American would actually be elected to the City Council in 1961.
Douglas Dollarhide made history in Compton in 1969 when he became California's first African-American mayor of a metropolitan city. Two African-Americans and one Mexican-American were also elected to the local school board. Four years later, in 1973, Doris A. Davis defeated Dollarhide's bid for re-election to become the first African-American female mayor of a metropolitan city in the United States. By the early 1970s, the city had one of the largest concentrations of African-Americans in the country with over ninety percent.
For many years, Compton was a much sought after neighborhood for the black middle class of Los Angeles. Now, only a few areas of Compton are still middle class communities. This past affluence is reflected in the area's appearance — Compton's streets are lined with relatively spacious and attractive single family homes. However, several factors have contributed to Compton's decline. One of the most significant factors was a steady erosion of its tax base. First by whites who fled to the newly incorporated cities of Artesia, Bellflower, Paramount and Norwalk in the late 1950s. These nearby communities remained largely white despite integration. This move was even further precipitated after the Watts Riots in 1965 and in 1992.
Soon, middle class blacks also found other areas more attractive to them. Some were unincorporated areas of Los Angeles County such as Ladera Heights, View Park and Windsor Hills; and others were cities such as Inglewood and, particularly, Carson. The latter was significant because it had successfully thwarted attempts at annexation by neighboring Compton. The city of Carson opted instead for incorporation in 1968, which is notable because its black population was actually more affluent than its white population. As a newer city, it also offered more favorable tax rates and lower crime.
After Lionel Cade, an accountant, assumed the mayor's office in 1977, one of the first orders of business was to conduct an audit of the city's finances. It was discovered that the city was $2 million in debt. The administration was able to eliminate the huge deficit in one year by making cuts in every department. It also aggressively sought federal funding to help pay for essential services, which was at least partially effective. However, with the passage of the property tax cutting initiative Proposition 13 by California voters, Compton was one of the cities hardest hit, since it had already eliminated most of the fat from its budget.
Crime, though present in lesser degrees beforehand, worsened significantly with the introduction of crack cocaine in the latter part of the 20th century. The neighborhood lost richer residents, with the worsening safety problems, and, after the 1992 riots in the Los Angeles metropolitan area, many African Americans left the city. Meanwhile, many Latino (esp. Mexicans) and other immigrant families moved into Compton, including Samoans, Tongans, Koreans, Filipinos, Belizeans and East Africans.
County, state and federal representation
The Los Angeles County Sheriff's Department operates the Compton Station in Compton.
The Los Angeles County Department of Health Services operates the South Health Center in Watts, Los Angeles, serving Compton.
In the state legislature Compton is located in the 25th Senate District, represented by Democrat Edward Vincent, and in the 52nd Assembly District, represented by Democrat Isadore Hall, III. Federally, Compton is located in California's 37th congressional district, which has a Cook PVI of D +27 and is represented by Democrat Laura Richardson.
The United States Postal Service operates the Compton Post Office at 701 South Santa Fe Avenue the Hub City Post Office at 101 South Willowbrook Avenue, and the Fashion Square Post Office at 2100 North Long Beach Boulevard.
City government controversies

Civic corruption has also been a widespread problem in Compton.In the early 1990s, United States Attorney Joey Chin conducted a series of investigations, centered on a phony waste-to-energy scheme, that ultimately ensnared a number of prominent elected officials.
In 2000, the Compton Police Department was disbanded amidst controversy and charges of corruption. The police department claims it was disbanded after investigations of gang activity led to then-Compton Mayor Omar Bradley. Once this became public, the mayor charged it was the police who were themselves corrupt, and he disbanded the police department. Omar Bradley has since faced serious corruption charges.Regardless of the situation, an alternative form of law enforcement was sought. Compton's policing needs are currently served by the Los Angeles County Sheriff's Department.
Eric J. Perrodin, the city's current mayor, was investigated in 2007 by the California State Bar for threatening to violate a local newspaper's first amendment rights after the paper printed an investigative report relative to a contract granted to one of Perrodin's associates. Following the report, Perrodin threatened to yank the city's advertising contract with the paper
Geography

Compton is located at 33°53′48″N 118°13′30″W (33.896715, -118.225078).According to the United States Census Bureau, the city has a total area of 26.4 km² (10.2 mi²). 26.2 km² (10.1 mi²) of it is land and 0.2 km² (0.1 mi²) of it (0.69%) is water.
It is bordered by the unincorporated Willowbrook on the north and northwest, the unincorporated West Compton on the west, the city of Carson on the southwest, the unincorporated Rancho Dominguez on the south, the city of Long Beach on the southeast, the city of Paramount and the unincorporated East Compton on the east, and by the city of Lynwood on the northeast.
Demographics

As of the census[20] of 2000, there were 93,493 people, 22,327 households, and 18,620 families residing in the city. The population density was 3,563.5/km² (9,225.6/mi²). There were 23,795 housing units at an average density of 906.9/km² (2,348.0/mi²). As of 2000, the racial makeup of the city was 40.0% Black or African American, 16.70% White, 1.0% Pacific Islander, 56.8% of the population are Hispanic or Latino and 1.3% listed as Other.
There were 22,327 households out of which 50.7% had children under the age of 18 living with them, 47.3% were married couples living together, 27.7% had a female householder with no husband present, and 16.6% were non-families. 13.2% of all households were made up of individuals and 5.5% had someone living alone who was 65 years of age or older. The average household size was 4.16 and the average family size was 4.45.
In the city the population was spread out with 38.5% under the age of 18, 11.5% from 18 to 24, 28.7% from 25 to 44, 14.4% from 45 to 64, and 6.9% who were 65 years of age or older. The median age was 25 years. For every 100 females there were 96.3 males. For every 100 females age 18 and over, there were 91.2 males.
The median income for a household in the city was $33,021, and the median income for a family was $40,021. Males had a median income of $22,698 versus $24,692 for females. The per capita income for the city was $10,389. About 31.5% of families and 83.0% of the population were below the poverty line, including 35.6% of those under age 18 and 14.7% of those age 65 or over.
Culture,

List of people from Compton, California,
Currently, Latinos are the largest ethnic group in the city, although Compton is still often thought of as a primarily black community. Another possible reason for this is that, despite the shift in population, African Americans continue to dominate local politics, holding most elected positions in the city.
Compton has been referenced on numerous occasions in gangsta rap and g-funk songs, especially in the late 1980s and early 1990s, and so has attained an association not only with gang violence and crime, but with hip hop music as well. The city is known as the home of many famous rappers including Eazy-E, Dresta, Dr. Dre, and Game.
Some episodes of The Fresh Prince of Bel-Air took place in Compton because Will's friend Jazz lived there. Many well-known NBA players are from Compton, California. DeMar DeRozan of the Toronto Raptors attended Compton High School, Detroit Pistons Small Forward, Tayshaun Prince and Charlotte forward/center Tyson Chandler attended Dominguez High School in Compton. Brandon Jennings, of the Milwaukee Bucks, attended Dominguez for two years also before transferring to Oak Hill Academy before his Junior season.
Compton is also known for having a large Pacific Islander community, as well as a number Southeast Asians like Filipinos and Vietnamese. West Compton and unincorporated Willowbrook have more middle class African Americans than the central city (west of Alameda St.) and unincorporated East Compton where a larger percentage of Hispanics and working-class Blacks live. Lower-income subsections on Compton Blvd. have many businesses owned by Central Americans and other Latinos.
Economy


Compton was recently designated as an “Entrepreneurial Hot Spot” by Cognetics, Inc., an independent economic research firm. Compton made the national list for best places to start and grow a business, and ranked #2 in Los Angeles County out of a field of 88 cities. The city's Planning and Economic Development department provides a business assistance program consisting of a comprehensive mix of resources to small business owners and entrepreneurs. Ralphs, a subsidiary of Kroger, is headquartered at 1100 West Artesia Boulevard in Compton.
Compton is surrounded by multiple freeways which provide access to destinations throughout the region. The Long Beach and Los Angeles Ports are less than 20 minutes from downtown Compton, providing access to international destinations for customers and suppliers. The Alameda Corridor, a passageway for 25% of all U.S. waterborne international trade, runs directly through Compton from north to south.
Transportation

Four freeways are near the city's boundaries and provide access to destinations throughout the region. These include Interstate Highways 105, 110, 710, and State Route 91.
The Metro Blue Line light rail runs north-south through the city; Compton Station is in the heart of the city, adjacent to the Renaissance Shopping Center. The Blue Line connects Compton to downtown Los Angeles and downtown Long Beach.
There is also a Compton Renaissance Transit System that serves the local community.
Compton/Woodley Airport is a small general aviation airport located in the city. The airport lies within busy airspace, as it is situated within a few miles of both Los Angeles International Airport and Long Beach Airport.
Greyhound Lines operates the Compton Station.
Collectively, these multi–faceted transportation links lend justification to the city's familiar name of "the Hub City."
Education

The city is served by Compton Unified School District. The district is a participant of the FOCUS program conducted by the University of California, Irvine. The goals of the program are to improve mathematics and science achievement by uniting the efforts of mathematics, science, education and research library faculty and staff with educators of the school district.
There are currently three high schools that are part of CUSD, which are Centennial High School, Dominguez High School, and Compton High School.
The city is also served by El Camino College Compton Center, Reed Christian College and Yuin University.
City sites

The Heritage House serves as an important landmark of Compton's rich history. Located at the corner of Myrrh and Willowbrook near the Civic Center Plaza, the Heritage House is a rustic-looking home that will eventually house a museum detailing early life in Compton. For now it demarks the stark difference between the simple life of the 1800s and the fast-paced urban environment of the 21st century.
The Major League Baseball Academy is a youth baseball academy providing free baseball and softball instruction to Southern California youth.
Tomorrow’s Aeronautical Museum is a unique compilation of a living interactive museum, after-school programs, gang intervention programs and flight school.
Home to now a churchill all-american Travis Terry.

Los Angeles portal
South Los Angeles
List of famous people from Compton
Willowbrook, California Willowbrook, California Lynwood, California
v • d • e



West Compton, California Downtown Compton East Rancho Dominguez, California

Carson, California Rancho Dominguez, California Long Beach, California
Further reading

Adams, Emily, "Bush's Compton Roots Raise Thorny Issue", Los Angeles Times, August 3, 1992, page B-1
Miller, Gary J., Cities by Contract: The Politics of Municipal Incorporation, The MIT Press, Cambridge, Massachusetts and London, England, 1981
Gould, Lewis L. (editor), American First Ladies: Their Lives and Their Legacy, Garland Publishing, New York and London, 1996. See pages 612-613 regarding the Bush family's "nomadic" existence in the cities of Huntington Park, Bakersfield, Whittier, Ventura and Compton, California.
The George Bush Presidential Library web site states that during the period from 1948 to 1951, "Bush and his family moved several times, living successively in Odessa, Texas; Ventura, Bakersfield, and Compton, California; and Midland, Texas." Zapata Oil Files, 1943–1983 The web site also includes a photograph of George W. Bush and Robin Bush in Compton, dated December 1949.

(source:wikipedia)