COMPUTER SCIENCE I
Juan Misael Saracho Autonomous University
Faculty of Science and Technology
Civil Engineering Degree
Practical Work No. 2:
STRUCTURE, OPERATING SYSTEMS AND
PROGRAMMING LANGUAGES
Subject:CIV162. Computer Science I
Group No:
Instructor: Eng.
University student:
Delivery date:
Tarija–Bolivia
COMPUTING I
1. COMPUTER ARCHITECTURE
1.1. INTRODUCTION
Computer architecture is the 'conceptual design and operational structure
fundamental of a computer system" (wikimedia), that is, it refers to a description
of the physical construction and distribution of the components of the computer and a description
functional of several parts of a computer, with special interest in the way the unit
The central processing unit (CPU) works internally and accesses memory addresses.
In general, computer systems are physically divided into the central unit of the system and
the peripherals that allow it to connect to the outside world.
1.2. CENTRAL UNIT OF THE SYSTEM
The Central Unit of the System is the operations center of any
computer available in the current market. The central unit of the system houses the
components and circuitry that will carry out the fundamental tasks of the computer.
When opening the central unit of a computer system, a series of can be appreciated
components:
Main board.
Central microprocessor or central processing unit (CPU).
Bus.
Main memory.
Other controlling components.
Power supply.
1.2.1. CENTRAL PROCESSING UNIT
The Central Processing Unit (CPU) is the place where calculation operations are performed.
control of the components that make up the entirety of the computer system.
The CPUs of current computers are microprocessors built on a silicon chip.
semiconductor where all the elements that make up an electronic circuit are created
(transistors, etc.) and the necessary connections to form it.
The central processing unit is composed of:
A Control Unit that will manage the different components of the computer system.
as well as the data to be used in the different processes.
An Arithmetic-Logic Unit that will perform the different calculation operations in which
the computer is based on its operation.
Some records of the system that serve as an internal workspace for the central unit.
process.
COMPUTER SCIENCE I
[Link]. CONTROL UNIT (CU)
It is the part of the central processing unit that acts as the coordinator of all the tasks that
must be done by the computer. It is also responsible for handling all the commands that the
computer needs to perform the execution of the operations required by the programs
of application.
Its basic functions are:
Manage all access, reading, and writing operations to each of the positions
from the main memory where the necessary instructions to perform a
process.
2. Interpret the instruction in process.
3. Carry out the tasks indicated in the instruction.
This unit is also responsible for controlling and coordinating the units involved in the
previously mentioned operations, in such a way that internal problems are avoided that
they can produce among the components of the computer.
The control unit finally communicates with each other and directs the inputs and outputs to and from
the peripherals, giving appropriate treatment to the information in process.
[Link]. ARITHMETIC AND LOGIC UNIT (ALU)
Its mission is to perform operations with the data it receives, following the given instructions.
by the control unit. The name arithmetic and logic unit comes from the fact that it can perform
operations both arithmetic and logical with the data transferred by the control unit.
The control unit handles instructions and the arithmetic and logic unit processes data. In order to
the control unit knows whether the information it receives is an instruction or data, it is mandatory
that the first word I receive is an instruction, indicating the nature of the rest of the
information to be addressed.
COMPUTER SCIENCE I
For the arithmetic and logic unit to be able to perform an arithmetic operation, it must be
provide, in some way, the following data:
The code that indicates the operation to be performed.
2. The address of the cell where the first addend is stored.
3. The direction of the second addend involved in the operation.
4. The address of the memory cell where the result will be stored.
[Link]. RECORDS
The Registers serve as an internal workspace for the central processing unit. They allow
store information temporarily to facilitate data manipulation by
the CPU. Making an analogy with the rest of the computer system, registers are to the CPU
just as the main memory is to the computer.
The records are divided into three main groups:
General Purpose Records.
Memory Segment Registers.
Instruction Records.
1.2.2. OTHER COMPONENTS OF THE CENTRAL UNIT OF THE SYSTEM
The central processing unit connects to a series of memory units that serve as support for
the management of the data and programs that are to be used while it is operational.
The different memories of the computer system (Random Access Memory or RAM and Read Only
Memory (or ROM) are fundamental components of the computer as they will be, in the case
COMPUTER SCIENCE I
from RAM, the workspace where the microprocessor will perform the different operations
into what the processes requested by the user are going to decompose, while the ROM is going to
serve to help the computer perform the different system boot operations
computer science prior to the operating system taking control of the different tasks to be performed.
The central processing unit and the memory connect to each other through the bus. The bus is
a communication link that connects all the components that make up the system
computer and allows the transfer of information between them. This information consists of
of data and command orders to manipulate the data. There are several design technologies and
construction of buses among which the ISA, EISA, and MCA architectures can be distinguished.
Other components that connect to the bus are the connection ports of the different
peripherals associated with the central unit of the computer system that will allow
configure the computer system for a different set of functional operations that
they must always meet the needs of the user.
1.3. PERIPHERALS
The different peripherals that can be connected to a computer system are divided into four.
main groups:
Input Information Peripherals.
Information Storage Peripherals.
Output Information Peripherals.
Communication Peripherals.
COMPUTER SCIENCE I
2. OPERATING SYSTEM
2.1. CONCEPT
An operating system is system software, that is, a set of computer programs.
intended to perform many tasks, among which the management of peripheral devices stands out.
When voltage is applied to the processor of an electronic device, it executes a reduced code in
assembly language located at a specific address in the ROM (reset address) and known
how to reset code, which in turn executes a routine that initializes the hardware that accompanies the
processor. Also in this phase, the interrupt controller is usually initialized. This phase is completed.
The startup code executes, also code in assembly language, whose task
The most important thing is to execute the main program (main()) of the application software.
An operating system can be found in most electronic devices that use
microprocessors to function, since thanks to them we can understand the machine and ensure that it complies
with their functions (mobile phones, DVD players, car radios, computers, radios, etc.).
2.2. BASIC FUNCTIONS
Operating systems, in their capacity as a software layer that enables and simplifies the management of the
computer, perform a series of basic functions essential for the management of the equipment. Among the
most notable, each exercised by an internal component (module in monolithic cores and server
in micronuclei), we can summarize the following:
Provide more comfort in using a computer.
Efficiently manage the team's resources, executing services for the processes
programs
Provide an interface to the user, executing instructions (commands).
Allow changes due to the development of the OS itself to be made without interfering with the
services that were already being provided (evolution).
An operating system performs 5 basic functions in the operation of a computer system:
user interface supply, resource management, file management, management
of tasks and support and utility services.
2.3. USER INTERFACES
It is the part of the operating system that allows communication with it, in such a way that it can be loaded
programs, access files, and perform other tasks. There are three basic types of interfaces: those that
based on commands, those that use menus and graphical user interfaces.
COMPUTER SCIENCE I
2.4. RESOURCE MANAGEMENT
They are used to manage the hardware and network resources of a computer system, such as the CPU,
memory, secondary storage devices and input and output peripherals.
2.5. FILE MANAGEMENT
An information system contains file management programs that control the creation,
deletion and access of data and program files. It also involves keeping the record of the
physical location of files on magnetic disks and other storage devices
secondary.
2.6. TASK MANAGEMENT
The task management programs of an operating system manage the execution of tasks.
end users' computing. The programs control which areas have access to the CPU and for how long.
time. Task management functions can allocate a specific part of time of the
CPU for a specific task, and interrupt the CPU at any time to replace it with a
highest priority task.
2.7. COMPONENTS OF AN OPERATING SYSTEM
2.7.1. PROCESS MANAGEMENT
A process is simply a running program that requires resources to perform its task.
CPU time, memory, files, and I/O devices. The OS is responsible for:
Create and destroy processes.
Stop and resume processes.
Provide mechanisms for them to communicate and synchronize.
Process management could be similar to office work. One can have a list of tasks to be performed.
and set high, medium, low priorities for them, for example. We should start by doing the tasks of
high priority first and when they are finished continue with the medium priority ones and then the low ones.
Once the task is completed, it is crossed out. This can lead to a problem that low-priority tasks may be ...
they never get executed. and remain on the list forever. To solve this, one can assign
high priority to the oldest tasks.
2.7.2. MANAGEMENT OF MAIN MEMORY
Memory (computing) is a large table of words or bytes, each referenced by a
unique address. This fast access data warehouse is shared by the CPU and the devices.
E/S, it is volatile and loses its content in system failures. The OS is responsible for:
Know what parts of the memory are being used and by whom.
Decide which processes will be loaded into memory when there is available space.
Allocate and reclaim memory space when needed.
INFORMATICS I
2.7.3. MANAGEMENT OF SECONDARY STORAGE
A secondary storage system is necessary, as the main memory (storage
primary) is volatile and also very small to store all programs and data. It is also
It is necessary to keep the data that is not suitable to be kept in main memory. The OS is responsible for:
Plan the disks.
Manage free space.
Assign the storage.
2.7.4. I/O SYSTEM
It consists of a temporary storage system (cache), an interface for device drivers.
and another for specific devices. The operating system must manage temporary storage of
I/O and serving the interrupts of the I/O devices.
2.7.5. FILE SYSTEM
Files are collections of related information, defined by their creators. They store
programs (in source code and object code) and data such as images, texts, database information,
etc. The OS is responsible for:
Build and delete files and directories.
Offer functions to manipulate files and directories.
Establish the correspondence between files and storage units.
Make backups of files.
There are different File Systems, that is, there are different ways to organize information.
that is stored in the memories (usually disks) of computers. For example, there are the
FAT, FAT32, EXT2, NTFS file systems...
From the user's perspective, these differences may seem insignificant at first glance, without
embargo, there are very important differences. For example, the FAT32 and NTFS file systems,
they are primarily used in Microsoft operating systems, there is a great difference for a
user who uses a database with a lot of information since the maximum file size
with a FAT32 File System it is limited to 4 gigabytes however in an NTFS system the size
is considerably greater.
2.7.6. PROTECTION SYSTEMS
Mechanism that controls the access of programs or users to system resources. The OS
in charge of:
Distinguish between authorized and unauthorized use.
Specify the security controls to be performed.
Enforce the use of these protective mechanisms.
2.7.7. COMMUNICATION SYSTEMS
COMPUTING I
To maintain communications with other systems, it is necessary to control the sending and receiving.
of information through network interfaces. It is also necessary to create and maintain points of
communication that serves applications to send and receive information, and create and maintain
virtual connections between applications running locally and others that do
remotely.
2.7.8. SYSTEM PROGRAMS
They are utility applications that are supplied with the OS but do not form part of it. They offer an environment
useful for the development and execution of programs, with some of the tasks they perform:
Manipulation and modification of files.
System status information.
Support for programming languages.
Communications.
2.7.9. RESOURCE MANAGER
As a resource manager, the Operating System manages
The CPU (Central Processing Unit, where the microprocessor is located).
Input and output (I/O) devices
The main memory (or direct access).
The disks (or secondary memory).
The processes (or running programs).
and in general all the resources of the system.
2.8. WINDOWS VS. LINUX: MYTHS AND REALITIES
Many times we have asked ourselves the same question: if Windows is as bad as people who criticize it say.
And if Linux is as good as those who use it say. If Open Office is equivalent to or better than Microsoft.
Office. And so, the questions we could pose are many and some answers, true or not, are
already inserted into the popular imagination.
The Linux operating system is not UNIX. It is rather a clone of UNIX, or at least that is how it has been expressed.
always their defenders. Both Windows NT and Linux are operating systems with
microkernel. Linux enthusiasts argue that this kernel, in the Linux OS, is
written from scratch, without having copied it from anywhere. However, in the process of rewriting much
The form and method of UNIX has been transferred, like genes are transmitted to less closely related relatives.
The UNIX commands have been transferred without major changes, the very essence of UNIX is present.
in Linux. We will not make a history of this, let's just say that currently the operating system is evolving in
a decentralized form, where there is no organization that can monolithically determine the
path or direction to advance technologically with the product.
The gratuity of Linux is based on licensing modes that do not involve monetary transfer.
some. However, there are restrictions, as there is also a contract that limits and specifies the
obligations of the parties, just like a Microsoft EULA (End User License Agreement). The restriction
COMPUTER SCIENCE I
more important is the distribution of the source code in some cases, or the prohibition of storing it
the modifications for itself, without making them known to the community. Microsoft, in a way and in certain
cases, it also has free software, such as the Embedded Visual Tools, which consists of an IDE
more compilers, debugging tools, binary emulators for mobile devices and
complete documentation, which has absolutely no monetary cost. Microsoft, however,
it does not distribute the source code yet, although Redmond has tentatively started to release code in
certain fields that are considered viable for direct community contribution.
So far, the distribution channels take advantage of this framework, producing versions of
Linux that is properly conditioned by the distributor to provide added value that can
charging. The most important distribution of Linux is known to everyone, RedHat. However, its website
has changed tone in a very pronounced way from 2001 to date. What was originally
started as a site that promoted free code, with many hyperlinks for download of
the binaries, sources, and documentation have turned into a site with a marked commercial bias,
where the download links are practically hidden in the last hierarchy of pages, or where
downloading files is contraindicated due to speed and file size issues
to be transferred, mostly CD-ROM images in ISO format, prohibitive for everything that
no broadband.
COMPUTING I
3. PROGRAMMING LANGUAGE
3.1. CONCEPT
A programming language is a set of symbols and syntactic and semantic rules that define it.
structure and the meaning of its elements and expressions. It is used to control behavior
physical and logical of a machine.
Although the terms 'programming language' and 'computer language' are often used as if
they were synonyms, it doesn't have to be that way, since programming languages encompass the languages of
programming and others, such as, for example, HTML (language for marking up web pages that
it is not strictly a programming language).
A programming language allows one or more programmers to specify precisely about
What data should a computer operate, how this data should be stored or transmitted, and what
actions must be taken under a varied range of circumstances. All of this, through a language that
try to be relatively close to human or natural language, as happens with Lexical language.
A relevant feature of programming languages is precisely that more than one
programmers can have a common set of instructions that can be understood among them
to collaboratively build the program.
The processors used in computers are capable of understanding and acting according to the instructions given.
programs written in a fixed language called machine language. Any program written in another
language can be executed in two ways:
Through a program that adjusts the instructions as they are found. To this process
This is called interpretation, and the programs that perform it are known as interpreters.
Translating this program to the equivalent program written in machine language. To that process
It is called compiling and the translating program is referred to as a compiler.
3.2. CLASSIFICATION OF PROGRAMMING LANGUAGES
Programming languages can be classified according to various criteria:
According to the level of abstraction
According to the programming paradigm that each of them has
3.3. ACCORDING TO THEIR LEVEL OF ABSTRACTION
3.3.1. MACHINE LANGUAGES
They are written in languages directly readable by the machine (computer), as their instructions
they are binary chains (0 and 1). It allows for loading (transferring a program to memory) without the need
of subsequent translation, which implies a higher execution speed, only with low reliability and
difficulty in verifying and fine-tuning the programs.
COMPUTING I
3.3.2. LOW-LEVEL LANGUAGES
Low-level languages are programming languages that are close to the workings of a
computer. The lowest level language par excellence is machine code. This is followed by the language
assembler, since when programming in assembler one works with the memory registers of the
direct form computer.
3.3.3. MIDDLE-LEVEL LANGUAGES
There are programming languages that are considered by some experts as mid-level languages.
(as is the case with the C language) having certain characteristics that bring them closer to low-level languages
but at the same time having certain qualities that make it a language closer to humans and,
therefore, of high level.
3.3.4. HIGH-LEVEL LANGUAGES
High-level languages are usually easy to learn because they are made up of elements
of natural languages, such as English. In BASIC, one of the most well-known high-level languages, the
commands like 'IF COUNTER = 10 THEN STOP' can be used to ask the computer to stop
if the COUNTER is equal to 10. This way of working can give the impression that computers
they seem to understand a natural language; in reality, they do so in a rigid and systematic way, without that
there is room, for example, for ambiguities or double meanings.
3.4. ACCORDING TO THE PROGRAMMING PARADIGM
A programming paradigm represents a particular approach or philosophy for building
software. One is not better than the other, but each has advantages and disadvantages. Depending on the
In a situation, one paradigm is more appropriate than another.
According to the programming paradigm, languages can be classified into:
* The imperative or procedural paradigm is considered the most common and is represented,
for example, in C or in BASIC.
* The functional paradigm is represented by the family of languages LISP (in particular Scheme),
ML or Haskell.
* The logical paradigm, one example is PROLOG.
* The object-oriented paradigm. A completely object-oriented language is Smalltalk.
Although the pure form of these paradigms can be selected when programming, in practice it is
It is common for them to mix, giving rise to multiparadigm programming.
Currently, the most used programming paradigm due to multiple advantages compared to its
previous, it is object-oriented programming.
3.4.1. IMPERATIVE LANGUAGES
They are the languages that give instructions to the computer, that is, commands.
3.4.2. FUNCTIONAL LANGUAGES
COMPUTER SCIENCE I
Functional Paradigm: this paradigm conceives computing as the evaluation of functions
mathematics and avoids declaring and changing data. In other words, it emphasizes the application of the
functions and the composition between them, more than on state changes and the sequential execution of
commands (as the procedural paradigm does). It allows solving certain problems in a way
elegant and purely functional languages avoid the common side effects found in other types of
programming.
3.4.3. LOGICAL LANGUAGES
Logical computing directs processing methods based on formal reasoning. The
objects of such reasoning are 'facts' or 'if then' rules. A logical computation uses a
set of such statements to determine the truth or falsity of that set of statements. A
Establishment is a fact if its tuples verify a series of operations.
A fact is an expression in which some object or set of objects satisfies a specific relationship.
A tuple is an immutable list. A tuple cannot be modified in any way after its creation.
An if-then rule is a statement that informs about sets of tuples or related statements.
they can predict whether other tuples will satisfy other relationships.
A statement that is proven true as a result of a process is said to be an inference of the
original set. It is therefore a description of how to obtain the veracity of a body.
given that some rules are true.
Logical computing is therefore related to the automation of some set of methods of
inference.
3.4.4. OBJECT-ORIENTED LANGUAGES
Object-Oriented Programming (OOP) is a paradigm of
programming that uses objects and their interactions to design applications and computer programs.
It is based on various techniques, including inheritance, modularity, polymorphism, and encapsulation. Its
use became popular in the early 1990s. Currently, there are many languages of
programming that supports object-oriented design.
3.5. IMPLEMENTATION
The implementation of a language is what provides a way for a program to be executed for a
specific combination of software and hardware. There are basically two ways to implement a
language: Compilation and interpretation. Compilation is the translation into a code that can be used by the
machine. The translator programs that can perform this operation are called compilers. These,
like advanced assembler programs, can generate many lines of machine code for
each proposition of the source program.
A different alternative to compilers can also be used to translate high-level languages.
level. Instead of translating the source program and permanently storing the object code that is produced
during the compilation to use it in a future execution, the programmer only loads the program
source in the computer along with the data to be processed. Next, a program
interpreter, stored in the operating system of the disk, or permanently included within the
machine, converts each statement of the source program into machine language as it goes
COMPUTING I
necessary during data processing. The object code is not recorded for use
later.
The next time an instruction is used, it should be reinterpreted and translated into language.
machine. For example, during the repetitive processing of the steps of a cycle or loop, each
the loop's instruction will have to be reinterpreted on each repeated execution of the cycle, which makes
that the program runs slower at runtime (because the code is being reviewed during
execution) but faster in design time (because it doesn't have to be compiled each time
moment the complete code). The interpreter eliminates the need to perform a compilation afterwards
each modification of the program when you want to add functions or correct errors; but it is obvious that
A precompiled object program should run much faster than one that
each step must be interpreted during a code execution.
COMPUTER SCIENCE I
SOURCES / BIBLIOGRAPHY
Computer Architecture:
• Computer Architecture. On the network: [Link]
de-computers_2.html
• Computer architecture. Online:
[Link]
• Computer Architecture. Online:
Invalid input. Please provide text for translation.
[Link]
Operating systems:
• Operating system. Online:[Link]
• Generations of Computers
The provided text is a URL and does not contain translatable content.
[Link]
Programming languages:
• Computer languages. Online:[Link]
[Link]
• Computer languages. Online:[Link]
computing
• Generations of Computers
[Link]
[Link]