¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

How does hardware execute software?

SEZ McKelvey Inglés 14 fichas

Fichas del conjunto (14)

  1. 1What is the Instruction Set Architecture and what is the primary component of the ISA?The ISA is the interface between hardware and software. It is the view the programmer has of the hardware and includes everything the programmers need to know to control the processor. Its primary component is its assembly language, which is a low level language that facilitates translation into machine code.
  2. 2Give 3 instructions of the MIPS (Microprocessor without Interlocked Pipeline Stages) ISA and explain carefully what they do.lw $s1, ($s2) ($s1 takes the value of the memory location held in register $s2)
    addi $s1, $s2, x (s1 takes the value of s2 plus the number x)
    j m (jump to memory location m)
    beq $s1, $s2, m (if the value of $s1 == the value of $s2 then go to memory location m)
  3. 3What do we mean when we say that a MIPS instruction is 32 bits wide?Instructions consist of 32 binary digits, which hold information about the type of instruction, the data used, and the destination for the data.
  4. 4What are the 3 types that MIPS instructions are partitioned into? Briefly describe these typtes.I types (which involve data transfer)
    R types (which work on registers)
    J types (which involve jumps)
  5. 5Detail four different functions of the operating system.- Virtualises a machine. An OS provides abstractions that present clean interfaces so as to make the computer easier to use, eg presenting the hard disk as a well organised file pigeonholing system.
    - Controls and manages the execution of different programs by starting/stopping programs (stopping them frees memory to be used by other programs)
    -It manages memory by hiding actual execution locations to the programs using memory so that they can still run.
    -Maintains and provides access to the file system. Ensures that programs and users only have access to their own files, ad not those of others, and that users can access their files in a well-structured way.
  6. 6What is data security (in the context of OSes)?Memory allocated to each program must be kept separate and secure from other programs.
  7. 7What is virtualization (in the context of OSes)?Virtualisation provides abstractions for complicated, idiosyncratic machine architecture and presents a clean interface that makes the computer easier to use.
  8. 8Explain what an interrupt is and how the operating system uses interrupts to deal with peripheral devices that operate much more slowly than the CPU.An interrupt is where the CPU instructs a device and carries on with other tasks. When the device finishes, it raises an interrupt on a bus line. The interrrupt handler deals with the interrupt and enables the CPU to stop what it is doing and attend to the device. With a peripheral that operates slowly, this enables the CPU not to have to wait for the peripheral to finish.
  9. 9What is process within an operating system and what are the two essential elements of a process? Is it the case that an operating system for a CPU with one processor can only have one process?Each currently executing program is a process. The two components are threads and address space.
    Threads are sequences of instructions in the context of a sequential execution.
    Address spaces consist of some memory locations that the corresponding process can read from and write to.
    Multiple threads can be run at the same time on a processor, provided that there is no mutual exclusion.
  10. 10Explain the principle of mutual exclusion and give an illustration to show that ensuring mutual exclusion is important.Mutual exclusion is the principle that no two threads should have critical sections occur at the same time, where the critical section is exclusive access to a shared resource (eg a memory location).
    Suppose two threads have access to the counter c, and each thread is to increment the counter. Each thread reads the counter, increments it by one, and writes it back to the same location. The critical section is acquiring access to the counter to increment it.
    An execution sequence without mutual exclusion enforced might lead to c=1 when in fact c = 2 as thread 2 reads the value of c before thread 1 has written back its updated value.
  11. 11Explain how the principle of virtual memory works. Why is virtual memory required?Virtual memory is required when multiple processes are run simultaneously and between them require more RAM than is available. OSes use virtual memory by paging to move data between the hard disk and RAM when there isn't enough RAM available, making sure that needed data is always available, depending on process priority and activity, with low priority processes moved to the hard disk, and high priority ones remain in the RAM so that high priority processes are executed quickly
  12. 12Describe the life cycle of processes within the operating system (be sure to explain each component of the life-cycle).New: the process is being created
    Ready: the process is ready to execute (and is not being executed currently)
    Running: the process is being executed on the CPU
    Blocked: the process is waiting for an event (and is thus not executable)
    Exit: the process has finished.
    A program is admitted new to ready, dispatched to running and then released to exit. However, from running it may yield to ready, or it may event-wait to blocked, then an event changes it back to ready, then back to running.
  13. 13What is a process control block and what is one used for by the OS? Name 3 items in a PCB.A PCB is a data structure used by the OS kernel to manage a process.
    PCBs consist of:
    - A process's unique ID
    - The current state of the process
    -A program counter, detailing the next instruction to be executed (only available for processes not currently running).
  14. 14Explain the principle of context switching with regard to process control blocks.The process whereby the OS pauses one process and resumes annother process. It entails managing the PCBs as different processes that are being given access to the processor.

Información

Descripción
Fichas sobre How does hardware execute software?, creado por SEZ McKelvey el 26/03/2018.
Creado por
SEZ McKelvey
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?