0% found this document useful (0 votes)
58 views

Software System

This document section provides an overview of the software system for the C&C08 Digital Switching System. It describes the key components of the operating system, including task management, message management, memory management, and timing management. It also covers protocol engineering, data structures, databases, and the patch function. Task management uses a priority-based preemptive scheduling approach to dispatch tasks in different states like ready, suspended, and executing. The software comprises tasks for communication, resource management, call processing, database management, and maintenance.

Uploaded by

Samuel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Software System

This document section provides an overview of the software system for the C&C08 Digital Switching System. It describes the key components of the operating system, including task management, message management, memory management, and timing management. It also covers protocol engineering, data structures, databases, and the patch function. Task management uses a priority-based preemptive scheduling approach to dispatch tasks in different states like ready, suspended, and executing. The software comprises tasks for communication, resource management, call processing, database management, and maintenance.

Uploaded by

Samuel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Technical Manual

C&C08 Digital SPC Switching System Table of Contents

Table of Contents

Chapter 4 Software System......................................................................................................... 4-1


4.1 C&C08 Software Introduction ........................................................................................... 4-1
4.2 C&C08 Operating System ................................................................................................ 4-1
4.2.1 C&C08 Task Management..................................................................................... 4-1
4.2.2 C&C08 Message Management .............................................................................. 4-4
4.2.3 C&C08 Memory Management................................................................................ 4-6
4.2.4 C&C08 Timing Management.................................................................................. 4-9
4.2.5 C&C08 System Start and Recovery..................................................................... 4-10
4.3 C&C08 Protocol Engineering.......................................................................................... 4-11
4.3.1 Protocol Description and Verification ................................................................... 4-11
4.3.2 Protocol Implementation ...................................................................................... 4-11
4.3.3 Protocol Test ........................................................................................................ 4-12
4.4 Data Structure and Database ......................................................................................... 4-13
4.4.1 Data Architecture ................................................................................................. 4-13
4.4.2 Database Architecture.......................................................................................... 4-16
4.4.3 C&C08 Database Characteristics ........................................................................ 4-19
4.5 Patch Function ................................................................................................................ 4-19

Huawei Technologies Proprietary

i
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

Chapter 4 Software System

4.1 C&C08 Software Introduction


The C&C08 is designed according to the recommendations of ITU-T Q.500 series
standards. To meet the requirements of all the functions of an exchange, the C&C08
Software comprises the following parts: operating system, communication task,
resource management task, database management task, maintenance task and call
processing task. Apart from that, the patch function is also adopted to enhance the
software's ability to adapt to the changing needs of environments and customers.

4.2 C&C08 Operating System

4.2.1 C&C08 Task Management

A task is also called a process. It can be defined as a program unit that is dispatched by
the operating system and executed by the CPU. Task management is designed
according to each task's dynamic features, simultaneous features and the
asynchronous relevance between different tasks. With this concept, the process logic
involved in completing the various tasks in C&C08 can be clearly described.
C&C08 Software System can be divided into communication task, resource
management task, call processing task, database management task and maintenance
task. They are all carried out under the control and administration of the C&C08
Operating System.

I. Task status

Task, as an "executable process unit", has changeable status. Tasks in C&C08


Switching System have four statuses: executing, ready, suspended and dormant.
When a task is in the executing state, it means the task is occupying CPU resource and
is being processed. The CPU processes only one task at a time, which means that
there can be only one task in the executing state at any moment.
Ready state means the task is ready and waiting for being executed. For example, after
off-hook takes place, the analog user task will be in the ready state. In the C&C08
System, the tasks in ready status are executed in sequence by priority level.
A task waiting for system dispatching (before certain event happens) is in suspended
status. For example, before off-hook, analog user task is in suspended state.
In C&C08 Operating System, task status transition principle is as illustrated in Figure
4-1:

Huawei Technologies Proprietary

4-1
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

Executing state

Time

Su
Call

sp
slot

en
e

d
l et
De
Ready state

te
ea E ve
Cr nt o
te c cu
D ele rs
Dormant state Suspended state
Delete

Figure 4-1 C&C08 Operating System task status transition diagram

II. Task scheduling

C&C08 Operating System adopts the preemptive dispatch scheduling strategy based
on task priority and event priority. High priority task in ready status is always executed
first by CPU. Tasks in the same priority level are executed according to the sequence of
the time when they enter the ready status. In C&C08 Switching System, each created
task is given a priority number (0-255). The smaller the number, the higher is the priority.
"0" stands for the highest priority in the system.
Sometimes a high priority task T1 is suspended and waits for necessary resource, but
the resource is occupied by a task T2 whose priority level is lower than T1, then the
high priority task is blocked by lower priority task. This is known as priority inversion. If
T2 has to repeat the execution several times, before the resource that has been
engaged can be released, the waiting time for T1 will be very long as the low priority T2
takes a long time to be scheduled each time. Thus, it is hard to guarantee the real-time
execution of a high priority task T1. C&C08 Operating System uses the priority
inheritance technology to solve this problem. When a high priority task is blocked by a
low priority task, the low priority level task can be promoted to a higher priority level so
that it can be scheduled fast and its resource occupying time can be shortened.
If a high priority task is triggered into ready state by some event when some task with
lower priority is being executed, the high priority task can interrupt the lower priority task
and make it suspended to seize the CPU control right, to fulfill the real time requirement
of the system.

III. Task architecture and executing process

In C&C08 Switching System, every created task is given a unique ID, named a task
number. Each task is made up of two parts: one is initialization and the other is event
process. "Event" mainly refers to message event; hence, it is also called message
process. Static task architecture description is as shown in Figure 4-2:

Huawei Technologies Proprietary

4-2
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

Initilization

Message process

Figure 4-2 Task structure

In C&C08 Switching System, each task is formed by the above architecture. The
shaded area is the special part unique to each task's realization.
A task can be described as follows (with C language) according to this architecture:
{
Initialization ( ); /*initialization*/
While (TRUE)
{
Suspended ( ); /*suspended status, not occupy CPU resource */
Message process( ); /*executing status, occupying CPU resource */
}
}
Tasks are driven by events. When a task is created, it first completes self-initialization,
then suspends itself and waits for event happening. When some event happens, the
operating system sets the task to ready state. By task scheduling, task in ready status
can be executed and corresponding events be processed. When event processing is
completed, the task is suspended again, waiting for another event.
In C&C08 Switching System, events include: message event, timing event and
interruption event.

IV. Exclusion of tasks and synchronization

In C&C08 Operating System, there are many tasks, which operate in an asynchronous
way, but they are not completely independent to each other. The operating system must
manage these tasks to keep the whole system running in a coordinated way, since
there exists a constraint of the resources that are shared by these tasks.
In C&C08 Switching System, there are two kinds of task relationships, namely resource
exclusion and logical synchronization. Resource exclusion means that even though
certain resources are shared between some tasks, at any given moment, these
resources can be occupied by only one of these tasks. Logical synchronization means
that there is a certain sequential relationship among tasks, that is, when some task has
been executed to a certain point, then only, another task can be executed continuously.
In C&C08 Switching System, task exclusion is coordinated by semaphore or by on/off
interruption mode. Task synchronization is guaranteed by event message. When some
task has been executed to a certain point, some messages are sent to activate other
tasks.
Interrupt Service Request (ISR) includes:
z Clock interruption provides the system with real time clock and timer services.

Huawei Technologies Proprietary

4-3
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

z Port interruption receives the frames and other signals coming from the other
ports.
z Exception interruption is for system exception handling. The interruption process
can send message or set directly the semaphore for other tasks.

4.2.2 C&C08 Message Management

Besides timing event and interruption, communications among tasks in C&C08


Switching System are driven and completed by message event. A message has the
following two functions:
z Activate task to ready status or to be executed
z Transmit data among tasks

I. Message description

Message block structure in C language is as shown below.


struct MSG
{
unsigned char sender_mid; //sending message module (SM) ID // (module number);
unsigned char sender_id; //sending message task ID (task number);
unsigned char receiver_mid; //receiving message module number;
unsigned char receiver_id; //receiving message task number;
unsigned int length; //message block length;
unsigned char data[ ]; //message content;
};
The message block indicates that the message is sent from a certain task of a switching
module to another task of another switching module. The message may also be
transmitted between two tasks within the same switching module, and it may even be
sent and received by the same task. The invocation mode provided by the C&C08
Operating System to the application programs and which relates to message
management is of the following three types:
z Apply for message block
z Send message block
z Release message block

II. Message queue management

In C&C08 Switching System, message is managed with queue method. The three
types of message queues are, idle queue, application queue and ready queue. Each
queue is realized by linked list, as shown in Figure 4-3:

Huawei Technologies Proprietary

4-4
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

Queue control block

......
Idle queue head ...... .........

Idle queue tail

......
Application queue head ...... .........

Application queue tail

......
Ready queue head ...... .........

Ready queue tail


.
. .
. .
. .
.
.

Figure 4-3 Message queues

There are only one idle queue and one application queue in the system, while ready
queue corresponds one to one to each task. Messages in the ready queue of a task are
organized according to their priority and sending sequence. Messages of the same
priority are organized by message sending time sequence. In ready message queue,
the message unit structure is as follows:
struct Msg_link
{

unsigned int next; //point to the next message unit


unsigned int prev; //point to the previous message unit
unsigned char priority; //message event priority level
struct MSG message; //message block
};
To save space and increase efficiency, C&C08 Switching System provides a public
buffer for all the messages to make use of. Queue operation deals only with the
changing of queue pointer without need to copy or move the contents of the message
block. The change of status process is expressed in Figure 4-4:

Huawei Technologies Proprietary

4-5
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

Idle queue

Alloc_message_block

Application queue

Free _message_block Send_message_block

(Organized accroding to the


Ready queue
receiver_id in message)

Free_message_block

Figure 4-4 Message queue management

4.2.3 C&C08 Memory Management

Memory management is an important part of the operating system and it includes the
following:
z Memory allocation and release
z Memory test and protection
z Address conversion
z Memory expansion

I. Memory allocation and release

With the embedded application feature of C&C08 Switching System, the memory
allocation and release is not so frequent, i.e. a memory once allocated will be used
generally for a rather long period. Hence, the system organizes memory by link table,
and allocate memory block by Best-Fit algorithm. Best-Fit algorithm searches for an
idle block on the idle link with the size nearest to the size that is applied, so that the
space occupied by memory fragments can be effectively decreased and the memory
utilization rate increased. A memory control block structure is as the following:
struct Memctrl_block
{
unsigned char flag[2]; //memory block mark
unsigned long next; //initial address of the next memory block
unsigned long prev; //initial address of the previous memory block
unsigned long size; //memory block length(byte)
unsigned char owner_task; //belongs to which task
unsigned char state; //memory block status(idle/used)

Huawei Technologies Proprietary

4-6
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

};
A memory link can be illustrated in Figure 4-5:

Next Next
next Next

… ..

Prev Prev Prev

Figure 4-5 Memory link table

In Figure 4-5, the blank part is the memory control block, and the green-colored area
followed is the usable memory block. The following example demonstrates by example,
how the memory block is applied for and how the memory space is split:
1) A 1024 bytes idle memory block (control block occupies 16 bytes):

16 1024 bytes

Control
Free
block

2) After the allocation of a 200 bytes memory block:

16 200 bytes 16 808 bytes

Control Control
Allocated block Free
block

3) After the allocation of a 300 byte memory block:

16 200 16 300 16 492

Control Allocated Control Allocated Control


Free
block block block

4) Release the 200 byte block:

16 200 16 300 16 492


Control Free Control Allocated Control
Free
block block block

5) Release the 300 byte block:

16 1024

Control
Free
block

System call functions related with memory operation provided by C&C08 Operating
System are:

Huawei Technologies Proprietary

4-7
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

z Far_malloc: memory block application


z Far_free: memory block release

II. Memory test and memory protection

C&C08 Software adopts the flat mode, which means all the data and program codes
are stored in a single segment. Here, memory protection is the prevention of cross
boundary usage of memory. There is a memory block flag in the memory control block
which occupies 2 bytes, where two special letters, M or Z, are stored to indicate
whether this memory block is normal (not corrupted). If the flag content is different from
M or Z, it means that the memory block has been corrupted.
C&C08 Operating System checks the legality of each memory control block on memory
link regularly, for example, whether the flag is M or Z, whether the block content lies in
effective scope, etc. If something erroneous is found, then error-tolerance processing
must be activated. Tasks in the destroyed memory area will be stopped and rebuilt.

III. Address conversion

Address conversion is address relocation. Programmers use a logical address, which


is independent of machine programming, and the address space so formed is called a
logical address space. Physical address and physical address space of each segment
of memory, corresponds to the logical address and logical address space. When a
program with logical address is loaded in to the memory, there exists a relationship
between the logical address and the physical address.

IV. Memory expansion

Memory expansion is also called virtual memory. System creates a memory space,
which is much larger than and not limited by the physical memory capacity. Thus the
programmer is not be restricted by the specific physical memory structure and capacity.
The two basic ideas to implement memory expansion are:
z To separate program address space and memory physical space;
z To relocate the program address to physical address;
The model of this process is illustrated in Figure 4-6.

Huawei Technologies Proprietary

4-8
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

Mapping table

Processor a a' Memory


a'

Address conversion part

a: Program address
a': Memory address

Figure 4-6 Program address relocation

If a memory address cannot be found in the mapping table, it means that some
information in the program space is located in an external memory. In such a case, the
system loads external memory content into memory, modifies the address mapping
table, and converts the address. Memory expansion is realized through occupying
external disk space as memory and utilizing CPU to exchange the stored contents
between internal and external memories.

4.2.4 C&C08 Timing Management

C&C08 manages timing according to real-time processing requirement:


1) Periodical scheduling: This is a clock level task. There are four clock level tasks in
C&C08 Operating System, and their cycles are respectively 10ms, 100ms,
1second and 1 minute.
2) Time-out scheduling: This means that the time period preset for a timer has
expired and a time out message is to be sent to activate a specific task, to
complete the time-out handling process. Time-out services in C&C08 Operating
System have two timing modes, one is the absolute timing and the other is the
relative timing. Absolute timing requires the operating system to decide a future
absolute moment in advance and when the system clock reaches that pre-defined
time, the time-out message is triggered. There are two cases in absolute timing.
Relative timing means that time duration is calculated from the moment the timer
is triggered.

C&C08 Operating System provides the following services:


z Start relative timing service counting by second
z Start relative timing service counting by 100 ms
z Stop relative timing service
z Register non-repetitive absolute timing service
z Register repetitive absolute timing service in a 24 hour cycle

Huawei Technologies Proprietary

4-9
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

z Stop absolute timing service

4.2.5 C&C08 System Start and Recovery

C&C08 Switching System increases the overall reliability and its self-recovery ability by
providing two important system recovery levels: 1) Restart and 2) Booting & Loading.
Restart executes the booting operation and depending on the restart level decides
whether to load the whole system again. Loading is a higher level system recovery
method, where program and data from BAM is reloaded into the memory, and the
whole system is reinitialized and loaded.

I. Restart

C&C08 Switching System provides the restart function at four levels to meet the needs
of various operation environments and terminal maintenance. The specific functions
and their effects are as follows:
1) Level 1 restart
z Does not affect tickets but affects the calls in connection
z Does not affect ongoing calls
z Does not load data or program
2) Level 2 restart: This restart initializes all module control variables and status
control variables, and does not affect tickets but affects the calls in connection
z Affects connected calls
z Does not load data or program
3) Level 3 restart: This restart reconstructs the whole system, loads only data and not
program from BAM.
4) Level 4 restart: This restart reconstructs the whole system, loads both data and
program from BAM.

II. Booting and loading

C&C08 combines the programs for booting & loading and fixes them in the ROM. In
ROM, the Basic Input and Output System (BIOS) occupies 512 bytes, and following is
the loading program.
1) ROM BIOS booting
When system is powered on, the ROM BIOS will start first to initialize the MPU
hardware, including memory, clock and interruption, and shifts itself and the loading
program into low memory area, to continue with the software initialization. After that,
the loading program gets executed.
2) Loading
Loading program runs in protection mode for the convenience to access upper memory.
The execution process is as follows:
z Initializes global description symbol table, interruption description symbol table,
local description symbol table, and enters protection mode.
z Initiates timer interruption

Huawei Technologies Proprietary

4-10
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

z Reads hardware switch set (or software switch in remote control mode), to decide
whether to load from BAM or from FLASH memory. Either only data or program, or
both of them together can be loaded from BAM. The part, which is not loaded from
BAM, is to be loaded from FLASH. The capacity of program and data FLASH can
be configured through jumper settings on MPU card, to meet various operation
requirements. When the switch is set to the loading from FLASH position, loading
program will first verify whether the program and data in the FLASH memory are
usable. If not, then the loading program will request automatically, to load from
BAM.
z Chooses loading path: The capacity of a C&C08 Exchange can expand
effortlessly from 256 lines to 800,000 lines, and can be configured as either a
multi-SM exchange or a single-SM exchange. Different configurations need
different loading paths.
z Establishes connection with BAM.
z Loads program and data into appropriate memory locations.
z Checks the program and data, reloads if they are not correct.
z If correct, decides according to hardware switches setting, whether to copy the
program and data into FLASH memory or not. If yes, executes copying. Finally
loads them into memory.
z Executes the program, and the exchange becomes functional.

4.3 C&C08 Protocol Engineering


The design of C&C08 Communication Protocol Software is based on ISO Open System
Interconnection Reference Model (OSI/RM) and adopts the protocol engineering
method to realize the distributed protocol system. C&C08 communication protocol
software development experiences protocol description, verification, realization and
test phases.

4.3.1 Protocol Description and Verification

Protocol concept described in the normal usage language- is very vague. The Finite
State Machine (FSM) of communication protocol must be described accurately with
formula descriptive language, and be able to verify them. In C&C08 Communication
Protocol Software realization, Specification Description Language (SDL)
recommended by ITU-T is used to support the layered, modular and structured
software development. Communication protocol software is realized automatically on
the basis of formula descriptive SDL.

4.3.2 Protocol Implementation

The whole C&C08 Communication Software is designed as an integrated system. The


system is connected with other environment through channels, and is composed of a
lot of functional modules. Each connected functional module is relatively independent
of other modules. The only communication means between two different functional
modules is to receive and send signals via channels.

Huawei Technologies Proprietary

4-11
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

Inside a functional module, different processes can communicate through signal or


shared value of data. In this way, functional module not only provides an organization
which functions to combine the processes, but also a boundary for data visibility. When
defining C&C08 functional module, the processes classified into one functional module
are combined reasonably according to their functions.
Message channel is the means of the communications among different functional
modules or between a functional module and environment. A channel can connect one
functional module to another functional module or environment in either single-way or
dual-way modes. Generally, message channel is a functional entity, each of which
stands for a certain specific communication path. Through channel dividing, the
behavior of each channel can be defined.
Signals can be defined at system level, functional module level or be defined in a
process. Signals defined at a certain level can be used in that level and at levels lower
than that. Signals defined in a process can be used between instances of the same
process type.
Similar to the message channel, route can also be used to represent a communication
path. They can be used in functional module level or process level. When a signal is
transmitted to a route connecting to functional module boundary, the signal is handed to
the message channel connected with the route. When a signal reaches this functional
module from a message channel and if this channel connects with one or multiple
route(s), the signal will be transmitted to the route, which can be used to transmit the
signal.
Process is an expanded finite state machine and it defines the dynamic behaviors of a
system. Process mostly is in the state waiting for signals. When a signal is received,
process will respond and execute a specific action. Relative logical action is defined
according to the signaling type received by the process. There are different states for a
process, according to which, it executes different logical behaviors on receiving the
same signal under different statuses. These statuses also provide the memory, with the
earlier occurred logical behaviors. When all the actions corresponding to a received
signal have been completed, the process will jump into the next status and wait for the
next signal.
Process may be created in the stage of system initialization or be created by other
processes. It can be stopped by executing a stop action.
During the whole software realization process, timers are always required. In concept,
the needs of time measuring and of requesting for timing processing in a system is
achieved by timers and a group of operations related to them.
"Timer" model is made up of some elemental processes, which can send a signal to
process when requested. The timer must first be defined in the process definition.
From the above description, it can be seen that the C&C08 Switching System is a
dynamic, multi-task real-time processing system making use of various functional
modules, processes, channels and signals.

4.3.3 Protocol Test

Protocol software developed according to standard protocol documents needs


consistency test. With the development of the open system interconnection standard
system, ITU-T issues a series of test standards for various level protocols.
The purpose of protocol test, on one hand, is to verify whether protocol software
satisfies the standard and possesses the required protocol functions; on the other hand,

Huawei Technologies Proprietary

4-12
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

it guarantees that the subscribers can communicate with each other via unified
standards.
In testing, the side performing the test is called the main testing system (or testing
center), while the tested side is called implementation under test (IUT). Main testing
system and IUT jointly form the complete protocol testing system. To ensure protocol
completeness, main testing system not only uses protocol data and valid parameters at
various levels to test the system and check the responds, but also generates erroneous
and invalid data too and input them to the tested system to verify whether the system
can handle abnormal situations in comparison with the prescribed standards. The
tested side must possess the test responding function. Each layer serves for its upper
layer, and can be repetitively called by accepting the service primitives sent by its upper
layer. When the function of a certain layer is being tested, its adjacent-leveled layer
should also be added a test responding module to respond to the testing series sent
from the main testing system. Test responding module must be adaptable to the system
structure of the main testing system, as well as the testing methods and testing
functions required by it.
Actually, the test system structure decides the test methods. What is shown in Figure
4-7 is the standard test structure for OSI.RM. By this method, whenever a certain layer
is tested, it is under the assumption that all its lower layers have passed the
corresponding tests.
The testing system comprises 3 physical parts: active tester (AT), IUT and
communication media. AT is the key part of the testing center; it controls the whole work
of the testing system, which is shown in Figure 4-7 and checks for all the possible error
types in the tested system. It has functional modules, such as test control module,
communication media managing module, environment operation and monitoring
module, etc.

Test driver
Test driver Responding protocol Test respondent

Neighboring upper
Neighboring upper layer layer protocol tested protocol
Protocol + coder/decoder Error realization (IUT)

Current layer
Current layer protocol protocol Current layer protocol
realization error generator realization

Lower layer communication channel

Figure 4-7 Test system scheme

4.4 Data Structure and Database

4.4.1 Data Architecture

Various switching functions in C&C08 are controlled and accomplished by the program.
While the introduction and deletion of these functions are realized by data stored in the
exchange, the data is usually stored and managed concentrically. This collective data
forms the database and data management is realized by Database Management

Huawei Technologies Proprietary

4-13
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

System (DBMS). All the data is extracted from BAM, by Man Machine Language (MML),
which conforms to the ITU-T Z.300 series recommendations.
Database in C&C08 is of a relative mode and it arranges its data using some
two-dimensional tables where storage of the data is done in relation to each other
through certain linkages. These tables are called relation tables. Each row in the
relation table is a tuple, and each column is a field. Each tuple forms a logical record,
whose number depends upon that table's property. For example, in equipment
description table, the number of tuples is equal to the total number of equipments. Field
number is according to the logical complexity of a table. With relation tables, it is easier
to program and carry out its application.

I. Data dictionary

Data definition in DBMS is described by the data dictionary, which is divided into
relation description table and field description table. Relation description table
describes the table structure, including:
z Table type: This defines the types of relation table, i.e. whether it is a sequence
table, sorted table or a direct index table.
z Tuple length: This gives the table tuple length in bytes.
z Maximum tuple in a table: This is the maximum number of tuples in a particular
relation table.
z Actual table tuple in working area: This is the actual table tuple number in the
working area.
z Actual table tuple in non-working area is the actual table tuple number in the
non-working area.
z Field number: This is the total number of fields in a relation table.
z Field definition pointer: This points to the field definition table. Field definition can
be found in field definition table with this pointer.
z Index field number is the number of the index fields (key fields) in a table
z Default tuple number: this is the number of the default tuples in a table
z Table lock mark is used to identify whether the table is in writing forbidden mode.
z Storage address of working area table is the relative address pointer of working
area table
z Storage address of non-working area table is the relative address pointer of
non-working area table
z Version number of working area table is the table version in working area
z Version number of non-working area is the table version in non-working area
z Checksum of working area table: is the table checksum of this working area
z Checksum of non-working area table is the table checksum of non-working area
z Table modification mode describes the modification mode of a relation table, and
there are such options as single item modification, whole table modification and
modification not allowed.
Field description table defines each field, including:
z Data type: It is the data type of a field
z Field length: It is the field length in bytes

Huawei Technologies Proprietary

4-14
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

z Sort mode is the type of mode in relation table, including ascending mode and
descending mode
z Sort sequence number is the sort sequence number of a field in relation table
z Wildcard: This is a wildcard of field value in relation table

II. Data type

C&C08 Database uses the following basic data types:


1) Unsigned character integer: 0~255
2) Signed character integer: -127~127
3) Unsigned integer: 0~65535
4) Signed integer: -32767~32767
5) Unsigned long integer: 0~4294967295
6) BCD character string: Valid value 0~0xf
7) ASCII character string: Valid ASCII characters

III. Table type and index method

Table type description is done in relation to description table of the data dictionary.
C&C08 database uses three types of relation tables:
z Direct index table: This table can be accessed directly through the tuple number.
As the tuple number is not a part of the relation table, insertion or deletion
operation of a tuple does not affect the table order.
z Sequence table: All tuples in a table are arranged in sequence. Searching of a
record begins from the first tuple and proceeds sequentially. A newly added tuple
is located at the end of the table.
z Sorted table: Tuples in relation table are sorted according to the value of key
words. There should not exist two tuples which are the same in sorted filed (key
field) values. If there are many key fields, each key field is assigned a sorting
mode (ascending or descending) and a sorting number and the key with the
smallest sorting sequence number is sorted first. The query for the sorted table
employs binary tree search method. Tuple insertion and deletion will cause the
movement of the following tuples.

IV. Data categories in a C&C08 Exchange

1) System data is the data inherent in software itself, including software parameters,
timers and event description, etc.
2) Prefix data is related with call number prefix. It is used as number prefix analysis
data, reflecting ordinary number planning scheme, billing, new service number
format, number allocation and route scheme, etc.
3) Trunk data describes inter-exchange route, circuit and signaling coordination data,
including Common Channel Signaling and Channel Associated Signaling.
4) User data describes local office subscribers, PABX subscribers, the mapping
between subscriber number and equipment number, etc.

Huawei Technologies Proprietary

4-15
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

5) IN data describes the IN call-related configuration of Detection Point (DP), the


corresponding SCP, IN charging, SCCP setting, and the dedicated resources.
6) Billing data describes the data related to charging.
7) SS7 Signaling data describes data used for SS7 Signaling like MTP, TUP and
ISUP.
8) Configuration data is related with hardware configuration, such as rack, frame,
card, mailbox and HW configuration.
9) Network management data is data used for exchange traffic and network
management.

4.4.2 Database Architecture

C&C08 DBMS uses distributed relation database. This feature "distributed" means that
in each module part of the data is stored, including global data, global link table and
private data. Data in the same module is stored in a relational mode and managed
uniformly by the relational database subsystem Relational database sub-systems
among modules are relatively independent and are consistent. From the physical point
of view, a sub-system is a separate part of the entire database system. From the logical
point of view, these database sub-systems are organic entities and make up the
distributed relational DBMS. Multiple local databases construct the global database
function by coordinating with each other. The database structure of each module is as
shown in Figure 4-8:

API API Application program


interface

C&C08 AM/CM
database
DBMS DB

SM SM

DBMS DBMS

DB DB
Database Database

Figure 4-8 Module database structure

Relation model uses two-dimension tables that may be operated with algebraic
association to describe the correlation between entity properties and relationship
between entities. It sums up the data logical structure as a two-dimensional table,
which can satisfy certain conditions, and the table is called a "relation". The main
feature of the relation model is that not only data in the table but also data relation is
expressed by the two-dimensional table.

Huawei Technologies Proprietary

4-16
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

I. Database

Database consists of many relation tables, which are loaded into the MPU memory
from BAM and backed up in the FLASH memory. DBMS queries the database in RAM
without any disk file operation, thus ensuring that the query speed is very fast. Any
modification to data is backed up in FLASH immediately, to prevent data loss when
there is a power failure.
Database occupies a segment of continuous address space, paged by 128 bytes or
256 bytes. Its structure is shown in Figure 4-9.
System data (1024 byte)
Data dictionary
Data table

Figure 4-9 Database address space

The data dictionary describes the relation table structure of C&C08 Database. Data
dictionary itself is a relation table. There are two data dictionary tables: one is table
description table, the other is field description table.
C&C08 Switching System uses modular distributed control mode. Each module owns
its related data according to the functions. C&C08 Switching System Database is the
data aggregation of all modules. The physical position of each relation table in the
database is arranged according to requirement.
Under certain circumstances, one module may need only a part of the data in a certain
relation table and some other module may need other parts of the data from the same
table. To avoid redundancy, the relation table is divided into different parts. Each
module stores only the needed tuples. In this way, the table is distributed in different
modules.
Under some other circumstances, a group of modules may need the same data from
one relation table. If only one relation table contains this data in the database, then it
takes a very long time to save and withdraw this data because all data requests are
sent to the module for processing. To avoid this, a data copy can be saved in the
module needing this data, that is, this relation table can be copied into different
modules.

II. Database management system(DBMS)

C&C08 DBMS has the following major functions:


z Data definition defines the relation table structure, field type, data distribution
location, saving and withdrawing mode, etc.
z It provides data query, saving and withdrawing, and modification interface for
application program.
z It keeps data consistent and secure.
z Data backup is available.
According to DBMS functional needs, C&C08 Database System is divided into two
layers: the bottom layer is the relation management layer, realizing the functions of
saving, query, modification, backup, keeping data integrity based on expanded relation
data model It also takes care of security and consistency control based on transaction
processing, and executes database dual-backup. It is the core of the simplified relation
database management system. It provides a group of function interfaces to save and
withdraw data for upper layer. Upper layer includes call processing interface module

Huawei Technologies Proprietary

4-17
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

and data maintenance module. Call processing module provides database query and
search for call processing. Data maintenance module works together with terminal
database management system to complete on-line data modification, query and other
database maintenance operations.
C&C08 Database has 3 search methods. Search method and related information of the
table can be found in data dictionary:
1) Sequence search
All tuples are arranged in sequence. Each search starts from the first tuple, then the
second until the needed tuple is found. Newly added tuple is put at the end of the table.
Frequently queried tuples are put in front.
2) Index access
A relation table is accessed through the index field of the index table. It is suitable for
direct index table. The index field of the index table is invisible and not the real part of
the table to be queried.
Usually, key field values are arranged in sequence to form an index. If there are too
many indices, they can be divided to set up several level indices.
3) Binary search
Binary search starts from mid-position in the table. If the conditional value (composed
of several key fields) is larger than entrance value, then it will compare the value with
mid-value of lower part (key fields arranged from small to large in dictionary order) and
continue with this kind of comparison until the needed tuple is located.
The binary searching is a very fast query algorithm. Its disadvantage is that it is
complicated to insert or delete a tuple because in these cases relation table needs to be
reorganized and sorted.

III. Application program interface(API)

Database application program interface is the interface between C&C08 Database


module and other modules, with which DBMS functions and provides database access
interface for call processing, maintenance and BAM modules.
1) Number analysis:
Processes the number analysis request from the call processing module and
returns the analysis result by querying the related database. It includes call source
analysis, called number analysis, calling number analysis and service analysis,
etc.
2) Route and network management analysis
This deals with the circuit search request, Centrex and trunk data request from
call processing module, realizes the dynamic route allocation, and responds to
commands from network management center to dynamically distribute the traffic
on routes, trunk groups and trunks circuits.
3) Billing analysis realizes various kinds of billing functions by inquiring billing data
according to call records generated by the call processing module.
4) Subscriber data management manages local number resource allocation,
subscriber data, and new service data, etc. and processes data query request
from other modules.

Huawei Technologies Proprietary

4-18
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

5) Data maintenance realizes database maintenance together with BAM module,


including database loading and dumping, tuple increasing, deletion and
modification, etc.
6) Intelligent service analysis manages intelligent service data and query request
from call processing module.

4.4.3 C&C08 Database Characteristics

1) Distributed relational database


Data is distributed in every module and each module stores its related data. Data
distribution is perceptible to the user. All data requests are sent to the local database,
and the user need not be concerned about the detailed data location. Because of the
data distribution, the error in one module does not affect the working of the other
modules. In the database, a large number of data queries are done locally, thereby
enhancing the query efficiency.
2) Easy to expand
DBMS in C&C08 is a relational database, based on data definition. Relation table
structure and field definition are based on data dictionary description. Table structure
modification, introduction of new relation table will not cause changes in program.
3) Flexible data configuration
As a general switching platform, the C&C08 Exchange must satisfy the requirements of
various network modes and services. So the database designing is not restricted by a
certain standard, but tries to describe the standard with mathematical models, to
achieve flexible data configuration.

4.5 Patch Function


The switching system needs to work for a long time in an uninterrupted manner. When
there is a fault with the switching system software, or some new functions need to be
added to the system, it is necessary to modify the switching system software in an
operative switching system, that is, patch the software, so that the problem is settled
within a short time.
In the MPU of the C&C08, a space is assigned specially as a patch area for storing
patches. Patches can be in any of the following four states: IDLE, DEACTIVE, ACTIVE
and RUNNING.
IDLE: An initial state indicates that there is no patch.
DEACTIVE: Patches are in the patch area, but not yet activated and patch codes
cannot be executed.
ACTIVE: Patches have been activated already and their codes can be executed.
RUNNING: Patches are in a running status, which cannot be deactivated and can only
be removed.
The conversion of patch status is shown in Figure 4-10:

Huawei Technologies Proprietary

4-19
Technical Manual Chapter 4
C&C08 Digital SPC Switching System Software System

LOD
Idle Deactive
RMV

RMV RMV ACT DEA

CFM
Running Active

Figure 4-10 Patch state

The system provides 7 patch commands:


Load common patch\special patch: LOD PATCH/SPATCH;
Activate patch: ACT PATCH;
Deactivate patch: DEA PATCH;
Run patch regularly: CFM PATCH;
Remove patch: RMV PATCH;
Display foreground patch: DSP PATCH;
List background patch: LST PATCH
The system uses patch ID to identify patches (7-characters);
A patch is named in the format of C/T MPU 001:
C/T: Common patch/special patch
MPU: Main board type
001: Sequential number for patch, which is arranged according to the sequence of
patch releasing starting from 1.
When the number of patches accumulated reaches a certain quantity, a new version
can be created on the basis of the original basic version plus the patch function. In
future, new patches can be made on the new version.

4.

Huawei Technologies Proprietary

4-20

You might also like