ASSEMBLING AND DISASSEMBLING OF COMPUTER SYSTEM
description
Transcript of ASSEMBLING AND DISASSEMBLING OF COMPUTER SYSTEM
ASSEMBLING AND DISASSEMBLING
OF COMPUTER
SYSTEM
WARNING!~Unplug the system unit from the main power source.~Do not tamper with the power box.~Remove accessories that are metallic or can get caught in the system unit.
DISASSEMBLING OF COMPUTER SYSTEM
Steps:1. Remove screws and cover.2. Unplug power cords.3. Unplug IDE and FDD ribbons from HDD, FDD and
motherboard.4. Unlock and remove the cooling fan.5. Remove the RAM from the motherboard.6. Remove the hard disk drive carefully.7. Remove the floppy disk drive carefully.8. Remove the CD-Rom drive carefully.9. Unscrew and remove the PCI cover.10.Unscrew expansion cards(video card) and remove
from the motherboard.11.Unscrew the motherboard diagonally from the last
screw removed.
RECAP!1.Remove system unit casing.2.Unplug all the power cords.3.Unplug IDE and FDD ribbons.4.Unlock and remove the cooling fan.5.Remove the RAM from the
motherboard.6.Remove the various drives (HDD, FDD,
CD Drive) carefully.7.Unscrew and remove the PCI cover.8.Unscrew and remove various expansion
cards (video card, graphics card, NIC) from the motherboard.
9.Unscrew the motherboard diagonally from the last screw removed.
**Putting it back together**
~LAST OUT, FIRST IN~
INTERPRETERS AND
COMPILERS
INTERPRETERSTranslates and
executes program statements one by
one.
COMPILERSIs a translator whose
source language is a high-level language and whose object language is close to a machine language of an actual computer – either in
assembly language or some variety of machine
language.
THE COMPILATION PROCESSLEXICAL ANALYSIS
SYNTAX ANALYSIS
SEMANTIC ANALYSIS
INTERMEDIATE CODE GENERATION
CODE OPTIMIZATION
CODE GENERATION
SYMBOL TABLE
MANAGEMENT
ERROR HANDLIN
G
LEXICAL ANALYSIS-Is also referred to as scanning.- In this phase, the stream of characters making up the source program is read from left to right and are grouped into tokens.
TOKEN - is a sequence of characters having a collective meaning.LEXEME - the character sequence forming a token.
:= called assignment operator
Example: identifier A := operand1 + operand2 * 701. The identifier identifierA;2. The assignment symbol :=3. The identifier operand1;4. The operator +;5. The identifier operand2;6. The operator * and;7. The number 70.
SYNTAX ANALYSIS
-is also referred to as parsing.-In this phase, the tokens are grouped into grammatical phrases that are used by the compiler to generate output.
Assignment statement
identifier
identifierA
:=expression
expression
identifier
operand1
+ expressionexpression
identifier
operand2
* expression
number
70
SEMANTIC ANALYSIS
- The process of type checking is an important task performed during this phase. :=
id1 +
id2 *
id3 int-to-real
70
INTERMEDIATE CODE GENERATION
-During this phase, the compiler generated an intermediate representation of the source program.
temp1 := int-to-real (70)temp2 := id3 * temp1temp3 := id2 + temp2id1 := temp3
CODE OPTIMIZATION-In this phase, some compilers attempts to improve the intermediate code generated by the previous phase(intermediate code generation).
temp1 := id3 * 70.0id1 := id2 + temp1
CODE GENERATION-The last phase of the compilation process.-It is in this phase wherein the source program’s target code is generated.
F- signifies the fact that we are dealing with floating-point numbers
#-symbol that indicates a constant value1. MOVF id3, R22. MULF #70.0, R23. MOVF id2, R14. ADDF R2, R15. MOVF R1, id1
SYMBOL-TABLE MANAGEMENT
-The compiler performs an important function of recording the identifiers used in the source program and collect various attributes of each identifier.
SYMBOL TABLE REPRESENTATION
NAME OF IDENTIFIER TYPE LENGTH INITIAL VALUE
IdentifierA real 8 0Operand1 real 3 5Operand2 real 3 7
ERROR DETECTION AND REPORTING
OS SCHEDULINGTypes of Schedulers include:
1. First-Come, First-Served (FCFS)
2. Shortest-Job-First (SJF)3. Priority Scheduling (PS) 4. Round-Robin (RR)
Performance metrics include: CPU Utilization - Percentage of time that the
CPU is doing useful work (i.e.
not idling). 100% is perfect.Wait time - Average time a process spends
in the run queue.Throughput - Number of processes
completed / time unit.Response Time - Average time elapsed from
when process is submitted until
useful output is obtained.Turnaround Time - Average time elapsed from
when process is submitted to when it has completed.
FCFS- simply executes processes to completion in the order they are submitted.EXAMPLE:
PROCESS CPU REQUIREMENT TOA WAITING TIMEP1 24 0 P1 = 0-0 = 0P2 9 0 P2 = 24-0 = 24P3 3 0 P3 = 33-0 = 33
36/36=1X100% 57/3-#of process = 100%-CPU utilization =19A.W.T.
P1 P2 P3
0 24 33 36
Total turnaround time
Shortest-Job-First (SJF)
-is exactly like FCFS except that instead of choosing the job at the front of the
queue, it will always choose the shortest job (i.e. the job that takes the least
time) available. We will use a sorted list to order the processes from longest to shortest.
When adding a new process/task, we need to figure out the where in the list
to insert it.
NON-PREEMPTIVE SCHEDULING - Is a strategy that even if a higher
priority process is ready, the running process is allowed to continue until
either it is locked or has completed its execution.
PREEMPTIVE SCHEDULING- Is a strategy where the CPU is
suspended when a higher priority process is in the ready queue.
Priority (PRI)
-is associated with each process. We can think of
the SJF algorithm as a special case of PRI.
Processes with equal priorities may be scheduled in accordance with FCFS.
ROUND ROBIN (RR) -is a preemptive scheduler, which is designed especially for time-sharing systems. In other words, it does not
wait for a process to finish or give up control.
- In RR, each process is given a time slot to run. If the process does not finish, it will “get back in line” and
receive another time slot until it has completed. We will implement RR
using a FIFO queue where new jobs are inserted at the tail end.