False because it would be better for the background
Answer:
Students learn how a pulley can be used to change the direction of applied forces and move/lift extremely heavy ... Students perform a simple demonstration to see the mechanical advantage of using a pulley, and they ...
Explanation:
Students learn how a pulley can be used to change the direction of applied forces and move/lift extremely heavy ... Students perform a simple demonstration to see the mechanical advantage of using a pulley, and they ...
Explanation:
To understand how this program is working let us print the variable value at different stages of the program so that we can understand how it is working.
Intitally, value=10 when it was declared.
Then we added 5 and it become value=15
then we used fork() function which creates a parent(orignal) and child(duplicate)
When fork() succeeds it returns the child pid to parent and returns 0 to the child. As you can see (pid > 0) condition is always true therefore the parent pid value becomes 35 ( 15+20) and the child pid value becomes 0.
#include <stdio.h>
#include <unistd.h>
int main( ) {
int value = 10;
printf("%d\n",value);
int pid;
value += 5;
printf("%d\n",value);
pid = fork( );
printf("%d\n",pid);
if (pid > 0 )
{
value += 20;
}
printf("%d\n",value);
return 0;
}
Output:
10 (initial value)
15 (modified value)
5343 (pid when fork is used)
35 (final modified value)
0 (child value)
15 (the parent value when fork was used)
Answer:
1. Processor communication -- this involves the following tasks:
<em>a. exchange of data between processor and I/O module</em>
<em>b. command decoding - I/O module accepts commands sent from the processor. E.g., the I/O module for a disk drive may accept the following commands from the processor: READ SECTOR, WRITE SECTOR, SEEK track, etc. </em>
<em>c. status reporting – The device must be able to report its status to the processor, e.g., disk drive busy, ready etc. Status reporting may also involve reporting various errors. </em>
<em>d. Address recognition – Each I/O device has a unique address and the I/O module must recognize this address. </em>
<em />
2. Device communication – The I/O module must be able to perform device communication such as status reporting.
3. Control & timing – The I/O module must be able to co-ordinate the flow of data between the internal resources (such as processor, memory) and external devices.
4. Data buffering – This is necessary as there is a speed mismatch between speed of data transfer between processor and memory and external devices. Data coming from the main memory are sent to an I/O module in a rapid burst. The data is buffered in the I/O module and then sent to the peripheral device at its rate.
5. Error detection – The I/O module must also be able to detect errors and report them to the processor. These errors may be mechanical errors (such as paper jam in a printer), or changes in the bit pattern of transmitted data. A common way of detecting such errors is by using parity bits.
You have to make sure the BIOS boot is set to the normal hard drive first, then plug in the SATA cable and power properly