You get a bonus - 1 coin for daily activity. Now you have 1 coin

Functional categories - The Computer Program: Its Characteristics and Ways

Lecture



Это окончание невероятной информации про компьютерная программа.

...

execution is performed.

Cohesion

The levels of cohesion, from worst to best, are:

  • Coincidental cohesion: a module has coincidental cohesion if it performs several functions and those functions are completely unrelated. For example, function read_sales_record_print_next_line_convert_to_float(). In practice, coincidental cohesion arises when management imposes foolish rules. For example: «Every module will have between 35 and 50 executable statements».
  • Logical cohesion. A module has logical cohesion if a number of functions are available to it, but only one of them is executed. For example, function perform_arithmetic( perform_addition, a, b ).
  • Temporal cohesion: a module has temporal cohesion if it performs functions that are related in time. One example is function initialize_variables_and_open_files(). Another example is stage_one(), stage_two(), ...
  • Procedural cohesion. A module has procedural cohesion if it performs several loosely related functions. For example, function read_part_number_update_employee_record().
  • Communicational cohesion. A module has communicational cohesion if it performs several closely related functions. For example, function read_part_number_update_sales_record().
  • Informational cohesion. A module has informational cohesion if it performs several functions, but each function has its own entry and exit points. Moreover, the functions share the same data structure. Object-oriented classes operate at this level.
  • Functional cohesion: a module has functional cohesion if it achieves a single goal, operating only on local variables. Moreover, it can be reused in other contexts.

Coupling

The levels of coupling, from worst to best, are:

  • Content coupling: a module has content coupling if it modifies a local variable of another function. In COBOL this was done with the alter verb.
  • Common coupling: a module has common coupling if it modifies a global variable.
  • Control coupling: A module has control coupling if another module can alter its control flow. For example, perform_arithmetic( perform_addition, a, b ). Instead, control should be exercised through the composition of the returned object.
  • Stamp coupling: a module has stamp coupling if an element of a data structure passed as a parameter is modified. Object-oriented classes operate at this level.
  • Data coupling: a module has data coupling if all of its input parameters are necessary and none of them is modified. Moreover, the function's result is returned as a single object.

Data flow analysis

The Computer Program: Its Characteristics and Ways to Describe It

An example of a function-level data flow diagram

Data flow analysis is a design method used to achieve modules with functional cohesion and data coupling. The input to the method is a data flow diagram. A data flow diagram is a set of ovals representing modules. Each module's name is displayed inside its oval. Modules may be at the executable level or the function level.

The diagram also has arrows connecting modules to one another. Arrows pointing into modules represent a set of inputs. Each module should have only one arrow pointing out of it, to represent its single output object. (Optionally, an additional exception arrow points out.) A chain of ovals will display the entire algorithm. Input modules should begin the diagram. Input modules should connect to transform modules. Transform modules should connect to output modules.

Functional categories

The Computer Program: Its Characteristics and Ways to Describe It

A diagram showing how the user interacts with application software. The application software interacts with the operating system, which interacts with the hardware.

Computer programs can be classified by functional criteria. The main functional categories are application software and system software. System software includes the operating system, which couples the computer's hardware with the application software. The purpose of the operating system is to create an environment in which application software executes conveniently and efficiently. Both application and system software run utility programs. At the hardware level, a microcode program controls the circuitry of the central processing unit.

Application software

Application software is the key to unlocking the potential of a computer system. Enterprise software brings together accounting, personnel, customer, and vendor applications. Examples include enterprise resource planning, customer relationship management, and supply chain management software.

Enterprise applications may be developed in-house as one-of-a-kind proprietary software. Alternatively, they can be purchased as off-the-shelf software. Purchased software can be modified to provide custom software. If an application is customized, then either the company's own resources are used or the work is outsourced. Outsourced software development may be carried out by the original software vendor or by a third-party developer.

The potential advantages of in-house software are functionality and the ability to develop reports that match specifications exactly. Management can also take part in the development process and maintain a certain level of control. Management may decide to counter a competitor's new initiative or to implement a customer or supplier requirement. A merger or acquisition may require changes to enterprise software. The potential drawbacks of in-house software are the significant investment of time and resources. In addition, there may be risks related to features and performance.

The potential advantages of off-the-shelf software are that the initial cost can be determined, the basic needs should be met, and its performance and reliability have a track record. The potential drawbacks of off-the-shelf software are that it may have unnecessary features that confuse end users, it may lack features the enterprise needs, and its data flow may not match the enterprise's workflows.

One approach to obtaining a specialized enterprise application cost-effectively is through an application service provider. Specialized companies provide the hardware, the custom software, and end-user support. They can accelerate the development of new applications because they have skilled information systems staff. The biggest advantage is that it frees internal resources from staffing and managing complex computer projects. Many application service providers target small, fast-growing companies with limited information systems resources. Larger companies with large systems, on the other hand, are more likely to have their own technical infrastructure. One risk is having to entrust confidential information to an outside organization. Another risk is having to trust the reliability of the provider's infrastructure. [

The operating system

The Computer Program: Its Characteristics and Ways to Describe It

Program, process, and thread scheduling, preemption, context switching

An operating system is low-level software that supports a computer's basic functions, such as process scheduling and controlling peripheral devices.

In the 1950s, a programmer, who was also the operator, wrote a program and ran it. After execution finished, the output could be printed or written to paper tape or cards for later processing. More often than not, the program did not work. The programmer then looked at the console lights and fiddled with the console switches. If less lucky, a memory dump was printed for further study. In the 1960s, programmers reduced the amount of time wasted by automating the operator's job. A program called an operating system was kept in the computer at all times.

The term «operating system» can refer to two levels of software. The operating system may refer to the kernel program, which manages processes, memory, and devices. In a broader sense, the operating system may refer to the entire package of central software. The package includes the kernel program, a command-line interpreter, a graphical user interface, utility programs, and an editor.

The kernel program [ edit ]

The Computer Program: Its Characteristics and Ways to Describe It

The kernel connects application software to the computer's hardware.

The kernel's primary purpose is to manage the computer's limited resources:

  • The kernel program must perform process scheduling. The kernel creates a process control block when a program is selected for execution. However, an executing program is granted exclusive access to the central processing unit only for a certain time interval. To give every user the appearance of continuous access, the kernel rapidly preempts each process control block to run another. The system designers' goal is to minimize dispatch latency.

The Computer Program: Its Characteristics and Ways to Describe It

Physical memory is scattered across RAM and the hard disk. Virtual memory appears as one contiguous block.

  • The kernel program must perform memory management.
  • When the kernel initially loads an executable into memory, it logically divides the address space into regions. The kernel maintains a master region table and a set of per-process region tables (pregions) — one for each running process. These tables make up the virtual address space. The master region table is used to determine the location of its contents in physical memory. The pregion tables allow each process to have its own program (text) pregion, data pregion, and stack pregion.
  • The program pregion stores machine instructions. Since machine instructions do not change, the program region can be used by many processes of the same executable
  • To save time and memory, the kernel may load only blocks of execution instructions from disk rather than the entire executable file.
  • The kernel is responsible for translating virtual addresses into physical addresses. The kernel may request data from the memory controller and instead receive a page fault. If so, the kernel turns to the memory management unit to populate the physical data region and translate the address.
  • The kernel allocates memory from the heap at a process's request. When a process is finished with the memory, the process may request that it be freed. If a process terminates without requesting that all allocated memory be freed, the kernel performs garbage collection to reclaim the memory.
  • The kernel also ensures that a process accesses only its own memory, and not the memory of the kernel or of other processes.
  • The kernel program must perform file system management. The kernel has instructions for creating, retrieving, updating, and deleting files.
  • The kernel program must perform device management. The kernel provides programs to standardize and simplify the interface to the mouse, keyboard, disk drives, printers, and other devices. Moreover, the kernel must arbitrate access to a device if two processes request it at the same time.
  • The kernel program must perform network management. The kernel transmits and receives packets on behalf of processes. One key service is finding an efficient route to the target system.
  • The kernel program must provide programmers with system-level functions.
    • Programmers access files through a relatively simple interface, which in turn performs a relatively complex low-level I/O interface. The low-level interface includes file creation, file descriptors, file seeking, physical reading, and physical writing.
    • Programmers create processes through a relatively simple interface, which in turn performs a relatively complex low-level interface.
    • Programmers perform date and time arithmetic through a relatively simple interface, which in turn performs a relatively complex low-level time interface.
  • The kernel program must provide a communication channel between executing processes. For a large software system, it may be desirable to design the system as smaller processes. Processes can communicate with one another by sending and receiving signals.

Originally, operating systems were programmed in assembly language; however, modern operating systems are usually written in higher-level languages such as C, Objective-C, and Swift.

Utility programs

A utility program is intended to assist with system administration and software execution. Operating systems run hardware utility programs that check the state of disks, memory, speakers, and printers. A utility can optimize the placement of a file on a crowded disk. System utilities monitor hardware and network performance. When a metric falls outside the acceptable range, an alert is triggered.

Utility programs include compression programs, so that data files are stored in less disk space. Compressed programs also save time when transferring data files over a network. Utility programs can sort and merge data sets. Utility programs detect computer viruses.

The microcode program

The Computer Program: Its Characteristics and Ways to Describe It

NOT gate

The Computer Program: Its Characteristics and Ways to Describe It

NAND gate

The Computer Program: Its Characteristics and Ways to Describe It

NOR gate

The Computer Program: Its Characteristics and Ways to Describe It

AND gate

The Computer Program: Its Characteristics and Ways to Describe It

OR gate

A microcode program is a lower-level interpreter that controls the data path of software-driven computers. (Advances in hardware have migrated these operations into hardware execution circuits.) Microcode instructions allow the programmer to more easily implement the digital logic level — the computer's actual hardware. The digital logic level is the boundary between computer science and computer engineering.

A logic gate is a tiny transistor that can return one of two signals: on or off.

  • A single transistor forms a NOT gate.
  • Connecting two transistors in series forms a NAND gate.
  • Connecting two transistors in parallel forms a NOR gate.
  • Connecting a NOT gate to a NAND gate forms an AND gate.
  • Connecting a NOT gate to a NOR gate forms an OR gate.

These five gates form the building blocks of binary algebra — the computer's digital logic functions.

Microcode instructions are mnemonics that programmers can use to execute digital logic functions instead of forming them in binary algebra. They are stored in the central processing unit's (CPU) control store. These hardware-level instructions move data throughout the data path.

The microinstruction cycle begins when the microsequencer uses its microprogram counter to fetch the next machine instruction from random-access memory. The next step is to decode the machine instruction by selecting the appropriate output line of the hardware module. [147] The final step is to execute the instruction using the hardware module's set of gates.

The Computer Program: Its Characteristics and Ways to Describe It

Symbolic representation of an ALU

Instructions that perform arithmetic are passed through the arithmetic logic unit (ALU). [148] The ALU has circuits for performing elementary operations of addition, shifting, and comparison of integers. By combining and channeling elementary operations through the ALU, the CPU performs complex arithmetic.

Microcode instructions move data between the CPU and the memory controller. The memory controller's microcode instructions operate two registers. The memory address register is used to access the address of each memory cell. The memory data register is used to set and read the contents of each cell. [149]

Microcode instructions move data between the CPU and a number of computer buses. The disk controller bus writes to and reads from hard disks. Data is also transferred between the CPU and other functional units over the Peripheral Component Interconnect Express bus. [150]

See also

  • [[b4833]]
  • [[b3123]]
  • [[b4517]]
  • [[b8566]]
  • [[b891]]
  • [[b9246]]

Продолжение:


Часть 1 The Computer Program: Its Characteristics and Ways to Describe It
Часть 2 Functional categories - The Computer Program: Its Characteristics and Ways

See also

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Software and information systems development"

Terms: Software and information systems development