Lecture Operating systems: Lesson 12 - Dr. Syed Mansoor Sarwar

Lecture Operating systems: Lesson 12 - Dr. Syed Mansoor Sarwar. The main topics covered in this lesson include: process management commands: bg, fg, ^Z, jobs, ^C, kill; thread concept; pros and cons of threads; user and kernel threads; pthreads library with example; . | Operating Systems Lecture 12 Agenda for Today Review of previous lecture Process management commands bg fg Z jobs C kill Thread concept Pros and cons of threads User and kernel threads Pthreads library with example Recap of lecture 28 April 2022 Copyright Virtual University of Pakistan Review of Lecture 11 Use of FIFOs in a program Sample code Process management in UNIX Linux UNIX Linux commands calls mknod mkfifo ps top 28 April 2022 Copyright Virtual University of Pakistan The fg Command fg job_id fg resumes the execution of a suspended job in the foreground and moves a background job into the foreground. If job_id is omitted the current job is assumed. 28 April 2022 Copyright Virtual University of Pakistan The bg command bg job_id bg resumes the execution of a suspended job in the background. If job_id is omitted the current job is assumed. bg runs the current or specified jobs in the background. 28 April 2022 Copyright Virtual University of Pakistan The jobs command jobs jobs displays status of suspended and background processes. 28 April 2022 Copyright Virtual University of Pakistan Suspending a Process sends a STOP SUSPEND signal to the current process. The shell displays a message saying that the job has been suspended and displays its prompt. You can then manipulate the state of this job put it in the background with the bg command run some other commands and then eventually bring the job back into the foreground with the fg command. 28 April 2022 Copyright Virtual University of Pakistan Sample Session find -name foo -print 2 gt dev null Z 1 Stopped find -name foo -print 2 gt dev null bg 1 find -name foo -print 2 gt dev null amp jobs 1 Running find -name foo -print 2 gt dev null amp fg find -name foo -print 2 gt dev null command output 28 April 2022 Copyright Virtual University of Pakistan Terminating Current Process sends the SIGINT signal to the current process which by default terminates the process. find -name foo -print 1 gt out 2 gt dev null C 28 .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
103    133    5    26-04-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.