To implement the process model, the operating system maintains a table dịch - To implement the process model, the operating system maintains a table Việt làm thế nào để nói

To implement the process model, the

To implement the process model, the operating system maintains a table (an array of structures),
called the process table, with one entry per process. (Some authors call these entries process
control blocks.) This entry contains information about the process’ state, its program counter,
stack pointer, memory allocation, the status of its open files, its accounting and scheduling
information, and everything else about the process that must be saved when the process is
switched from running to ready or blocked state so that it can be restarted later as if it had never
been stopped.
Figure 2-4 shows some of the more important fields in a typical system. The fields in the firs
column relate to process management. The other two columns relate to memory management and
file management, respectively. It should be noted that precisely which fields the process table has
is highly system dependent, but this figure gives a general idea of the kinds of information
needed.
Process management
Registers
Program counter
Program status word
Stack pointer
Process state
Priority
Scheduling parameters
Process ID
Parent process
Process group
Signals
Time when process started
CPU time used
Children’s CPU time
Time of next alarm
Memory management
Pointer to text segment
Pointer to data segment
Pointer to stack segment
File management
Root directory
Working directory
File descriptors
User ID
Group ID
Figure 2-4.Some of the fields of a typical process table entry.
Now that we have looked at the process table, it is possible to explain a little more about how the
illusion of multiple sequential processes is maintained on a machine with one CPU and many I/O
devices. Associated with each I/O device class (e.g., floppy disks, hard disks, timers, terminals)
is a location (often near the bottom of memory) called the interrupt vector. It contains the
address of the interrupt service procedure. Suppose that user process 3 is running when a disk
interrupt occurs. User process 3’s program counter, program status word, and possibly one or
more registers are pushed onto the (current) stack by the interrupt hardware. The computer then
jumps to the address specified in the disk interrupt vector. That is all the hardware does. From
here on, it is up to the software, in particular, the interrupt service procedure.
All interrupts start by saving the registers, often in the process table entry for the current process
Then the information pushed onto the stack by the interrupt is removed and the stack pointer is
set to point to a temporary stack used by the process handler. Actions such as saving the registers
and setting the stack pointer cannot even be expressed in high-level languages such as C, so they
are performed by a small assembly language routine, usually the same one for all interrupts since
the work of saving the registers is identical, no matter what the cause of the interrupt is.
When this routine is finished, it calls a C procedure to do the rest of the work for this specific
interrupt type. (We assume the operating system is written in C, the usual choice for all real
operating systems.) When it has done its job, possibly making some process now ready, the
scheduler is called to see who to run next. After that, control is passed back to the assembly
language code to load up the registers and memory map for the now-current process and start it
running. Interrupt handling and scheduling are summarized in Fig. 2-5. It is worth noting that the
details vary somewhat from system to system.
1. Hardware stacks program counter, etc.
2. Hardware loads new program counter from interrupt vector.
3. Assembly language procedure saves registers.
4. Assembly language procedure sets up new stack.
5. C interrupt service runs (typically reads and butters input).
6. Scheduler decides which process is to run next.
7. C procedure returns to the assembly code.
8. Assembly language procedure starts up new current process.
Figure 2-5. Skeleton of what the lowest level of the operating system does when an interrupt
occurs.
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
To implement the process model, the operating system maintains a table (an array of structures),called the process table, with one entry per process. (Some authors call these entries processcontrol blocks.) This entry contains information about the process’ state, its program counter,stack pointer, memory allocation, the status of its open files, its accounting and schedulinginformation, and everything else about the process that must be saved when the process isswitched from running to ready or blocked state so that it can be restarted later as if it had neverbeen stopped.Figure 2-4 shows some of the more important fields in a typical system. The fields in the firscolumn relate to process management. The other two columns relate to memory management andfile management, respectively. It should be noted that precisely which fields the process table hasis highly system dependent, but this figure gives a general idea of the kinds of informationneeded.Process managementRegistersProgram counterProgram status wordStack pointerProcess statePriorityScheduling parametersProcess IDParent processProcess groupSignalsTime when process startedCPU time usedChildren’s CPU timeTime of next alarmMemory managementPointer to text segmentPointer to data segmentPointer to stack segmentFile managementRoot directoryWorking directoryFile descriptorsUser IDGroup IDFigure 2-4.Some of the fields of a typical process table entry.Now that we have looked at the process table, it is possible to explain a little more about how theillusion of multiple sequential processes is maintained on a machine with one CPU and many I/Odevices. Associated with each I/O device class (e.g., floppy disks, hard disks, timers, terminals)is a location (often near the bottom of memory) called the interrupt vector. It contains theaddress of the interrupt service procedure. Suppose that user process 3 is running when a diskinterrupt occurs. User process 3’s program counter, program status word, and possibly one ormore registers are pushed onto the (current) stack by the interrupt hardware. The computer thenjumps to the address specified in the disk interrupt vector. That is all the hardware does. Fromhere on, it is up to the software, in particular, the interrupt service procedure.All interrupts start by saving the registers, often in the process table entry for the current processThen the information pushed onto the stack by the interrupt is removed and the stack pointer isset to point to a temporary stack used by the process handler. Actions such as saving the registersand setting the stack pointer cannot even be expressed in high-level languages such as C, so theyare performed by a small assembly language routine, usually the same one for all interrupts sincethe work of saving the registers is identical, no matter what the cause of the interrupt is.When this routine is finished, it calls a C procedure to do the rest of the work for this specificinterrupt type. (We assume the operating system is written in C, the usual choice for all realoperating systems.) When it has done its job, possibly making some process now ready, thescheduler is called to see who to run next. After that, control is passed back to the assemblylanguage code to load up the registers and memory map for the now-current process and start itrunning. Interrupt handling and scheduling are summarized in Fig. 2-5. It is worth noting that thedetails vary somewhat from system to system.1. Hardware stacks program counter, etc.2. Hardware loads new program counter from interrupt vector.3. Assembly language procedure saves registers.4. Assembly language procedure sets up new stack.5. C interrupt service runs (typically reads and butters input).6. Scheduler decides which process is to run next.7. C procedure returns to the assembly code.8. Assembly language procedure starts up new current process.Figure 2-5. Skeleton of what the lowest level of the operating system does when an interruptoccurs.
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Để thực hiện các mô hình quy trình, hệ thống điều hành duy trì một bảng (mảng của cấu trúc),
gọi là bảng tiến trình, với một mục nhập cho mỗi quá trình. (Một số tác giả gọi những quá trình mục
khối điều khiển.) Mục nhập này có chứa thông tin về trạng thái của tiến trình, truy cập chương trình của mình,
chồng con trỏ, cấp phát bộ nhớ, tình trạng của các tập tin mở của nó, kế toán và lập kế hoạch
thông tin, và mọi thứ khác về quá trình phải được lưu lại khi quá trình này được
chuyển từ chạy tới trạng thái sẵn sàng hoặc bị chặn để nó có thể được khởi động lại sau đó như thể nó chưa bao giờ
được dừng lại.
Hình 2-4 cho thấy một số lĩnh vực quan trọng hơn trong một hệ thống điển hình. Các trường trong linh sam
cột liên quan để xử lý quản lý. Hai cột khác liên quan đến quản lý bộ nhớ và
quản lý tập tin, tương ứng. Cần lưu ý rằng chính xác các trường bảng tiến trình có
rất hệ thống phụ thuộc, nhưng con số này cho một ý tưởng chung của các loại thông tin
cần thiết.
Quy trình quản lý
Thanh ghi
truy cập chương trình
từ trạng thái chương trình
stack pointer
Process nhà nước
ưu tiên
thông số Scheduling
Process ID
quá trình Chánh
nhóm quá trình
Tín hiệu
Thời gian khi bắt đầu quá trình
thời gian CPU được sử dụng
thời gian CPU trẻ em
Thời gian báo động tiếp theo
Quản lý bộ nhớ
Pointer để phân đoạn văn bản
Pointer để phân đoạn dữ liệu
Pointer để ngăn xếp đoạn
quản lý tập tin
thư mục gốc
Làm việc thư mục
tập tin mô tả
User ID
Group ID
Hình 2-4.Some của các lĩnh vực của một mục bảng quá trình điển hình.
Bây giờ chúng ta đã xem xét các bảng tiến trình, nó có thể giải thích thêm một chút về cách các
ảo tưởng của nhiều quy trình tuần tự được duy trì trên một máy tính với một CPU và nhiều I / O
thiết bị. Kết hợp với mỗi lớp thiết bị I / O (ví dụ, đĩa mềm, đĩa cứng, giờ, thiết bị đầu cuối)
là một địa điểm (thường gần cuối của bộ nhớ) được gọi là các vector ngắt. Nó chứa các
địa chỉ của thủ tục gián đoạn dịch vụ. Giả sử rằng người sử dụng quy trình 3 đang chạy khi một đĩa
ngắt xảy ra. Sử dụng quá trình 3 của chương trình truy cập, từ trạng thái chương trình, và có thể một hoặc
nhiều thanh ghi này được đẩy lên (hiện tại) stack bằng phần cứng ngắt. Các máy tính sau đó
nhảy đến địa chỉ được chỉ định trong vector đĩa bị gián đoạn. Đó là tất cả các phần cứng không. Từ
đây trở đi, đó là vào các phần mềm, đặc biệt là các thủ tục gián đoạn dịch vụ.
Tất cả các ngắt bắt đầu bằng việc lưu sổ đăng ký, thường trong các entry bảng tiến trình cho quá trình hiện
Sau đó thông tin bị đẩy vào ngăn xếp bởi các ngắt được loại bỏ và con trỏ ngăn xếp được
thiết lập để trỏ đến một chồng tạm thời được sử dụng bởi các quá trình xử lý. Hành động như tiết kiệm các thanh ghi
và thiết lập con trỏ ngăn xếp có thể thậm chí không được thể hiện trong ngôn ngữ cấp cao như C, do đó, họ
được thực hiện bởi một thói quen ngôn ngữ lắp ráp nhỏ, thường là một trong những giống cho tất cả các ngắt từ
việc tiết kiệm các thanh ghi là giống hệt nhau, không có vấn đề gì là nguyên nhân của sự gián đoạn.
Khi thói quen này được hoàn thành, nó gọi một thủ tục C để làm phần còn lại của công trình cho cụ thể này
bị gián đoạn loại. (Chúng tôi giả định các hệ điều hành được viết bằng C, sự lựa chọn thông thường cho tất cả các thực
hệ điều hành). Khi nó đã làm công việc của mình, có thể làm cho một số quá trình bây giờ đã sẵn sàng,
lên lịch và được gọi là để xem ai chạy tới. Sau đó, điều khiển được chuyển trở lại lắp ráp
mã ngôn ngữ để tải lên các thanh ghi và bộ nhớ đồ cho quá trình doanh nghiệp hiện tại và bắt đầu nó
chạy. Xử lý ngắt và lập lịch trình được tóm tắt trong hình. 2-5. Điều đáng chú ý là các
chi tiết khác nhau đôi chút từ hệ thống để hệ thống.
1. Phần cứng ngăn xếp chương trình truy cập, vv
2. Phần cứng tải đếm chương trình mới từ vector ngắt.
3. Thủ tục đăng ký lưu ngôn ngữ lắp ráp.
4. Thủ tục ngôn ngữ hội thành lập mới stack.
5. C chạy gián đoạn dịch vụ (thường đọc và bơ đầu vào).
6. Scheduler sẽ quyết định quá trình là để chạy tới.
7. Thủ tục C trả về cho mã lắp ráp.
8. Thủ tục ngôn ngữ hội khởi động quá trình hiện hành mới.
Hình 2-5. Skeleton của những mức thấp nhất của hệ điều hành nào khi một ngắt
xảy ra.
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: