Changes between Version 14 and Version 15 of io_operations


Ignore:
Timestamp:
Nov 3, 2016, 2:24:29 PM (7 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • io_operations

    v14 v15  
    3434|| NIC     || ext   || network interface controller || [wiki:nic_device_api nic_api] ||
    3535
     36== C) Devices Descriptors Placement ==
     37
     38'''Internal peripherals'''  are replicated in all clusters.  In each cluster, the device descriptor is evidently stored in the same cluster as the hardware device itself. These device descriptors are mostly accessed by the local kernel instance, but  can also be accessed by any thread running in any cluster (ICU, or MMC). To simplify the remote accesses to these structures, they are defined as global variables, in order to have the same base address for a given device in all clusters.
     39
     40'''External peripherals''' are shared resources, located in the I/O cluster. To minimize contention, the corresponding device descriptors are distributed on all clusters, as uniformly as possible. Therefore, an I/O operation involve generally three clusters: the client cluster, the I/O cluster, and the server cluster, containing the device descriptor.
     41
     42The ''devices_dir_t'' structure contains  extended pointers on all generic devices defined by ALMOS_MK. There is one entry per channel for the external devices. There is one single entry per internal device, but the CXY value is not significant.
     43
     44This device directory being implemented as a global variable, is replicated in all clusters, and is initialized in the kernel initialization phase.
     45
    3646== C) Waiting queue Management ==
    3747
     
    4353The single reader is a server thread associated to the device descriptor, and created at kernel initialization. This thread is in charge of consuming the pending commands from the waiting queue. When the queue is empty, the server thread blocks on the THREAD_BLOCKED_QUEUE condition, and deschedule. It is re-activated by the client thread when a new command is registered in the queue.
    4454
    45 Finally, each device descriptor for a generic device XYZ contains a link to the specific driver associated to the available hardware implementation. This link is established in the kernel initialization phase.
    46 
    47 * As '''internal peripheral''' are private resources, replicated in all clusters, the device descriptor is stored in the same cluster as the hardware device itself. Therefore, most accesses are local.
    48 * For '''external peripherals''', the hardware devices are shared resources, located in the I/O cluster. To minimize contention, the device descriptors are distributed on all clusters, as uniformly as possible. Therefore, an I/O operation involve generally three clusters: the client cluster, the I/O cluster, and the server cluster, containing the device descriptor.
     55Finally, each generic device descriptor contains a link to the specific driver associated to the available hardware implementation. This link is established in the kernel initialization phase.
    4956
    5057== D) Drivers API ==