انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

نظم تشغيل عملي

الكلية كلية العلوم للبنات     القسم قسم الحاسبات     المرحلة 4
أستاذ المادة رسل محمد نعمة       07/03/2019 07:44:11
public static int first_come()
{
int first = 0;
for (int k = 1; k < Ready_Lenght; k++)
if (Ready_Queue[k].arrival_time < Ready_Queue[first].arrival_time)
first = k;
return first;
}
public static void update(int t)
{
for (int i = 0; i < Wait_Lenght; )
Practical Operating System lecture#2/4th Class/2018-2019
MS.C. Rusul Mohammed
if (Wait_Queue[i].arrival_time <= t) {
Ready_Queue[Ready_Lenght++] = Wait_Queue[i];
for (int j = i; j < Wait_Lenght - 1; j++)//shift processes after take one process to ready quue
Wait_Queue[j] = Wait_Queue[j + 1];
Wait_Lenght--;
}
else
i++;
}
public static int first_come()
{
int first = 0;
for (int k = 1; k < Ready_Lenght; k++)
if (Ready_Queue[k].arrival_time < Ready_Queue[first].arrival_time)
first = k;
return first;
}
public static void update(int t)
{
for (int i = 0; i < Wait_Lenght; )
Practical Operating System lecture#2/4th Class/2018-2019
MS.C. Rusul Mohammed
if (Wait_Queue[i].arrival_time <= t) {
Ready_Queue[Ready_Lenght++] = Wait_Queue[i];
for (int j = i; j < Wait_Lenght - 1; j++)//shift processes after take one process to ready quue
Wait_Queue[j] = Wait_Queue[j + 1];
Wait_Lenght--;
}
else
i++;
}
public static int first_come()
{
int first = 0;
for (int k = 1; k < Ready_Lenght; k++)
if (Ready_Queue[k].arrival_time < Ready_Queue[first].arrival_time)
first = k;
return first;
}
public static void update(int t)
{
for (int i = 0; i < Wait_Lenght; )
Practical Operating System lecture#2/4th Class/2018-2019
MS.C. Rusul Mohammed
if (Wait_Queue[i].arrival_time <= t) {
Ready_Queue[Ready_Lenght++] = Wait_Queue[i];
for (int j = i; j < Wait_Lenght - 1; j++)//shift processes after take one process to ready quue
Wait_Queue[j] = Wait_Queue[j + 1];
Wait_Lenght--;
}
else
i++;
}
public static int first_come()
{
int first = 0;
for (int k = 1; k < Ready_Lenght; k++)
if (Ready_Queue[k].arrival_time < Ready_Queue[first].arrival_time)
first = k;
return first;
}
public static void update(int t)
{
for (int i = 0; i < Wait_Lenght; )
Practical Operating System lecture#2/4th Class/2018-2019
MS.C. Rusul Mohammed
if (Wait_Queue[i].arrival_time <= t) {
Ready_Queue[Ready_Lenght++] = Wait_Queue[i];
for (int j = i; j < Wait_Lenght - 1; j++)//shift processes after take one process to ready quue
Wait_Queue[j] = Wait_Queue[j + 1];
Wait_Lenght--;
}
else
i++;
}

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .