-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessTableEntry.cs
More file actions
39 lines (37 loc) · 1.29 KB
/
ProcessTableEntry.cs
File metadata and controls
39 lines (37 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Scheduling
{
class ProcessTableEntry
{
public bool Yield { get; set; }
public bool Blocked { get; set; }
public bool Done { get; set; }
public string Name { get; private set; }
public AddressSpace AddressSpace { get; set; }
public int ProcessId { get; private set; }
public int ProgramCounter { get; set; }
public ProcessConsole Console { get; set; }
public int Quantum { get; set; }
public int StartTime { get; set; }
public int EndTime { get; set; }
public int LastCPUTime { get; set; }
public int MaxStarvation { get; set; }
public int Priority { get; set; }
public ProcessTableEntry(int iProcessId, string sName, Code code)
{
ProcessId = iProcessId;
AddressSpace = new AddressSpace(ProcessId);
AddressSpace.Code = code;
Console = new ProcessConsole(iProcessId, sName);
Name = sName;
LastCPUTime = 0;
StartTime = 0;
EndTime = -1;
MaxStarvation = 0;
Yield = false; // הגדרת ערך ברירת מחדל
}
}
}