15-03-15, 05:42 PM
(آخر تعديل لهذه المشاركة : 25-03-15, 05:49 PM {2} بواسطة غموؤضي كبريآء.)
Q1. [3 Marks] A CPU consists of a waiting memory space (buffer or cache) with N registers and
a processing-memory space. If there are no tasks to be processed, the processor will be in the
ready status (which can be considered as a sleeping state). If a task enters the processing-memory
space, the processor will start processing the task in the processing-memory (think of this as the
processor being wake-up from his sleeping state). If the task comes in and processor is busy
(processing another task in the processing-memory), but there are available free registers in the
buffer, the task takes one of the registers and waits until the processor will be free. Otherwise, if
all registers in the buffer are occupied (busy), then the task terminates from CPU (will be out
from all CPU). Write a program to coordinate this scenario using one of the following computer
languages: C, C++, C# or Java[/align]
a processing-memory space. If there are no tasks to be processed, the processor will be in the
ready status (which can be considered as a sleeping state). If a task enters the processing-memory
space, the processor will start processing the task in the processing-memory (think of this as the
processor being wake-up from his sleeping state). If the task comes in and processor is busy
(processing another task in the processing-memory), but there are available free registers in the
buffer, the task takes one of the registers and waits until the processor will be free. Otherwise, if
all registers in the buffer are occupied (busy), then the task terminates from CPU (will be out
from all CPU). Write a program to coordinate this scenario using one of the following computer
languages: C, C++, C# or Java[/align]