Показаны сообщения с ярлыком Linux. Показать все сообщения
Показаны сообщения с ярлыком Linux. Показать все сообщения

пятница, 29 июня 2012 г.

Memory Ordering in Modern Microprocessors

Memory Ordering in Modern Microprocessors (Part IPart II).

"Linux provides a carefully chosen set of memory-barrier primitives, as follows:
  • smp_mb(): “memory barrier” that orders both loads and stores. This means loads and stores preceding the memory barrier are committed to memory before any loads and stores following the memory barrier.
  • smp_rmb(): “read memory barrier” that orders only loads.
  • smp_wmb(): “write memory barrier” that orders only stores.
  • smp_read_barrier_depends(): forces subsequent operations that depend on prior operations to be ordered. This primitive is a no-op on all platforms except Alpha."


    "All of Linux's locking primitives, including spinlocks, reader-writer locks, semaphores and read-copy updates (RCUs), include any needed barrier primitives."

    P.S. Тут, видимо, вариант той же самой статьи.
    P.P.S. Эти статьи можно использовать как введение к более сложному чтиву - "What Every Programmer Should Know About Memory" (114 pages).

понедельник, 25 июня 2012 г.

Efficient data transfer through zero copy

Efficient data transfer through zero copy.

Суть: при копировании File -> Socket через transferTo удается избежать лишних копирований данных и переключений user mode <-> kernel mode. Остается два копирования, но они делаются не через CPU, а через DMA.

Вопрос: возможно ли достичь аналогичного эффекта при копировании Socket -> Socket? Пока ищу ответ. Скажем, если я использую ByteBuffer.allocateDirect(...).

вторник, 5 октября 2010 г.

An Analysis of Linux Scalability to Many Cores

An Analysis of Linux Scalability to Many Cores

ABSTRACT
This paper analyzes the scalability of seven system applications (Exim, memcached, Apache, PostgreSQL, gmake, Psearchy, and MapReduce) running on Linux on a 48-core computer. Except for gmake, all applications trigger scalability bottlenecks inside a recent Linux kernel. Using mostly standard parallel programming techniques — this paper introduces one new technique, sloppy counters — these bottlenecks can be removed from the kernel or avoided by changing the applications slightly. Modifying the kernel required in total 3002 lines of code changes. A speculative conclusion from this analysis is that there is no scalability reason to give up on traditional operating system organizations just yet.

P.S. From MIT reseachers

суббота, 3 апреля 2010 г.

Some Linux I/O papers

Comparing and Evaluating epoll, select, and poll Event Mechanisms
Abstract
This paper uses a high-performance, eventdriven, HTTP server (the mserver) to compare the performance of the select, poll, and epoll event mechanisms. We subject the mserver to a variety of workloads that allow us to expose the relative strengths and weaknesses of each event mechanism.

четверг, 11 февраля 2010 г.

Above the clouds with Android

Эта статья , как мне показалось, заслуживает нашего внимания :)

Summary: The open source Android operating system has taken the world by storm, allowing sophisticated cloud computing applications to run wherever you are. Designed to be highly efficient on battery-powered devices like the T-Mobile G1 smartphone, at heart, Android is Linux®, and there are several layers to the Android programming model that permit the creation of secure applications tailor-made for cloud computing. Soar to new heights with Android and experience mobile computing as you've never experienced it before.

Есть в русском варианте тут