Operating Systems Design and Implementation, Third Edition phần 6

Ngay sau chương này, chúng tôi sẽ trao đổi và phân trang. Trong suốt chương này, người đọc nên lưu ý rằng trao đổi và phân trang chủ yếu là hiện vật gây ra bởi tình trạng thiếu của bộ nhớ chính đủ để giữ tất cả các chương trình và dữ liệu cùng một | 18 Simpo PDF Merge and Split Unregistered Version - http Figure 4-47. System calls relating to signals. System call Purpose sigaction Modify response to future signal sigprocmask Change set of blocked signals kill Send signal to another process alarm Send ALRM signal to self after delay pause Suspend self until future signal sigsuspend Change set of blocked signals then PAUSE sigpending Examine set of pending blocked signals sigreturn Clean up after signal handler The sigaction system call supports the sigaction and signal functions which allow a process to alter how it will respond to signals. Sigaction is required by POSIX and is the preferred call for most purposes but the signal library function is required by Standard C and programs that must be portable to non-POSIX systems should be written using it. The code for do_sigaction line 19544 begins with checks for a valid signal number and verification that the call is not an attempt to change the response to a sigkill signal lines 19550 and 19551 . It is not permitted to ignore catch or block sigkill. Sigkill is the ultimate means by which a user can control his processes and a system manager can control his users. Sigaction is called with pointers to a sigaction structure sig_osa which receives the old signal attributes that were in effect before the call and another such structure sig_nsa containing a new set of attributes. Page 463 The first step is to call the system task to copy the current attributes into the structure pointed to by sig_osa. Sigaction can be called with a NULL pointer in sig_nsa to examine the old signal attributes without changing 18 Simpo PDF Merge and Split Unregistered Version - http 19 them. In this case do_sigaction returns immediately line 19560 . If sig_nsa is not NULL the structure defining the new signal action is copied to the PM s space. The code in lines 19567 to 19585 modifies the mp_catch mp_ignore and mp_sigpending bitmaps according to .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
66    87    2    01-07-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.