Saltar al contingut Menu
  • Home
  • Information
  • Contact
  • Map

Computer Structure 2 (EC2)

Credits Dept. Type Requirements
7.5 (6.0 ECTS) AC
  • Compulsory for DIE
  • Compulsory for DCSYS
  • Elective for DCSFW
EC1 - Prerequisite for DIE , DCSYS , DCSFW
IC - Prerequisite for DIE , DCSYS , DCSFW
P1 - Prerequisite for DIE , DCSYS , DCSFW


Person in charge:  (-)

General goals

In previous subjects (IC and EC1), students will have acquired a basic understanding of how computers work. All practical work, exercises and problems will have been solved on training computers and simulators. The main objective of EC2 is for students to expand knowledge they have already acquired, and for them to apply this knowledge to work on a real computer: a PC based on the IA32 processor.

Specific goals


  1. Students must know the machine language of a commercial processor (IA32).
  2. Students must know the basic input/output devices of a real computer (in this case, a compatible PC).
  3. Students need to understand the implications of computer performance in terms of processing speed, bandwidth, and bus hierarchy.
  4. Ability to take a given configuration of an input/output sub-system and make the choices yielding the best performance.


  1. Students must be able to write programmes of 15-25 lines in assembly code on a real machine (IA32).
  2. Students must be able to link programmes written in assembly code with those written in C, and make calls to assembly code from the high-level language and vice versa. This includes the management of arguments and local variables. Students must be able to translate code written in C into assembly code. The generated code should be reasonably efficient.
  3. Students will learn to develop programmes in C and assembly code in a Linux environment. Students must be able to debug programmes written in C and in assembly code.
  4. Students must be able to programme basic input/output operations, using programmed I/O and interruptions.
  5. Ability to understand and evaluate basic cache memory schemes, including: mapping algorithms, different cache and line sizes, write policies, replacement algorithms, and several levels of cache.
  6. Ability to evaluate the impact of simple transformations in a C program when this is executed on a processor with a given cache memory configuration.


  1. Ability to think in abstract terms. Ability to tackle new problems by consciously using strategies that have proved useful in solving previous problems.
  2. Ability to analyze and summarise issues.
  3. Ability to work effectively in small groups to solve problems of average difficulty.


Estimated time (hours):

T P L Alt Ext. L Stu A. time
Theory Problems Laboratory Other activities External Laboratory Study Additional time

1. IA32 assembler.
T      P      L      Alt    Ext. L Stu    A. time Total 
12,0 8,0 6,0 0 12,0 20,0 0 58,0
This theme provides students with hands-on practice with a real assembler running on a real machine. The chosen processor is a compatible one (i.e. Intel Pentium/AMD). The chosen assembler is IA32. The OS environment is Linux.

2. Memory Subsystem
T      P      L      Alt    Ext. L Stu    A. time Total 
13,0 7,0 4,0 0 8,0 20,0 0 52,0
This topic reviews the locality and memory hierarchy concepts. A real main memory system is studied, as well as the cache memory system in depth and virtual memory.

3. Input/Output
T      P      L      Alt    Ext. L Stu    A. time Total 
10,0 2,0 1,0 0 2,0 12,0 0 27,0
This will review input/output concepts (programmed I/O, interruptions, DMA, peripherals, etc). Real devices will be studied in a compatible PC. Buses (which provide the interconnections between the computer parts) will also be studied. Particular emphasis will be placed on standard buses and bus hierarchy.

Total per kind T      P      L      Alt    Ext. L Stu    A. time Total 
35,0 17,0 11,0 0 22,0 52,0 0 137,0
Avaluation additional hours 3,0
Total work hours for student 140,0

Docent Methodolgy

The course comprises 5 class hours per week: 4 hours of theory and problems, and 1 hour in the lab.

Lab classes will help consolidate the concepts learnt in the theory sessions. Information on exercises will be provided before each practical session. Students are advised to prepare the practical sessions (i.e. read the documentation, study the concepts to be applied, etc.). Students should also make a point of reviewing the relevant concepts after practical sessions. Lab sessions are presential and evaluable, and are done exclusively in the group where the student is enrolled, therefore is mandatory that overlaps are avoided at enrollment time.

No hard and fast distinction will be drawn between theory and problems - the way these are dealt with will depend on the theme under consideration.

Continuous assessment will be used during the course. There will be three exams. Students who merit a pass on the continuous assessment will not have to take the final exam.

Evaluation Methodgy

The grade will be calculated from:
- Theory grade (80%)
- Lab or exercises grade (20%)

The lab grade will be obtained from the practical sessions.

The theory grade will be obtained from some part exams or a final exam. During the course, 3 theory exams will be realized (C1 Machine language, 33%; C2 Hierarchy 33%; C3 Virtual Memory and Input/Output, 33%). The student who passes the part exams will be exempted from taking the final exam, if he wants. The students taking the final exam will lose the part exams grade.

Basic Bibliography

  • Randal E. Bryant, David R. O'Hallaron Computer systems : a programmer's perspective, Pearson Education, 2002.
  • David A. Patterson, John L. Hennessy Estructura y diseño de computadores : interficie circuitería-programación, Reverté, 1999.

Complementary Bibliography

(no available informacion)

Web links

(no available informacion)

Previous capacities

- Ability to programme simple routines in any assembly code.
- Ability to programme fairly complex routines in any High-Level Language.
- Basic knowledge of digital circuits.
- Basic knowledge of binary arithmetic.


logo FIB © Barcelona school of informatics - Contact - RSS
This website uses cookies to offer you the best experience and service. If you continue browsing, it is understood that you accept our cookies policy.
Classic version Mobile version