EECE7376_HW03
.pdf
keyboard_arrow_up
School
Northeastern University *
*We aren’t endorsed by this school
Course
7376
Subject
Electrical Engineering
Date
Apr 3, 2024
Type
Pages
5
Uploaded by ChancellorSealMaster948
EECE7376 – Homework 3 1
/ 5
Northeastern University College of Engineering Department of Electrical & Computer Engineering EECE7376: Operating Systems: Interface and Implementation Homework 3 Instructions -
For programming Problems: 1.
Your code must be well commented by explaining what the lines of your program do. Have at least one comment for every 4 lines of code. 2.
At the beginning of your source code files write your full name, students ID, and any special compiling/running instruction (if any). 3.
Before submitting the source code file(s), your code must compile and tested with a standard GCC compiler (available in the CoE Linux server). 4.
Do not submit any compiled object or executable files. -
Submit the following to the homework assignment page on Canvas: 1.
Your homework report developed by a word processor (e.g., Microsoft Word) and submitted as one PDF file. The report cover page must include your full name, student ID, course/section/semester information. For answers that require drawing and if it is difficult on you to use a drawing application, which is preferred, you can neatly hand draw “only” these diagrams, scan them, and insert the scanned images in your report document. The report includes the following (depending on the assignment contents): a.
Answers to the non-programming Problems that show all the details of the steps you follow to reach these answers. b.
A summary of your approach to solve the programming Problems. c.
The screen shots of the sample run(s) of your program(s) 2.
Your well-commented programs source code files (i.e., the .cc or .cpp files). Do NOT submit
any files (e.g., the PDF report file and the source code files) as a compressed (zipped) package. Rather, upload each file individually. Note:
You can submit multiple attempts for this homework, however, only what you submit in the last attempt will be graded. This means all required files must be included in this last submission attempt.
EECE7376 – Homework 3 2
/ 5
Problem 1 (25 Points)
In a memory segmentation operating system, consider a machine with a 12KB physical memory space running an OS that uses a 4KB virtual memory space for its processes, where a 1KB means 1024 bytes. The machine is executing two processes (
A
and B
), where each process has 3 allocated segments with the following mappings: a)
Show the state of a basic segment table containing the information represented in the diagram above. The table should include the following columns (write all numbers in decimal): •
Segment
. Each of the above segments are representing by an index from 0 to 5 where 0 is for A
’s Code segment and 5 for B
’s Stack segment (i.e., indices are sorted by process (first A
, then B
), and then by base virtual address (lower virtual address first)).
•
Process
. Process identifier (
A
or B
).
•
Virtual address
. Base address in virtual address space.
•
Size
. The segment size in KB.
•
Physical address
. Base address in physical address space.
EECE7376 – Homework 3 3
/ 5
b)
Assume the following virtual memory access addresses in decimal: i.
Process A, address 2148 ii.
Process A, address 1324 iii.
Process A, address 4095 iv.
Process B, address 512 v.
Process B, address 2048 vi.
Process B, address 3272 Which of the above are valid virtual memory access addresses? and for those valid accesses, find the following: o
The corresponding Segment Index
(from the table you formed above). o
The Offset
within the segment in decimal. o
The Physical address in decimal. Problem 2 (25 Points)
Assume the following simple memory segmentation operating system:
The OS supports two segments for a process: o
Segment A
that starts from the beginning of the address space and is positive growing for code and a heap, and o
Segment B
that starts from the end of the address space and is negative growing for a stack.
The Virtual Address space size is 128 bytes.
Physical memory size is 512 bytes.
Segment register information: o
Segment A
base (grows positive) = 0 o
Segment A
limit = 20 o
Segment B
base (grows negative) = 511 o
Segment B
limit = 20 Which of the following are valid virtual memory access addresses? and for those valid accesses, what are the corresponding physical addresses? Explain your answers. a)
29 b)
123 c)
16 d)
90 e)
10 All numbers in this problem are decimal numbers.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
a) In Assembly programming what is the functionality of the following instructions
DECFSZ
ВTESC
MOVLW
MOVWF
goto
b) A piece of code is required for a time critical activity. Should this be written in assembly
language or C? Explain your answer.
5 Explain the difference between the (For) and (While) loops. Highlight the main
components of the (For) loop that are required for its execution.
Consider the following C program designed to run on a PIC 18F4455.
int main(void)
2 {
1
double voltage;
double current;
double milliwatts;
double energyUsed;
double cummulativeEnergy = 0;
while (1)
{
voltage=analogRead (VOLTAGE_PIN)*voltageScaleFactor;
current=analogRead (CURRENT_PIN)*currentScaleFactor;
milliwatts=voltage*current;
energyUsed=milliWatts*0.5;
cummulativeEnergy=cummulativeEnergy+energyUsed;
10
11
12
13
14
15
_delay_ms (500);
16
}
17
a) What is the role of the symbols "{" and "}"
b) The code here is indented. Explain the importance of indentation
N m 4 n Or 00 o A m
arrow_forward
Q1// What are the difference between Logic Devices and Programmable
Logic Devices?
Q2// Explain the advantage's of Programmable Logic Devices?
Q3// List the disadvantages of Fixed function logic devices.
Q4// Compare between Logic Devices and Programmable Logic Devices?
arrow_forward
B6
arrow_forward
The numbers from 0-9 and a no characters
is the Basic 1 digit seven segment display
* .can show
False
True
In a (CA) method of 7 segments, the
anodes of all the LED segments are
* "connected to the logic "O
False
True
Some times may run out of pins on your
Arduino board and need to not extend it
* .with shift registers
True
False
arrow_forward
ehcu.org/pluginfile
100%
10 / 11
locations, count how many times is 0 and how
many times 1 is.
Questions:-
1- Write a program in assembly language to perform the following logic
ci
BL
CL
DL
[5100]-
2- How we can perform the NEG and NOT instructions by using different
instructions.
3- Write the following program by using different instruction or instructions
for each instruction on the
program.
MOV AL , 00
MOV BX , FFFF
XOR CL , FF
NEG BYTE PTR [DI]
AND CX ,
LG
arrow_forward
Electrical Engineering
1. Consider the following MIPS assembly language code:
II: ADD Sl, S0, Ss1
LW S0, -4($s1)
13: ADD Sso, Ss0, Ss0
12:
14: SW S0, -4(Ss1)
Which of the above instructions will have to be followed by a stall for the correct operation of the processor, given a 5 stage MIPS pipelined
processor.
000
arrow_forward
Question iii please help......
arrow_forward
Express the switching circuit shown in the figure in binary logic notation (boolean expression) and construct the logic diagram
arrow_forward
Hello expert, I need a solution for the choices,
but I need you to clarify the correct choice by
drawing a diagram or image of the EMU8086
processor.
Q1:Choose the correct answer for the following sentences
1. The 8086 microprocessor has ---- data pin's
2. The 8086 microprocessor has
d. 32
a. 8 b. 16
c. 20
a. 16 b. 8
c. 32 d. 20
3. SP &
a. BP b. IP
address pin's
used with stack segment register (SS) to access memory within the stack segment
c. SI d. DI
4. If CS= 002AH and IP- 0023H, the physical address is -----
a. 002C3H b. 0023H1 c. 002A1H d. 0023H
5. POP instruction used to
a. Read b. Write c. Reset
the stack
d. Set
6. PIC16F877A microcontroller has ------ digital I/O ports
a. 2 b. 4 c. 5 d. 8
7. PIC16F877A microcontroller has analog multiplexed ports
b. 2 b. 4 c. 5 d. 8
8.
used to control the brightness of LED connected to Arduino
a. Analog input b. analog output c. digital input d. digital output
9. The content of SP -------when execute PUSH instruction
a. Increased by 2 b.…
arrow_forward
An 8051 subroutine is shown below:
SUB:
RO, #20H
@RO , #0
MOV
LOOP: MOV
INC
RO
CJNE RO, #80H, LOOP
RET
a.
What does this subroutine do?
b. In how many machine cycles does each instruction execute?
How many bytes long is each instruction?
C.
d.
Convert the subroutine to machine language.
e.
How long does this' subroutine take to execute? (Assume 12 M
arrow_forward
Explain the SUB instruction of 8086. Compare it with SBB instruction.
Write a Assembly language program for 8086 to find the square root of a number using SUB instruction.
(Note : Solve the question in paper, scan and upload along with the other Part B and C answers)
A BIE
arrow_forward
Task: Complete the observation table, write logic expression of the given circuit
and attach simulation screen shot using multi-sim.
Circuit Diagram
A
LED
1kOhm
Figure 1.2
1) Logic expression for the given logic diagram:
2) Observations:
arrow_forward
logic desing
arrow_forward
Q4// Compare between Logic Devices and Programmable Logic Devices?
arrow_forward
USE DIGITAL LOGIC AND DESIGNS
. How universal gates can be used to perform AND, OR and NOT logics? (Draw logics)
arrow_forward
Design a 3-Bit (fixed reference) comparator for 100 reference values.
b) Logic Gates c) PROM d) PAL
arrow_forward
Determine at least three contemporary tools that may aid in the design of digital logic circuits. Identify and discuss the tools' five most important characteristics. Propose the best option for logic circuit design (justify your selection)
arrow_forward
1. (a) What are the different logic families? (b)Explain working of Analog to digital converter using neat diagram.[Note: maximum 10 sentence, not more than that]
arrow_forward
Question Vvv
For a microprocessor similar to ATmega328p an 8 bit ADC uses a VREF = 3.3 V. When an analog read is executed the return value is 182.
What Voltage is present on the input?
Enter the value in the box provided in mV. Round to the nearest mV. No units are required
.
.Full explain this question and text typing work only We should answer our question within 2 hours takes more time then we will reduce Rating Dont ignore this line ..
arrow_forward
Logic Circuit and Design
arrow_forward
2// Explain the advantage's of Programmable Logic Devices?
arrow_forward
Write an assembly language program in microprocessor 8085 so that I can fetch 2 8 bit numbers from memory locations and store the product, whether it's 8 bit or 16 bit, in 2 different memory locations.
I am aware with programming logic. So, only give me the working program and attach a snapshot of the output. No need to explain.
arrow_forward
Draw the logic circuit for the simplified expression a) and b)
arrow_forward
QUESTION i please help........
arrow_forward
I need the answer as soon as possible
arrow_forward
Please give me correct solution.
arrow_forward
The control circuit functions to turn ON the light bulb whenever the binary
inputs are even numbers between 1 and 15 in decimal. Other than that, the
light bulb turns OFF. Design the logic control circuit of figure below. In your
design, include:
a)>The truth table deduced from the description.
b)>The simplified output expression.
c)>The logic control circuit using combinational logic gates.
W
Logic
control
X
F
Y•
circuit
> N
arrow_forward
Y=f(A,B,C)=(0,4,5)+don't care(2)
arrow_forward
PARTA d, e ONLY!
arrow_forward
Design a combinational circuit with 3-inputs and 1-output. The output is equal to logic-1 when the binary value of the input is less than 3. And the output is logic-0 otherwise.
arrow_forward
None
arrow_forward
I need the answer as soon as possible
arrow_forward
A) List and describe 10 features of the Atmel ATmega 2560 AVR microcontroller (use the
ATmega 2560 complete reference manual for help).
B) List and describe two AVR instructions. As part of your description make sure that you list
the operation for each instruction that is provided in the instruction set summary.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Related Questions
- a) In Assembly programming what is the functionality of the following instructions DECFSZ ВTESC MOVLW MOVWF goto b) A piece of code is required for a time critical activity. Should this be written in assembly language or C? Explain your answer. 5 Explain the difference between the (For) and (While) loops. Highlight the main components of the (For) loop that are required for its execution. Consider the following C program designed to run on a PIC 18F4455. int main(void) 2 { 1 double voltage; double current; double milliwatts; double energyUsed; double cummulativeEnergy = 0; while (1) { voltage=analogRead (VOLTAGE_PIN)*voltageScaleFactor; current=analogRead (CURRENT_PIN)*currentScaleFactor; milliwatts=voltage*current; energyUsed=milliWatts*0.5; cummulativeEnergy=cummulativeEnergy+energyUsed; 10 11 12 13 14 15 _delay_ms (500); 16 } 17 a) What is the role of the symbols "{" and "}" b) The code here is indented. Explain the importance of indentation N m 4 n Or 00 o A marrow_forwardQ1// What are the difference between Logic Devices and Programmable Logic Devices? Q2// Explain the advantage's of Programmable Logic Devices? Q3// List the disadvantages of Fixed function logic devices. Q4// Compare between Logic Devices and Programmable Logic Devices?arrow_forwardB6arrow_forward
- The numbers from 0-9 and a no characters is the Basic 1 digit seven segment display * .can show False True In a (CA) method of 7 segments, the anodes of all the LED segments are * "connected to the logic "O False True Some times may run out of pins on your Arduino board and need to not extend it * .with shift registers True Falsearrow_forwardehcu.org/pluginfile 100% 10 / 11 locations, count how many times is 0 and how many times 1 is. Questions:- 1- Write a program in assembly language to perform the following logic ci BL CL DL [5100]- 2- How we can perform the NEG and NOT instructions by using different instructions. 3- Write the following program by using different instruction or instructions for each instruction on the program. MOV AL , 00 MOV BX , FFFF XOR CL , FF NEG BYTE PTR [DI] AND CX , LGarrow_forwardElectrical Engineering 1. Consider the following MIPS assembly language code: II: ADD Sl, S0, Ss1 LW S0, -4($s1) 13: ADD Sso, Ss0, Ss0 12: 14: SW S0, -4(Ss1) Which of the above instructions will have to be followed by a stall for the correct operation of the processor, given a 5 stage MIPS pipelined processor. 000arrow_forward
- Question iii please help......arrow_forwardExpress the switching circuit shown in the figure in binary logic notation (boolean expression) and construct the logic diagramarrow_forwardHello expert, I need a solution for the choices, but I need you to clarify the correct choice by drawing a diagram or image of the EMU8086 processor. Q1:Choose the correct answer for the following sentences 1. The 8086 microprocessor has ---- data pin's 2. The 8086 microprocessor has d. 32 a. 8 b. 16 c. 20 a. 16 b. 8 c. 32 d. 20 3. SP & a. BP b. IP address pin's used with stack segment register (SS) to access memory within the stack segment c. SI d. DI 4. If CS= 002AH and IP- 0023H, the physical address is ----- a. 002C3H b. 0023H1 c. 002A1H d. 0023H 5. POP instruction used to a. Read b. Write c. Reset the stack d. Set 6. PIC16F877A microcontroller has ------ digital I/O ports a. 2 b. 4 c. 5 d. 8 7. PIC16F877A microcontroller has analog multiplexed ports b. 2 b. 4 c. 5 d. 8 8. used to control the brightness of LED connected to Arduino a. Analog input b. analog output c. digital input d. digital output 9. The content of SP -------when execute PUSH instruction a. Increased by 2 b.…arrow_forward
- An 8051 subroutine is shown below: SUB: RO, #20H @RO , #0 MOV LOOP: MOV INC RO CJNE RO, #80H, LOOP RET a. What does this subroutine do? b. In how many machine cycles does each instruction execute? How many bytes long is each instruction? C. d. Convert the subroutine to machine language. e. How long does this' subroutine take to execute? (Assume 12 Marrow_forwardExplain the SUB instruction of 8086. Compare it with SBB instruction. Write a Assembly language program for 8086 to find the square root of a number using SUB instruction. (Note : Solve the question in paper, scan and upload along with the other Part B and C answers) A BIEarrow_forwardTask: Complete the observation table, write logic expression of the given circuit and attach simulation screen shot using multi-sim. Circuit Diagram A LED 1kOhm Figure 1.2 1) Logic expression for the given logic diagram: 2) Observations:arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you