GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Computers and the Internet

kappa kek Englisch 42 Karten

Computers and the Internet

Karten in diesem Stapel (42)

  1. 1Filea named collection of related information recorded on secondary storage
  2. 2Secondary Storagealso known as non-volatile storage or persistent storage, such as an USB or external HDD
  3. 3Mountingthe file system on a storage device may be mounted at a point in the existing file system, allowing the file system to see the files on the storage device.
  4. 4How does a magnetic disk work?A magnetic disk has several platters, over which hover some heads attached to a movable arm. These arms can move the heads via a servo motor. A platter is divided into circular tracks that are divided into sectors. The tracks at one arm position make up a cylinder.
  5. 5How does a magnetic disk read/write data to/from it?A magnetic disk is read/written by moving the arm to the required cylinder and using a head to sense/change the magnetism of a sector
  6. 6What are the advantages of an SSD over a HDD?• Low read/write times
    • Reduced power consumption
    • Reduced space occupancy
    • High resistance to shock
  7. 7How does is data read from a SSD?1. Copying a flash memory page into the buffer
    2. Reading data from the page in the buffer
  8. 8How is data written to an SSD?1. Copying a memory block into the buffer
    2. Erasing the block in flash memory
    3. Modifying the block in the buffer
    4. Writing the block from the buffer to the flash memory
  9. 9What are the two types of wear levelling and how do they work to increase the lifespan of an SSD?• Dynamic Wear Levelling, which writes new data to the least recently used block - cold data (data that has not been accessed in a while) is not moved
    • Static Wear Levelling, which additionally periodically moves existing data to the least recently used block – cold data is moved
  10. 10What are the three categories of I/O devices?• Human Interface Devices, such as screens or keyboards – allow for a human to interact with the computer system
    • Storage Devices, such as disks or tapes - stores data and files
    • Transmission Devices, such as network cards or modems – moves data from one place to another
  11. 11What is a bus?A bus is a connection between components in which it transfers data between them via communication.
  12. 12Which registers is an I/O device controlled through?• Data-In Register – data coming from the device
    • Data-Out Register – data going to the device
    • Status Register – bits indicating the status of the device
    • Controller Register – bits giving commands to the device
  13. 13What are the two approaches to control of I/O and how do they work?Polling - the processor checks the device to see if it is ready
    Interrupts - the device signals to the processor when it is ready
  14. 14What is Direct Memory Access (DMA)?The I/O device takes the data directly from memory, instead of the processor handing the data to the I/O device and transfers blocks of data at once
  15. 15What is a character I/O system call?System calls for this enable an application to get/put a single character from/to a device
  16. 16What is a block I/O system calls?System calls for this enable an application to read/write many characters and perhaps seek on a device.
    It is more efficient to read a large amount of data at once than one character at a time, since It takes some time to do so
  17. 17What is memory-mapped I/O system calls?System calls for this to enable an application to map a device into memory
  18. 18What is network I/O system calls?Systems calls for this enable an application to read/write many characters to a network device socket
  19. 19Why does is a computer system organised into processes?• Modularity – it is easier to build and maintain
    • Speedup – it is easier to run on multiple machines
  20. 20Describe the process life-cycle as a state transition diagramDescribe the process life-cycle as a state transition diagram
  21. 21What does a process control block contain?• The process number (its identity)
    • The process state (its registers)
    • The process address space (its memory)
    • The process I/O (its open files and network connections)
  22. 22What is context switching?A context switch involves saving the machine state in one process control block and loading the machine state from another. This is expensive in terms of time.
  23. 23What does a processor address space contain?• A stack section for temp data
    • A heap section for dynamically-allocated data
    • A data section for global data
    • A text section for program code
  24. 24What are the Unix system calls used to spawn a process?• Fork: copies a process address space – when a process creates another process it clones itself
    • Exec: overwrites a process address space with a program – the cloned process overwrites itself with a code and runs until completion
    • Wait: waits for another process to exit – the first process waits for its cloned process to finish
    • Exit: terminates a process – the process ends and continues with its own process
  25. 25What is a fork and why does a process clone itself?A fork copies an address space – so that you have two processes that are the same. If you use a command prompt, typing a command and executing it will copy itself, complete the command and exit.
    The reason for processes being duplicated exactly is that the parent can share an environment with the child easily and so can give its environment to the child.
  26. 26Inter-process communication - shared memoryo Involves processes writing data to/reading data from an agreed area of memory
    o Both processes share a piece of memory and one writes and other reads to share this data
    o A disadvantage is that both processes may not be synchronised.
  27. 27Inter-process communication - message passingo Involves processes sending messages to/receiving messages from an agreed mailbox
    o If process A wants to talk to process B it sends a creates a message, writes the address of the process to communicate with and then gives it to the kernel to deliver it
    o The involvement of the kernel will keep order
    o A Disadvantage is that it is much slower as uses the kernel.
  28. 28What is dispatching in processor scheduling?Dispatching is when the processor is deciding which process should execute next.
  29. 29First come first servedo Queues up the processes in order of creation data and competes the whole process
    o Advantages:
     Very easy to implement and so easy to maintain and debug
    o Disadvantages:
     If a short process is behind a large one, then that process will not complete immediately and wait for a while
  30. 30Round robino A process is selected to run for a certain time slice
    o Advantages:
     Each process is given a time to run and so works based on equality and prevents starvation (where processes never get run)
    o Disadvantages:
     Short time slices allow the illusion of processes all working at once, but they won’t finish before they are change for another process
  31. 31Shortest process nexto The shortest process goes first, based on its shortest predicted time
    o Advantages:
     Short processes hold onto memory such as files and so running them frees up space
    o Disadvantages:
     Large processes may be waiting for a long time before they are run
     It is difficult to know how long a process will take to complete
  32. 32What is multilevel queuing?o Runs processes based on execution history
    o Interactive processes should be a priority for the user
    o Batch processes run when nothing else is running
    o Processes are allocated into queues based on its past behaviour
  33. 33What are the two process orientations and what algorithms do they use?• User-Oriented – Round Robin or interactive system
    • System-Oriented – First Come, First Served
  34. 34What is processor affinity and why is it useful?A multiprocessor scheduling algorithm should keep a process on the same (cache-primed) processor, which is processor affinity.
    This is useful because moving a process to another processor is difficult and time expensive
  35. 35What is load balancing?Processors with an empty queue can “steal” a process from another process if it has a backlog/queue.
  36. 36What are the three memory management tasks?• Relocation
    o A process is given memory by the processor and when this process is finished, the processor needs to recover the memory
    o The memory will be fragmented and there will be gaps between processes
    o The processor then packs the memory together to free up memory
    • Protection
    o The processor protects the memory for each process
    o The process is only allowed to access its own address space, not others to prevent corruptions and insecurity
    • Sharing
    o Some processes share memory between another process
    o For example, opening two terminals will load only one set of code into the memory and the memory is shared between the two terminals
  37. 37Fixed partitioningo Loads entire process memory maps into same-sized partitions
    o Advantages:
     The holes between memory would be the same and so not fragmentated
     Easy to implement
    o Disadvantages:
     Potentially wasted memory if the process does not need as much memory as it is given
     The fixed size may not be enough for the process
  38. 38Dynamic partitioningo Loads entire process memory maps into different-sized partitions
    o Advantages:
     Less chance of wasted memory
    o Disadvantages:
     Process requirements not going to be perfect to fit into small medium large and so not eliminated completely
  39. 39Simple segmentationo Loads all process memory map segments into different-sized partitions
    o For example, small part for code and large part for code
    o Allows for chopping up data and code into different partitions in memory
    o Disadvantages:
     Still leads to wastage and memory will have lots of size holes which are not useful for processes
    o Advantages:
     Memory protection can be ensured with this technique according to their usage. For example, data should not be allowed to execute, and code should not be overwritten to. Cannot share data between processes
  40. 40Virtual Memory Segmentationo Loads some process memory map segments into different-sized partitions
    o Moves address spaces from memory to a disk, known as swapping disk segments to memory and vice versa
    o Advantages:
     Allows more executions of processors as more memory on the hard-drive as hard-drive memory is cheap compared to memory
    o Disadvantages:
     Disks are slow and so does slow up the processes
  41. 41Simple Pagingo Fixes the wastage space problem
    o Divides process memory maps into same-sized pages and loads all of them into same-sized frames
    o Some processes need more than one page
    o Advantages:
     No more compacting memory since all the holes will be the same size
     Simplified the operating system’s task if it’s told to take the memory off the disk and put it in memory as it just needs to find an available slot and not care about its size, known as paging since the segments are now pages
    o Disadvantages:
     Page tables may consume more memory
  42. 42Virtual Memory Pagingo Divides memory maps into same-sized mages and loads some of them into same-sized frames
    o If there is no space in memory for a new process, the new process takes up the space of the least recently used (LRU) pages and transfers the LRU to the disk
    o Memory sharing can be ensured with virtual memory paging by allowing pages to be shared between address maps. This prevents memory being tied up that is not necessary
    o Advantages:
     Memory isolation as applications are freed from having to share memory space which increases security
    o Disadvantages:
     Page tables may consume more memory

Informationen

Beschreibung
Karteikarten am Computers and the Internet, erstellt von kappa kek am 08/12/2018.
Erstellt von
kappa kek · Dez 2018
Aktualisiert
10 Dez 2018
Aufrufe
3
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck