1 / 14

Week Fifteen Agenda

Week Fifteen Agenda. Announcements Revised Final Exam Outline Review week fourteen information Current weeks information Open Source Presenters Angelina LePes Richard Dawber John Ulrich Daniel Miotke Rob Ream Lucas Griffin William Smith. Week Fifteen Agenda.

chaman
Télécharger la présentation

Week Fifteen Agenda

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week Fifteen Agenda • Announcements • Revised Final Exam Outline • Review week fourteen information • Current weeks information • Open Source Presenters Angelina LePes Richard Dawber John Ulrich Daniel Miotke Rob Ream Lucas Griffin William Smith

  2. Week Fifteen Agenda 1’s Complement is where all the bits that are a 1 are changed to 0 and all the bits that are 0 are changed to 1. Reversing the digits is also called complementing the number.

  3. Week Fifteen Agenda We will use 4-bit arithmetic to illustrate the point. Binary Decimal 0111 7 0110 6 0000 0 1111 -0 1001 -6 1000 -7

  4. Week Fifteen Agenda 1’s Complement All negative integers begin with a 1. The most significant bit always tells the sign of the number. The only exception to this rule is the -0.

  5. Week Fifteen Agenda Kill command is use in several operating systems to send signals to running processes. Implementing the kill command, does not always result in terminating a process. The kill command is a wrapper around the kill() system call, which sends signals to processes or process groups on the system that can be referenced by their process ID (pid). There are many different signals that can be sent to a process, although the ones of most interest are the SIGTERM and SIGKILL.

  6. Week Fifteen Agenda The default signal sent is SIGTERM. Programs that can handle this signal can have useful cleanup operations (save configuration information to a file) before a process terminates. All signals can be intercepted by a process except the SIGKILL and SIGSTOP. These two signals cause a special function to be executed, that are only seen by the kernel. The SIGKILL kills the process, and SIGSTOP pauses it until a SIGCONT is received.

  7. Week Fifteen Agenda UNIX provides security mechanisms that prevent one user on the system from killing another user’s process. In order for one process to send a signal to another, the owner of the signaling process must be the same as the owner of the receiving process or be the superuser.

  8. Week Fifteen Agenda Other useful signals include the following: SIGINT signal can be generated with a CTRL+c SIGTSTP signal can be generated with a CTRL+z SIGQUIT signal can be generated with a CTRL+\ The SIGQUIT will force the program to do a core dump.

  9. Week Fifteen Agenda Microsoft’s command line interpreter Windows PowerShell, kill is a predefined command alias for the Stop-Process command. Microsoft Windows XP, Vista and 7, include the command taskkill.

  10. Week Fifteen Agenda The fork () function is used to create a new process from an existing process. The new process is called the child process, and the existing process is called the parent. Their differences can be verified by checking the return value from fork (). The parent gets the child’s pid returned to him, but the child get 0 (zero) to him.

  11. Week Fifteen Agenda The attributes the child inherits from the parent varies depending on the UNIX implementation. Inherits: Process credentials (uids and gids) Environment Stack Memory Open file descriptors Close on exec flags Signal handling settings

  12. Week Fifteen Agenda Nice value Scheduler class Process group ID Session class Current working directory Root directory File mode creation mask (umask) Resource limits Controlling terminal

  13. Week Fifteen Agenda Unique to child process: Process ID Different parent process ID Own copy of file descriptors and directory streams Process, text, data and other memory locks are NOT inherited Process times, in the tms struct

  14. Week Fifteen Agenda Resource utilization are set to zero. Pending signals initialized to the empty set Timers created by timer_create operations not inherited Asynchronous input or output operations not inherited

More Related