text
stringlengths
1
3.55k
source
stringlengths
24
207
emb
listlengths
1.02k
1.02k
running process from the cpu and the selection of another process based on a particular strategy is called scheduling. in oss, a process can be in one of several states. these states are part
openstax_introduction_to_computer_science_-_web
[ 0.022462354972958565, -0.018787723034620285, -0.007126455660909414, -0.018151892349123955, -0.026963870972394943, -0.027657845988869667, -0.04176042973995209, 0.0010654388461261988, -0.006727685686200857, 0.06992022693157196, 0.006138483993709087, 0.023882277309894562, 0.027854742482304573, ...
6. 3 • processes and concurrency 267 of the process life cycle, and understanding them is essential for grasping how the os manages processes. the specific names and number of states can vary between oss, but the fundamental concepts remain the same — or at least quite similar. each process has an execution state, whic...
openstax_introduction_to_computer_science_-_web
[ -0.027510132640600204, -0.040565017610788345, 0.005974731873720884, -0.01955261453986168, -0.006950254086405039, -0.05443863198161125, -0.020637914538383484, -0.01440228521823883, -0.004742754623293877, 0.08547895401716232, 0.021949689835309982, 0.019870297983288765, 0.026134129613637924, ...
acknowledges its completion. this acknowledgment allows the os to fully clean up any remaining information, officially ending the process ’ s life cycle. figure 6. 20 the life cycle of a process within an os starts with the creation of the process and ends with an acknowledgment of completion. ( attribution : copyright...
openstax_introduction_to_computer_science_-_web
[ -0.03462573513388634, -0.04959267005324364, 0.010094106197357178, 0.006524679251015186, -0.012573180720210075, -0.04079749062657356, -0.020866399630904198, -0.019852165132761, 0.01626913994550705, 0.05654662102460861, 0.004392510745674372, 0.006723606493324041, 0.0009529071976430714, -0.00...
cpu follows to change from one task to another while ensuring that the tasks do not conflict. in figure 6. 21, the process p0 is in the running state, and the process p1 is in the ready state. when an interruption occurs, the process p0 must be switched from the running to the ready state, and the process p1 must be sw...
openstax_introduction_to_computer_science_-_web
[ 0.0009283345425501466, -0.0089517030864954, -0.010384655557572842, 0.028075752779841423, 0.006529692094773054, -0.05337473377585411, -0.056102119386196136, 0.008370965719223022, -0.005216821562498808, 0.10260141640901566, 0.021952392533421516, 0.0002737680042628199, 0.023985039442777634, -...
suppose we have two processes — process p1 with execution time 3 and process p2 with execution time 2. the arrival time for both process p1 and process p2 is t0. the system will start with process p1 at t0 and finish at t3 and process p2 will start at time t3 to time t5, as shown in figure 6. 22. the wait time for proc...
openstax_introduction_to_computer_science_-_web
[ -0.0012002554722130299, 0.021062802523374557, 0.00623351102694869, -0.023695096373558044, 0.005294343456625938, -0.031203793361783028, -0.030251041054725647, 0.006841854192316532, 0.00196638866327703, 0.0967482402920723, -0.041966941207647324, 0.04356520250439644, -0.020906472578644753, 0....
6. 3 • processes and concurrency 269 figure 6. 22 two processes, p1 and p2, are being processed using the fcfs algorithm. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) • round - robin scheduling ( rr ) : this algorithm, which is widely used in time - sharing systems, is designed to ens...
openstax_introduction_to_computer_science_-_web
[ 0.015537713654339314, 0.025390926748514175, 0.01135712955147028, 0.023178143426775932, -0.005894917529076338, -0.0029768950771540403, -0.05520546808838844, -0.0354236401617527, -0.031182419508695602, 0.10888716578483582, 0.010525016114115715, -0.001766468514688313, 0.021118836477398872, -0...
on shared resources. through mechanisms like locks, condition variables, and semaphores, developers can design systems that are both efficient and safe, avoiding issues such as data races and deadlocks. one way of coordinating multiple concurrent activities that are using shared state is synchronization, which groups o...
openstax_introduction_to_computer_science_-_web
[ 0.019453860819339752, -0.0044694505631923676, 0.014036677777767181, 0.06608180701732635, 0.03667839244008064, -0.03052034229040146, -0.021084528416395187, -0.02226915955543518, -0.007788064423948526, 0.08358298242092133, -0.00926979910582304, 0.01697574369609356, 0.020005671307444572, -0.0...
mutual exclusion. a thread must acquire a lock before entering a critical section ; if the lock is already held by another thread, the attempting thread will block until the lock becomes available. another synchronization mechanism called a condition variable is used in conjunction with locks to allow threads to wait f...
openstax_introduction_to_computer_science_-_web
[ -0.0004228582256473601, 0.014488335698843002, 0.01776712015271187, 0.05504676699638367, 0.0001192589188576676, -0.031938523054122925, -0.03244543820619583, 0.013919753022491932, 0.007655860390514135, 0.09775789827108383, 0.008709296584129333, -0.0035398087929934263, 0.04809214919805527, -0...
like queues but use semaphores for controlled automatic access, and operate in first in, first out ( fifo ) order only. technology in everyday life multitasking the ability to run multiple programs at once on computers today has a huge productivity impact in all industries. in concurrent programming, managing shared re...
openstax_introduction_to_computer_science_-_web
[ 0.009771252982318401, -0.009982148185372353, -0.0141897639259696, 0.03149234130978584, -0.013747183606028557, 0.0025743143633008003, -0.020674433559179306, -0.009648381732404232, 0.026726843789219856, 0.05583836883306503, -0.01010465994477272, 0.0008103232248686254, 0.027214154601097107, -...
6. 3 • processes and concurrency 271 producer - consumer problem, where one or more threads ( producers ) generate data, and others ( consumers ) consume it. to avoid conflicts, synchronization mechanisms like locks and condition variables are employed. locks help ensure that only one thread accesses a critical section...
openstax_introduction_to_computer_science_-_web
[ 0.0011599499266594648, 0.023639069870114326, 0.029731249436736107, 0.037794750183820724, -0.010665468871593475, -0.03144142031669617, -0.015136525966227055, -0.001106507028453052, -0.005209484603255987, 0.09095203876495361, -0.01600831188261509, -0.015082194469869137, 0.05047132447361946, ...
, each file is assigned to a contiguous ( i. e., neighboring ) set of blocks in the memory. for example, if a file requires three blocks and is given a starting location x, the file will be allocated in x, x + 1, x + 2. the directory entry with contiguous allocation contains the starting block address and the length of...
openstax_introduction_to_computer_science_-_web
[ -0.011260894127190113, 0.03146626055240631, 0.04476705938577652, -0.028444860130548477, 0.004435359034687281, 0.009649624116718769, 0.0034869671799242496, -0.005738697946071625, -0.011524263769388199, 0.05015021190047264, -0.008243532851338387, 0.027196265757083893, 0.011501328088343143, -...
6. 4 memory management learning objectives by the end of this section, you will be able to : • discuss key concepts related to memory • evaluate dynamic storage management solutions • discuss the differences between virtual and physical memory as you have learned, memory plays a huge role in oss. here, we discuss the m...
openstax_introduction_to_computer_science_-_web
[ 0.02506483718752861, 0.019616013392806053, 0.0109701631590724, 0.048726774752140045, -0.013723217882215977, -0.02371179684996605, -0.03040030598640442, -0.0534224808216095, -0.0029052102472633123, 0.07673043012619019, -0.021826745942234993, 0.03553835675120354, 0.010533717460930347, -0.018...
kernel mode. as we have learned, the cpu boots in kernel mode, then it marks the flag as kernel mode. when the user starts any application, the cpu marks the flag as user mode. • address space boundaries protect the kernel and address space programs from each other. • system call interface is the programming interface ...
openstax_introduction_to_computer_science_-_web
[ -0.015072616748511791, 0.026276612654328346, -0.00317018642090261, 0.01002268586307764, 0.024122586473822594, -0.0034587185364216566, -0.018157610669732094, -0.02281472273170948, 0.001975978258997202, 0.0482306070625782, -0.0215196181088686, 0.016078123822808266, 0.016461431980133057, -0.0...
6. 4 • memory management 273 figure 6. 26 the three processes p1, p2, and p3 ( blue ) will work as scheduled based on the time slice. the processes are scheduled in the queue and executed, so they come out of the queue ( arrow ). empty spaces in the queue are shown in pink. ( attribution : copyright rice university, op...
openstax_introduction_to_computer_science_-_web
[ 0.021907443180680275, 0.03425636142492294, 0.0030828220769762993, 0.01578066125512123, -0.02921794354915619, -0.023658299818634987, -0.03291812539100647, -0.013845608569681644, -0.008050614036619663, 0.04477190226316452, -0.015115194022655487, 0.009891358204185963, 0.024637453258037567, -0...
( specifically, external fragmentation ). when the memory blocks cannot be allocated to the processes due to their small size and the blocks remain unused, this problem is called fragmentation. there are two types of fragmentation : internal fragmentation and external fragmentation. when the process is allocated a bloc...
openstax_introduction_to_computer_science_-_web
[ -0.04999902471899986, -0.01570141687989235, 0.0037684612907469273, 0.000941145233809948, -0.00986466184258461, 0.00005973583029117435, -0.014103429391980171, -0.0027027293108403683, 0.0023345998488366604, 0.05271046981215477, 0.002541779074817896, 0.009176447056233883, 0.015746034681797028, ...
, the os will load the file to the memory with the added option of sharing the memory with others. the os facilitates the memory size at runtime by adding more assigned memory when needed. figure 6. 28 in linux ’ s memory layout, the code starts at location 0, the data starts immediately above the code and grows upward...
openstax_introduction_to_computer_science_-_web
[ -0.011099398136138916, -0.004682373255491257, 0.038045093417167664, 0.0006891815573908389, -0.010426530614495277, -0.006912268232554197, 0.007589353248476982, -0.0011976879322901368, 0.006849229335784912, 0.031778763979673386, 0.00303004146553576, 0.01869487203657627, 0.026502534747123718, ...
6. 4 • memory management 275 which is hierarchical and restricted, but simple and efficient ; and ( 2 ) heap allocation, which is more general but more difficult to implement and less efficient. the linear data structure that follows a lifo order ( last in, first out ), as in the stack data figure configuration in figu...
openstax_introduction_to_computer_science_-_web
[ -0.0240580253303051, -0.04575447738170624, 0.017074638977646828, -0.00704773236066103, -0.010259978473186493, -0.018404074013233185, 0.010931084863841534, 0.00593156972900033, 0.01275758445262909, 0.06167461350560188, 0.013995718210935593, 0.006139006465673447, 0.003086063079535961, -0.024...
4. 0 license ) memory managers, such as the ones used in c and c + +, do not actually store available memory in a heap data structure. instead, they manipulate a doubly linked list of blocks, which they confusingly refer to as a “ heap, ” and attempt to optimize memory using a “ best fit ” method. memory managers use t...
openstax_introduction_to_computer_science_-_web
[ -0.014867627061903477, 0.007720342371612787, 0.008029068820178509, 0.05445356294512749, 0.014292809180915356, 0.019804010167717934, 0.019188016653060913, -0.03530971333384514, -0.0019225002033635974, 0.0447162464261055, -0.008187713101506233, 0.003667872166261077, -0.008050628937780857, -0...
transaction to physical memory. tlbs help the cpu avoid making multiple round trips to main memory just to resolve a single virtual memory access by only requiring one round trip ( figure 6. 31 ). a tlb contains page table entries that have been most recently used. given a virtual address, the processor examines the tl...
openstax_introduction_to_computer_science_-_web
[ -0.005853641778230667, 0.003718629013746977, 0.01099899411201477, 0.029669493436813354, -0.00823829136788845, -0.013823160901665688, 0.023704880848526955, -0.004323903936892748, -0.012839028611779213, 0.0639173835515976, -0.025904107838869095, 0.024754274636507034, 0.025159522891044617, -0...
6. 4 • memory management 277 demand paging the storage mechanism that uses a page form in retrieving a process from secondary or virtual memory to main memory is called paging. virtual memory presented a seemingly infinite amount of memory to the running process, but what happens when the operating system runs out of f...
openstax_introduction_to_computer_science_-_web
[ -0.0022519128397107124, 0.012579308822751045, 0.03949427232146263, 0.060583602637052536, -0.019241351634263992, -0.017808863893151283, 0.0043265921995043755, -0.006985683925449848, -0.004946467466652393, 0.05888134241104126, 0.007683582603931427, 0.0030598947778344154, 0.015434183180332184, ...
, loads the page from the backing store to the main memory, and resumes execution of the thread. the cpu has special hardware to assist in resuming execution after a page fault. given that access to the disk is much slower than dram, operating systems are often designed to predictively swap in - use pages into dram and...
openstax_introduction_to_computer_science_-_web
[ -0.027260305359959602, -0.025186123326420784, 0.028957411646842957, 0.04274015501141548, -0.004410101100802422, -0.028622882440686226, 0.0032175611704587936, -0.03584378585219383, 0.010340999811887741, 0.0972670391201973, 0.006774686276912689, -0.006769838277250528, 0.02207072824239731, 0....
running at the same time. these activities exceed the available memory, causing the system to constantly try to make space for new requests by moving data to and from the disk. strategies to prevent thrashing include limiting the number of simultaneously running programs to avoid memory overcommitment, optimizing how m...
openstax_introduction_to_computer_science_-_web
[ -0.016011981293559074, 0.013887476176023483, 0.004281357862055302, 0.05199925974011421, 0.025439495220780373, -0.020931724458932877, 0.028097303584218025, -0.019898653030395508, 0.01968700811266899, 0.08774005621671677, -0.018586469814181328, -0.0010512570152059197, 0.011351385153830051, -...
6. 5 file systems learning objectives by the end of this section, you will be able to : • explain features of various file systems • discuss file system structures and layers in this module, we learn about files, file management, disk devices, file systems, file system interface, and distributed file systems. files, fi...
openstax_introduction_to_computer_science_-_web
[ 0.005564822815358639, 0.0052037728019058704, 0.05126187577843666, -0.012535770423710346, -0.030419591814279556, 0.018275445327162743, -0.0033043217845261097, -0.01033756136894226, 0.008319463580846786, 0.07133791595697403, 0.0015366629231721163, 0.033417265862226486, -0.006943768821656704, ...
6. 5 • file systems 279 storage device. when designing a file system for managing many files, some issues to consider are as follows : most files are small so per - file overheads must be low ; most of the disk space is in large files ; many of the i / o operations are for large files so performance must be good for la...
openstax_introduction_to_computer_science_-_web
[ 0.0011713088024407625, -0.0012468266068026423, 0.06143016740679741, -0.00947908777743578, -0.004450344014912844, 0.014127937145531178, 0.002175701782107353, -0.005926151294261217, 0.03241034969687462, 0.07447032630443573, 0.010271111503243446, 0.02561778947710991, 0.023572616279125214, 0.0...
, is considered secondary storage. routines that interact with disks are typically at a very low level in the os and are used by many components such as file systems and virtual machines. these secondary storage devices may handle the scheduling of disk operations, error handling, and often the management of space on d...
openstax_introduction_to_computer_science_-_web
[ -0.001894238987006247, 0.005828295834362507, 0.04931678622961044, -0.02435934543609619, -0.03596698120236397, 0.012525294907391071, -0.006047815550118685, 0.00931505300104618, 0.006890487857162952, 0.08245320618152618, 0.013590962626039982, 0.04328233376145363, 0.026256872341036797, -0.005...
file system ( ntfs ), files are located using a master file table ( mft ), and each file and directory on an ntfs volume has an entry in the mft containing data, including the file name, size, time stamps, permissions, and the locations of the file ’ s data on disk. when searching for a file, the os consults the mft to...
openstax_introduction_to_computer_science_-_web
[ -0.0012615980813279748, -0.014160621911287308, 0.04665013402700424, -0.005845875013619661, -0.006927590351551771, 0.00023092838819138706, 0.005487251095473766, -0.0037528981920331717, -0.007355376146733761, 0.08897928148508072, 0.019461290910840034, 0.00901008304208517, 0.024234170094132423,...
strongly affected by hardware characteristics. file system interface in general, the file system interface defines standard operations such as file ( or directory ) creation and deletion, manipulation of files and directories, copy, and lock. remember the various file attributes are name, type, size, and protection. th...
openstax_introduction_to_computer_science_-_web
[ -0.01695370301604271, 0.016489336267113686, 0.05131768062710762, -0.025384215638041496, -0.027370354160666466, 0.0013907074462622404, -0.002386504551395774, -0.011152992025017738, 0.012663415633141994, 0.09948063641786575, 0.017614144831895828, 0.028987810015678406, 0.00818953663110733, -0...
6. 5 • file systems 281 inodes as mentioned earlier, inodes are os data structures used to represent information about files and folders stored on disk along with file data and kept in memory when the file is open. an inode contains information including file size, sectors occupied by file, access times ( e. g., last r...
openstax_introduction_to_computer_science_-_web
[ 0.009086842648684978, -0.015284514985978603, 0.03821220621466637, -0.0139393275603652, -0.005699953995645046, 0.026268480345606804, 0.027094345539808273, -0.0130879245698452, 0.017624836415052414, 0.06127939373254776, 0.011639643460512161, 0.01387721300125122, 0.04831325262784958, 0.008571...
file system ). the main idea of a dfs is that it uses a namespace, which means all clients see a single namespace where files and directories are shared across the network. in a dfs, clients can read and write files on a remote machine as if they were accessing their local disks. a dfs provides an abstraction over phys...
openstax_introduction_to_computer_science_-_web
[ -0.0069242436438798904, 0.01388741098344326, 0.03588893264532089, 0.029984554275870323, 0.02041793428361416, 0.04166095331311226, -0.01918048784136772, -0.025006551295518875, 0.006517214700579643, 0.10071097314357758, -0.015521392226219177, 0.03309381753206253, 0.043700236827135086, -0.007...
process data in parallel, significantly speeding up computations and data analysis tasks. • resilient distributed datasets ( rdds ) in apache spark are a further step in distributed computing, offering an abstraction that represents read - only collection of objects partitioned across a set of machines that can be rebu...
openstax_introduction_to_computer_science_-_web
[ -0.006904483772814274, 0.010505206882953644, -0.012348654679954052, 0.017477674409747124, 0.007648972794413567, 0.02488064579665661, -0.017042750492691994, -0.02573540061712265, -0.00019158024224452674, 0.10123089700937271, -0.004327091854065657, 0.002872901037335396, 0.05482985079288483, ...
of industries, from banking to health care. read this brief tutorial on distributed file systems ( https : / / openstax. org / r / 76distrfile ) and name two advantages as well as two disadvantages of using dfss. flash memory flash memory is used for general storage and the transfer of data between computers and other ...
openstax_introduction_to_computer_science_-_web
[ -0.018338605761528015, 0.01513191219419241, 0.023547116667032242, 0.013181978836655617, -0.04009770229458809, 0.0004569347365759313, 0.005514661781489849, 0.006777026224881411, 0.02837388589978218, 0.07826710492372513, 0.023906853049993515, -0.03457033634185791, 0.05771082267165184, -0.013...
6. 5 • file systems 283 parts. this not only increases durability, but also means that data can be read from and written to the drive much faster. • random access : flash memory allows random access to any location on the storage, making it much quicker at reading data that is scattered across the drive. hdds need to p...
openstax_introduction_to_computer_science_-_web
[ -0.020902927964925766, 0.03669266775250435, 0.023451868444681168, 0.00664031645283103, -0.0006410598871298134, 0.048941608518362045, -0.00592445582151413, 0.005503551568835974, 0.03468739986419678, 0.08571712672710419, -0.010159007273614407, -0.004650133196264505, 0.03185150399804115, -0.0...
6. 6 reliability and security learning objectives by the end of this section, you will be able to : • explain how oss protect computer systems • discuss key security - related functions of the os • explain how the os helps the computer system recover from failures • discuss how advances in technology affect the longevi...
openstax_introduction_to_computer_science_-_web
[ 0.02602365054190159, -0.005833660718053579, 0.05797670781612396, 0.021192166954278946, -0.002338049001991749, 0.009173693135380745, -0.040718723088502884, -0.015751097351312637, 0.0012672326993197203, 0.06455901265144348, 0.00014787177497055382, 0.014345756731927395, -0.004662658087909222, ...
, there is access enforcement, which controls access. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) security the process of checking to see if a user ’ s credentials match the credentials in a database of authorized users or in a data authentication server is called authentication. the...
openstax_introduction_to_computer_science_-_web
[ -0.028699152171611786, -0.021929264068603516, 0.016652565449476242, -0.007380008231848478, 0.0059378682635724545, 0.027366170659661293, 0.005922872107475996, -0.006951646413654089, -0.000863756809849292, 0.051584675908088684, -0.0075858891941607, 0.02394569292664528, 0.029605844989418983, ...
with the password as long as the cookie persists. whenever a user needs to log in from a different browser or different machine, two - factor authentication is used again. after logging in, the user id is associated with every process executed under that login because the user id is stored in the process control block ...
openstax_introduction_to_computer_science_-_web
[ -0.012435310520231724, -0.009887585416436195, 0.03133820742368698, -0.02072962000966072, 0.003295642090961337, -0.0040993457660079, -0.026069868355989456, -0.026755157858133316, 0.015649985522031784, 0.053755778819322586, 0.0012796735391020775, 0.055363740772008896, -0.0017648384673520923, ...
6. 6 • reliability and security 285 the acl from oracle features the assignment of users to roles such as basic users, advanced users, customer administrator, among others. a role is configured to confer privileges on objects rather than attaching privileges to individual users, as this would be much more difficult to ...
openstax_introduction_to_computer_science_-_web
[ 0.008818848989903927, -0.02415664866566658, 0.04115772619843483, -0.013736937195062637, -0.007719972170889378, -0.018989067524671555, -0.007082717027515173, -0.03517143800854683, 0.024324698373675346, 0.06378098577260971, 0.033538252115249634, 0.0055512492544949055, 0.046554673463106155, -...
is composed of hardware and software and serves as the os ’ s inner protection layer. generally, any kind of management such as memory and interrupt management are provided by a security kernel. link to learning every once in a while, you may get a notification on your computer asking you to update your os, and the upd...
openstax_introduction_to_computer_science_-_web
[ -0.006008760537952185, 0.015528281219303608, 0.012783522717654705, 0.04431150481104851, -0.02405412122607231, -0.028565602377057076, -0.00908548291772604, -0.04931385815143585, 0.02243802882730961, 0.08176971226930618, 0.021726742386817932, -0.009047092869877815, 0.025908324867486954, -0.0...
address inconsistency issues include : • check consistency during reboot, and repair problem. a good example of checking for inconsistency is the file system check ( fsck ) command implementation for unix and unix - like file systems. the system executes fsck as part of every system boot sequence so it can check whethe...
openstax_introduction_to_computer_science_-_web
[ -0.004149974789470434, 0.009504687041044235, 0.03551720827817917, 0.05641777813434601, -0.03179982677102089, 0.000246411538682878, -0.007443655747920275, -0.02221601828932762, 0.005609400570392609, 0.10155029594898224, 0.03784835338592529, 0.010640272870659828, 0.02584139071404934, -0.0406...
content of the list before adding that block to the file. after ensuring that the list is not including that block, create a reference for the new block in the inode. using this approach, you ’ ll guarantee that you ’ ll never write a pointer prior to initializing the block to which it points without validation. the va...
openstax_introduction_to_computer_science_-_web
[ -0.021628448739647865, -0.001290997490286827, 0.003486066358163953, 0.012947280891239643, -0.0374133326113224, -0.01856832019984722, 0.0029944484122097492, -0.014404202811419964, 0.015009474940598011, 0.06796957552433014, 0.0075843846425414085, 0.006534039508551359, 0.03791278600692749, -0...
of the updates have been saved in the disk. there are many benefits to employing logging such as reducing the time needed to recover from any failure. also, improving the ability of localizing logs in the disk will result in improving the system ’ s performance. however, this approach has some drawbacks, namely, the si...
openstax_introduction_to_computer_science_-_web
[ 0.044496774673461914, 0.02583305351436138, 0.0008115309756249189, 0.01313580758869648, 0.0013357782736420631, -0.023964442312717438, -0.010083812288939953, -0.0046731214970350266, 0.04377387464046478, 0.0658278688788414, 0.015565195120871067, 0.007407666649669409, 0.01937711425125599, -0.0...
6. 6 • reliability and security 287 answer these questions, we need to discuss concepts such as paging, tlbs, disks, storage latency, and multicores as well as virtual machines ( vm ). technology and oss many of the basic ideas in oss were developed 30 – 50 years ago, when technology was very different. the question is...
openstax_introduction_to_computer_science_-_web
[ 0.04130915179848671, 0.006246992852538824, 0.0603753924369812, 0.04475722461938858, -0.016802236437797546, -0.017270980402827263, -0.0011846289271488786, -0.0279801394790411, 0.037984155118465424, 0.06488652527332306, -0.023531857877969742, -0.018882781267166138, 0.03673477843403816, 0.002...
faults, and 320 + sec to address sequential page faults. therefore, we cannot afford to page something out unless the system is going to be idle for a long time. but the real question is : does paging make sense anymore as a mechanism for the incremental loading of processes? the answer is yes, but by reading the entir...
openstax_introduction_to_computer_science_-_web
[ 0.027536699548363686, 0.006622644606977701, 0.04640430212020874, 0.04290417209267616, -0.027708468958735466, -0.017701059579849243, 0.022965140640735626, -0.03114924766123295, 0.027999192476272583, 0.07130638509988785, -0.017062269151210785, -0.011899582110345364, 0.03467540442943573, -0.0...
underlying technologies we are relying on to power oss will become obsolete soon. and there are also questions about what will replace oss. check out the debate on what will replace os ( https : / / openstax. org / r / 76replaceos ) and see whether you share any of the concerns. virtual machines as you learned earlier ...
openstax_introduction_to_computer_science_-_web
[ 0.00731864245608449, 0.03271634504199028, -0.022608326748013496, 0.014472118578851223, -0.0033195135183632374, -0.03645520284771919, -0.04141072928905487, -0.038353629410266876, 0.02297402173280716, 0.025561867281794548, -0.022485751658678055, 0.008722027763724327, 0.017426623031497, -0.02...
enabling it to run independently of physical resources. figure 6. 38 one notable difference between the virtual machine and containers is that vms allow for the use of multiple operating systems, whereas containers share a single os. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) when t...
openstax_introduction_to_computer_science_-_web
[ 0.020669303834438324, 0.02455165609717369, -0.005891685839742422, -0.004524721764028072, -0.008714129216969013, -0.026519838720560074, -0.03032214567065239, -0.029920795932412148, 0.03007085993885994, 0.028846977278590202, -0.008341958746314049, 0.0022384740877896547, 0.01629319041967392, ...
6. 6 • reliability and security 289 chapter review key terms access control list ( acl ) list of rules that specifies which users are granted the access to a specific object or resource access enforcement part of the os that is responsible for enforcing access controls and protecting authentication and authorization in...
openstax_introduction_to_computer_science_-_web
[ -0.002854241756722331, -0.019731439650058746, 0.023484427481889725, 0.02719098888337612, 0.029914245009422302, 0.004538072273135185, -0.018231362104415894, -0.017608966678380966, 0.024935567751526833, 0.06724820286035538, -0.00919224601238966, 0.0058487458154559135, 0.008836823515594006, -...
to change from one task to another while ensuring that the tasks do not conflict cpu state consists of the program counter ( pc ), the stack pointer ( sp ), and general - purpose registers critical section piece of code that only one thread can execute at once ; also, only one thread at a time will get into this sectio...
openstax_introduction_to_computer_science_-_web
[ -0.03478013724088669, -0.016981322318315506, 0.019244836643338203, 0.0482688769698143, 0.0075316173024475574, -0.022243168205022812, 0.00534234382212162, -0.03937571495771408, 0.01554784644395113, 0.06488800048828125, -0.00033768019056878984, 0.004044502042233944, 0.017645077779889107, -0....
storage ; it ’ s the smallest storage unit from the user ’ s perspective file system responsible for defining file names, storing files to a storage device, and retrieving files from storage devices file versioning system that allows a file to exist in several versions at the same time, which gives the user complete co...
openstax_introduction_to_computer_science_-_web
[ -0.007626489736139774, -0.012368306517601013, 0.050570081919431686, 0.03105732426047325, -0.032158032059669495, 0.007231381721794605, 0.005750387441366911, -0.03206857666373253, -0.0010433262214064598, 0.03908958286046982, 0.0148696294054389, -0.0022099537309259176, 0.04882636293768883, -0...
- number unique number given to an inode whenever an os that uses inodes creates a new file, which, in effect, functions as the file ’ s name inconsistency situation that causes the system to produce errors or hardware failure incremental backup backup image containing the pages that have been updated from the time of ...
openstax_introduction_to_computer_science_-_web
[ 0.006958310957998037, -0.0026751842815428972, 0.0077165779657661915, 0.021996168419718742, 0.013261031359434128, 0.014373594895005226, -0.004815115127712488, -0.04696091264486313, 0.01604486256837845, 0.07828142493963242, 0.00415340531617403, 0.003497838042676449, 0.03901497274637222, -0.0...
to a processor operating system ( os ) core piece of software that typically manages the interconnection of hardware and software on a given computer page fault when the cpu demands a page, and this page is not present in the main memory page fetching process of bringing pages into memory page manager layer in the laye...
openstax_introduction_to_computer_science_-_web
[ -0.000053614279750036076, -0.023746876046061516, 0.05836062878370285, 0.04711661487817764, 0.0011774266604334116, -0.020659342408180237, -0.00472674798220396, -0.028368985280394554, -0.007692547049373388, 0.06967436522245407, -0.03145236149430275, 0.007725315168499947, 0.025072963908314705, ...
and network bandwidth 292 6 • chapter review access for free at openstax. org quota amount of space to store files based on the available memory space ready state when a process is waiting for the cpu recovery process of resolving or receiving treatment to solve os faults or errors reliability system ’ s ability to red...
openstax_introduction_to_computer_science_-_web
[ 0.002679835306480527, 0.008854985237121582, 0.04030168429017067, 0.05604008212685585, 0.001855540438555181, 0.009933436289429665, -0.01751176454126835, -0.007416302803903818, 0.013199038803577423, 0.08981926739215851, 0.006781063973903656, -0.017419617623090744, 0.025319302454590797, -0.03...
the computer hardware and the system thrashing when a computer ’ s operating system becomes overwhelmed by the number of processes requesting memory thread smallest unit of execution within a process, allowing parallel tasks to run in the same memory space ; it enables efficient and independent execution of sequences o...
openstax_introduction_to_computer_science_-_web
[ -0.008854920975863934, 0.0067986780777573586, -0.005187472328543663, 0.022695377469062805, 0.0032296839635819197, 0.008462459780275822, 0.013290395960211754, -0.04867656156420708, -0.011121953837573528, 0.07068232446908951, -0.0307741928845644, 0.006357036530971527, -0.0014753168215975165, ...
6. 1 what is an operating system? • an operating system ( os ) is at the core of all of the connected hardware and software. 6 • chapter review 293 • improving efficiency results in speeding up the implementation of applications from coding time and runtime standpoints. oss have a large influence because of the abstrac...
openstax_introduction_to_computer_science_-_web
[ 0.0021291770972311497, 0.0132835041731596, 0.002528708428144455, -0.0018299570074304938, 0.022128406912088394, -0.013904687017202377, -0.020998118445277214, -0.02328333631157875, -0.022214751690626144, 0.04959736764431, -0.024178721010684967, 0.017008477821946144, -0.008425533771514893, -0...
6. 2 fundamental os concepts • an os manages computer resources ( hardware ) and provides services for computer programs ( software ). • an os is a complex system and executes many kinds of activities ranging from executing users ’ programs, to running background jobs or scripts, to completing system programs. • proces...
openstax_introduction_to_computer_science_-_web
[ 0.005672152619808912, -0.010934051126241684, 0.028267480432987213, -0.014911403879523277, 0.026228846982121468, -0.025915883481502533, -0.003116091014817357, -0.02832765132188797, -0.020800262689590454, 0.08931809663772583, -0.033722665160894394, 0.009640580043196678, 0.0018527889624238014, ...
above. • hardware abstraction layer ( hal ) is an example of layering in modern oss. it allows an os to interact with a hardware device at a general or abstract level rather than going deep into a detailed hardware level, which improves readability. • in a microkernel os architecture, the functionality and capabilities...
openstax_introduction_to_computer_science_-_web
[ 0.01585775427520275, 0.01641649752855301, 0.023782050237059593, 0.00029894098406657577, 0.01425133552402258, -0.022921856492757797, 0.0052690887823700905, -0.05826013535261154, -0.008237587288022041, 0.07668249309062958, 0.0051633878611028194, 0.016891269013285637, -0.0017682999605312943, ...
6. 3 processes and concurrency • concurrent processing is a computing model that improves performance when multiple processors are executing instructions simultaneously. 294 6 • chapter review access for free at openstax. org • a process consists of at least an address space, a cpu state, and a set of os resources. • t...
openstax_introduction_to_computer_science_-_web
[ 0.004798405338078737, 0.0072987438179552555, -0.0004134567570872605, -0.0016369285294786096, -0.009641572833061218, -0.023563843220472336, -0.02887757495045662, -0.036098629236221313, 0.0006529171369038522, 0.08629921823740005, 0.0037649725563824177, 0.004784731660038233, 0.02826559543609619...
6. 4 memory management • the os loads executable files into memory, allows several different processes to share memory, and provides facilities for processes to exceed the memory size after they have started running. • memory multiplexing is dividing the capacity of the communication channel into multiple logical chann...
openstax_introduction_to_computer_science_-_web
[ 0.04451080784201622, 0.03100442700088024, 0.012949535623192787, 0.051450375467538834, -0.021700922399759293, -0.010511975735425949, -0.01170820277184248, -0.01961958035826683, 0.009832899086177349, 0.07379119098186493, -0.011350818909704685, 0.011080452241003513, 0.008502553217113018, -0.0...
6. 5 file systems • a file system is responsible for defining file names, storing files on a storage device, and retrieving files from a storage device. • file systems define operations on objects such as create, read, and write, and they may also provide higher - level services, such as accounting and quotas, incremen...
openstax_introduction_to_computer_science_-_web
[ -0.01601085439324379, 0.001691217184998095, 0.03769487142562866, -0.0026467167772352695, 0.0008195420377887785, 0.039172522723674774, 0.007129827979952097, -0.008548971265554428, 0.03774058446288109, 0.0948246419429779, -0.003233102848753333, 0.0415731817483902, 0.020675864070653915, -0.01...
6. 6 reliability and security • we consider an os to be reliable if it delivers service without errors or interruptions. • protection is a general mechanism used throughout the os and for all resources needed to be protected such as memory, processes, files, devices, cpu time, and network bandwidth. • there are three a...
openstax_introduction_to_computer_science_-_web
[ 0.016748182475566864, -0.0003279557276982814, 0.05593349039554596, 0.0074026877991855145, 0.020567383617162704, -0.0019939783960580826, 0.0014770652633160353, -0.009044051170349121, 0.03302173316478729, 0.059668462723493576, -0.02636159397661686, -0.0017626627814024687, 0.01416292879730463, ...
b. modifying system clock settings c. printing a document d. creating a new user directory 2. you are building your own computer and have finished installing all hardware components. what should you install first? a. microsoft office b. microsoft windows os c. external i / o device drivers d. antivirus software 3. what...
openstax_introduction_to_computer_science_-_web
[ 0.016355454921722412, 0.01696300506591797, -0.0017319390317425132, -0.0046912976540625095, 0.02807524986565113, -0.010774148628115654, -0.009723070077598095, -0.062035027891397476, -0.0021990924142301083, 0.06729167699813843, -0.026314327493309975, 0.02703705057501793, 0.012621540576219559, ...
remaining execution time? a. first come, first served ( fcfs ) b. round - robin ( rr ) c. shortest remaining processing time ( srpt ) d. priority scheduling 15. what is synchronization? a. the way of coordinating multiple concurrent activities that are using a shared state b. computing model that improves the performan...
openstax_introduction_to_computer_science_-_web
[ 0.019663086161017418, 0.010925960727036, -0.0015137484297156334, 0.05531484633684158, -0.00158760417252779, 0.0036353813484311104, -0.0004610614269040525, -0.028175679966807365, -0.0030394711066037416, 0.07157118618488312, -0.00018601764168124646, 0.017400367185473442, 0.021373201161623, -...
system b. file versioning c. file d. file path 26. what is a directory? a. persistent memory that survives power failures most of the time, such as spinning disks, ssds, and usb drives b. a collection of related information that is stored on secondary / virtual storage and is the smallest storage unit from the user ’ s...
openstax_introduction_to_computer_science_-_web
[ 0.014279570430517197, -0.016927869990468025, 0.02338487282395363, -0.012513932771980762, -0.019086353480815887, -0.002224104246124625, 0.00004963568062521517, -0.031050996854901314, -0.01663731224834919, 0.07346367090940475, -0.011058521457016468, 0.022050820291042328, 0.021608849987387657, ...
the system. 9. explain the difference between authentication, authorization, and access control. are there any other types of security protections you would want an os to provide when using software applications? practice exercises 1. search on the web for “ windows system structure ” and compare it with “ unix / linux...
openstax_introduction_to_computer_science_-_web
[ 0.014692866243422031, 0.009159487672150135, 0.030242066830396652, -0.015807626768946648, -0.040801480412483215, -0.026424497365951538, -0.017800603061914444, -0.002786751836538315, 0.005318637005984783, 0.08169679343700409, 0.0001122350076911971, 0.023109538480639458, 0.0630815178155899, -...
will only be utilized to store videos on youtube. describe the kind of access patterns you anticipate occurring most frequently in that specific file system. 9. suppose you are asked by a company to select a new authentication method. if the company is not using multi - factor authentication, how could you argue the ne...
openstax_introduction_to_computer_science_-_web
[ 0.03430623561143875, 0.011873164214193821, 0.0273112989962101, 0.006019831169396639, -0.01804589107632637, -0.026663342490792274, -0.012213663198053837, 0.013032643124461174, -0.002204092452302575, 0.09161590039730072, -0.02546539343893528, 0.00117596797645092, 0.05964847281575203, -0.0174...
would be able to scale the resulting business ( i. e., keep sustaining the cost of doing business while increasing its number of customers ). 300 6 • chapter review access for free at openstax. org 2. consider our start - up company that is 100 % committed to leveraging innovative technologies as a business growth faci...
openstax_introduction_to_computer_science_-_web
[ 0.02232908457517624, 0.01462752465158701, 0.016817821189761162, -0.004059604834765196, -0.002903806744143367, -0.01868659257888794, -0.046958498656749725, 0.0018906975165009499, 0.01102770958095789, 0.07088719308376312, -0.014494872651994228, 0.009415232576429844, 0.048562437295913696, 0.0...
startup company that is 100 % committed to leveraging innovative technologies as a business growth facilitator. describe how it could leverage os technology obsolescence. give some precise examples and explain how the startup would be able to scale this approach. labs 1. install oracle virtual box on your laptop and de...
openstax_introduction_to_computer_science_-_web
[ 0.015973033383488655, 0.035340555012226105, 0.019844677299261093, -0.020417913794517517, -0.006432542577385902, -0.014035993255674839, -0.015466909855604172, -0.005827304441481829, 0.02756217122077942, 0.06488264352083206, -0.003576230024918914, 0.0121235316619277, 0.0671008825302124, 0.00...
you would 6 • chapter review 301 need to do in case of a system crash. create a recovery disk as needed so that you are prepared for the worst. 302 6 • chapter review access for free at openstax. org figure 7. 1 high - level languages make it easier for programmers to solve problems and design software at a level above...
openstax_introduction_to_computer_science_-_web
[ -0.0021786403376609087, -0.015506434254348278, -0.0006859813001938164, -0.025513747707009315, 0.011073281988501549, -0.03394072875380516, 0.016925815492868423, -0.0015753216575831175, -0.0032693748362362385, 0.07525183260440826, 0.015585682354867458, 0.015350144356489182, 0.00536859827116131...
7. 4 programming language implementation introduction programming is the science behind writing programs, which makes it possible to implement algorithms that leverage mathematical and / or scientific knowledge. programming is also an art that requires creativity and employs imagination. high - level languages ( hlls )...
openstax_introduction_to_computer_science_-_web
[ 0.008188917301595211, -0.006607071962207556, -0.03206561878323555, -0.017906012013554573, -0.0004362505569588393, -0.02192792296409607, -0.008265710435807705, -0.029650669544935226, -0.0387248694896698, 0.037116874009370804, -0.027419015765190125, 0.03146932274103165, 0.03283344954252243, ...
7. 1 programming language foundations learning objectives by the end of this section, you will be able to : • describe what hlls are • summarize choosing appropriate hlls • outline the history of hlls • describe the implementation of hlls a high - level programming language is designed to be easy for humans to read, wr...
openstax_introduction_to_computer_science_-_web
[ 0.023112444207072258, 0.019225746393203735, 0.004977809730917215, -0.0072179511189460754, -0.01762869581580162, 0.027327178046107292, -0.033449362963438034, -0.01980474404990673, -0.006499802693724632, 0.040172528475522995, 0.0036499835550785065, 0.02509702742099762, -0.0033305841498076916, ...
on the most secure programming languages ( https : / / openstax. org / r / 76proglanguages ) for further information about the security — or lack thereof — of these languages. learning motivations studying the fundamental concepts provided by various hlls is necessary to choose them correctly, employ them effectively, ...
openstax_introduction_to_computer_science_-_web
[ 0.032314661890268326, -0.01379223633557558, -0.00021387058950494975, -0.020193593576550484, 0.009568541310727596, -0.04063207656145096, 0.018443696200847626, -0.00447877449914813, -0.0052124131470918655, 0.05936708301305771, 0.011932061053812504, 0.029841318726539612, 0.024606570601463318, ...
7. 1 • programming language foundations 305 practically consists of moving the pixels that form characters one by one to a hardware device. implementing a high level of tasks would be impossible without abstraction. for example, you would not want to program an invoicing application in 1s and 0s ( machine language ) ; ...
openstax_introduction_to_computer_science_-_web
[ 0.011808390729129314, -0.010679701343178749, 0.021572349593043327, -0.03556579351425171, 0.012025796808302402, 0.00000572243561691721, 0.014951813034713268, -0.03728443756699562, -0.019432498142123222, 0.08422167599201202, 0.011586437933146954, 0.00015210419951472431, 0.01294194906949997, ...
: a relatively small set of primitive constructs can be combined in a relatively small number of ways • • • data types : adequate predefined constructs to hold data • • • syntax design : form and meaning via self - descriptive constructs and meaningful keywords • • • supports abstraction : hides all but the relevant da...
openstax_introduction_to_computer_science_-_web
[ 0.021898381412029266, -0.015972135588526726, 0.03127115219831467, -0.005727016367018223, -0.046138402074575424, -0.004846777766942978, 0.03218550980091095, -0.006131408736109734, -0.018649360164999962, 0.04710192233324051, 0.03630341589450836, 0.007583136670291424, 0.008813454769551754, -0...
##lls support certain features. for example, a variable gives a name to a memory location that is used in any hll to hold a value. however, different languages use variables differently. java is a strongly typed language, meaning that a variable may only contain a value of one of the language ’ s defined data types for...
openstax_introduction_to_computer_science_-_web
[ 0.009937578812241554, -0.02601507306098938, 0.0520339198410511, -0.005811081267893314, -0.03780563920736313, -0.007463496644049883, 0.038478318601846695, 0.012684039771556854, -0.0011131641222164035, 0.049825895577669144, 0.031152019277215004, 0.02677598036825657, 0.002651237417012453, -0....
7. 1 • programming language foundations 307 figure 7. 3 a c pointer variable “ a ” holds the memory address of the “ b ” variable. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) languages are purpose driven let ’ s again contrast c / c + + and javascript. much of the syntax and grammar ...
openstax_introduction_to_computer_science_-_web
[ 0.005500064231455326, 0.002838814165443182, 0.021253453567624092, 0.0026988128665834665, -0.026516446843743324, 0.021947063505649567, -0.011338368989527225, -0.012819270603358746, -0.05245516821742058, 0.03864389285445213, -0.0031401331070810556, 0.03327300399541855, -0.023350542411208153, ...
for example, google provides a javascript maps api for customizing map content to display on web pages. imagine you are planning a road trip. you can then use the maps api to create a customer map with your planned route, stops, and estimated travel times. now imagine you own a coffee shop. the maps api can then help y...
openstax_introduction_to_computer_science_-_web
[ 0.016401851549744606, 0.02382771484553814, -0.01759498566389084, -0.01212011743336916, -0.02568063512444496, -0.007477918174117804, -0.010885369963943958, 0.01067382376641035, 0.03981717675924301, 0.05142432078719139, 0.02466650865972042, 0.006403232458978891, 0.010341127403080463, -0.0470...
another.! compute the average average = sum / list _ len! count the values that are greater than the average do counter = 1, list _ len if ( int _ list ( counter ) > average ) then result = result + 1 end if end do cobol common business - oriented language ( cobol ) was developed to be a high - level language for busin...
openstax_introduction_to_computer_science_-_web
[ 0.011782562360167503, -0.0051957787945866585, 0.006278377026319504, -0.010035799816250801, -0.008664358407258987, -0.03046167828142643, 0.013601375743746758, -0.015066010877490044, 0.022516220808029175, 0.05585952475667, 0.012890387326478958, 0.019233476370573044, -0.007549230009317398, -0...
7. 1 • programming language foundations 309 110 - read - inventory - record. read bal - fwd - file record at end move " y " to card - eof - switch..... we can see that cobol has a very different type of syntax than fortran. it is purposed differently as it is very aligned to business applications and the programming of...
openstax_introduction_to_computer_science_-_web
[ 0.016965942457318306, -0.024848930537700653, 0.037345487624406815, -0.03518069162964821, -0.005152769386768341, -0.002106649801135063, 0.0073944395408034325, -0.0216599740087986, -0.013967463746666908, 0.05606703460216522, 0.03318551927804947, 0.02215653657913208, -0.024051016196608543, -0...
10 ; b = 5 ; c = a + b ). the following pascal code snippet illustrates the same computation and comparison of the average computed previously in basic : { compute the average } average : = sum / listlen ; { count the values that are greater than the average } for counter : = 1 to listlen do if ( intlist [ counter ] > ...
openstax_introduction_to_computer_science_-_web
[ 0.012965446338057518, -0.014086044393479824, 0.029079614207148552, -0.01669391430914402, -0.035258699208498, -0.00699619622901082, 0.0007703642477281392, -0.03385401517152786, -0.016383126378059387, 0.055581122636795044, 0.015387305058538914, 0.001247675041668117, -0.01043416652828455, -0....
human users interact with a computer, website, or application. windows - based uis were adopted as new paradigms, which drove the creation of standards, perspectives, and sets of ideas that should be used to describe the structure and methodologies of an hll. this resulted in the adoption of the oop paradigm and the cr...
openstax_introduction_to_computer_science_-_web
[ -0.006133261136710644, -0.01366189494729042, 0.021760249510407448, -0.014685028232634068, -0.02859543450176716, -0.0008401303784921765, -0.01573925092816353, -0.00588035536929965, -0.014267334714531898, 0.034003667533397675, -0.042109452188014984, -0.007450034376233816, -0.028757862746715546...
7. 1 • programming language foundations 311 figure 7. 4 this gui shows the “ hello world! ” application using c + + and the win32 api. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) objective - c is another hybrid language from the 1980s that makes use of imperative procedural, and obje...
openstax_introduction_to_computer_science_-_web
[ 0.0021067983470857143, -0.01846051961183548, 0.01538220327347517, -0.02336787059903145, -0.018645474687218666, 0.0034819955471903086, 0.001029946724884212, -0.023382723331451416, 0.0016755725955590606, 0.04519082233309746, 0.006928424816578627, 0.03796961531043053, -0.04359271004796028, -0...
are advantages and disadvantages to interpreting and compiling methods, which we will cover in implementation approaches. the most popular scripting languages employ c - like syntax, but they are purposed for different applications. for example, the javascript and php scripting languages are purposed for programming we...
openstax_introduction_to_computer_science_-_web
[ 0.004250684287399054, -0.014099620282649994, -0.010518999770283699, -0.02035423554480076, -0.06729623675346375, 0.0011341904755681753, -0.015601938590407372, -0.025702476501464844, -0.02520207315683365, 0.04571474716067314, -0.018541527912020683, 0.024098727852106094, 0.000798097113147378, ...
industries today. it does this with built - in analytics tools in its api which can process raw data and produce information and graphics that can be used to make business decisions. for example, a company interested in generating a graphical representation of its products ’ sales across various regions during the past...
openstax_introduction_to_computer_science_-_web
[ 0.024236105382442474, 0.026747753843665123, -0.0327381007373333, -0.02357364073395729, -0.020532116293907166, -0.004678737837821245, 0.01639164611697197, -0.011555284261703491, 0.04308687523007393, 0.051701489835977554, 0.0018911301158368587, 0.02695232257246971, 0.01441480964422226, -0.02...
7. 1 • programming language foundations 313 logic - based languages logic - based programming languages are those which incorporate a syntax to represent facts and rules about approaches to problems. they have been used to support rule - based approaches as part of the development of artificial intelligence ( ai ), the...
openstax_introduction_to_computer_science_-_web
[ 0.03849327936768532, 0.0037876195274293423, 0.013439958915114403, -0.018330423161387444, -0.022073442116379738, 0.011086953803896904, -0.0383119136095047, -0.03730184957385063, -0.04768001660704613, 0.0452968068420887, 0.0013179857051, 0.011597644537687302, -0.021273404359817505, -0.026047...
declarative languages are used to interact with systems that are programmed to figure out these details. an example of a declarative language is structured query language ( sql ), which is used to specify a query that a database system can process to store or retrieve data. imperative languages typically focus on evalu...
openstax_introduction_to_computer_science_-_web
[ -0.018862316384911537, 0.003378360066562891, -0.011974191293120384, 0.019659988582134247, -0.02570607140660286, -0.007553745061159134, -0.0502646267414093, -0.01946498267352581, -0.04194403067231178, 0.07009530812501907, 0.006632145959883928, 0.023245377466082573, -0.04300688952207565, 0.0...
, effective parallel programming must have the tools by which to synchronize processes. the ada programming language introduced built - in support for concurrent programming using tasks and protected objects. ada tasks are defined with the task keyword and have their own declarations and executable parts. while tasks h...
openstax_introduction_to_computer_science_-_web
[ -0.03561647608876228, -0.01632857695221901, -0.024476727470755577, -0.006419046316295862, -0.006157710682600737, -0.016996702179312706, -0.02356155775487423, -0.00975702702999115, -0.023824583739042282, 0.04522877186536789, 0.009269922971725464, 0.023568620905280113, 0.01161691639572382, -...
purely interpreted languages are javascript, php, and python. hybrid implementation some language implementation systems are a mix of compilers and interpreters which is known as hybrid implementation, a method of language translation which involves the use of both a compiler and an
openstax_introduction_to_computer_science_-_web
[ -0.04074066877365112, -0.026096461340785027, -0.05640667676925659, -0.02489611692726612, -0.01234204787760973, -0.04674037545919418, 0.009497580118477345, -0.0038715051487088203, -0.019041748717427254, 0.051275402307510376, 0.024732407182455063, 0.05541254207491875, -0.002331615425646305, ...
7. 1 • programming language foundations 315 interpreter. the compiler first translates the hll programs to an intermediate language, a language that is generated from programming source code, but that the cpu cannot typically execute directly. some hybrid implementations allow easy interpretation during execution using...
openstax_introduction_to_computer_science_-_web
[ -0.03017186000943184, -0.020748792216181755, -0.02592875063419342, -0.04677668958902359, 0.01527849305421114, -0.018978524953126907, -0.0016492829890921712, -0.025606093928217888, -0.017140431329607964, 0.03359542042016983, 0.0027094953693449497, 0.05257919430732727, -0.0066037606447935104, ...
environments programming environments include a collection of tools used in software development. depending on which operating system and hll you are using, there are many options for a software development environment. this bundle of tools targeted for a specific hll that helps with source code editing, compilation an...
openstax_introduction_to_computer_science_-_web
[ 0.006646131630986929, 0.019011512398719788, -0.03894135728478432, -0.018100354820489883, -0.017227524891495705, -0.0337212011218071, 0.007392011117190123, 0.010204277001321316, -0.021456599235534668, 0.03274983540177345, 0.005714084953069687, 0.03407889977097511, 0.03581111505627632, -0.02...
7. 2 programming language constructs learning objectives by the end of this section, you will be able to : • discuss and compare hll data types • demonstrate the use of variables • examine hll expressions and statements • describe the implementation of flow of control in hlls • introduce the concept of functions • clas...
openstax_introduction_to_computer_science_-_web
[ 0.00621434673666954, -0.008037892170250416, 0.0349925234913826, -0.021199053153395653, -0.020972155034542084, -0.022567758336663246, -0.009654207155108452, -0.0017891029128804803, -0.032497309148311615, 0.07241816818714142, 0.02954663150012493, 0.02567070908844471, 0.023353075608611107, -0...
. an example of this is the string data type which represents a sequence of characters. in the c programming language, character strings are complex data types represented using arrays of characters. in javascript, string is a primitive data type. figure 7. 9 relays the various data types. figure 7. 9 javascript data t...
openstax_introduction_to_computer_science_-_web
[ -0.020966948941349983, -0.0388871394097805, 0.04655607417225838, -0.03783341124653816, -0.015268932096660137, -0.033388279378414154, 0.018829287961125374, -0.012657208368182182, 0.020284585654735565, 0.07972359657287598, 0.06276605278253555, 0.024944571778178215, -0.002562909387052059, -0....
7. 2 • programming language constructs 317 in general, data types are collections of values from a given domain : the javascript number data type covers the domain of floating - point number values that can be represented in 64 bits. it also consists of a legal set of well - defined operations that may be performed on ...
openstax_introduction_to_computer_science_-_web
[ -0.021074645221233368, -0.026600463315844536, 0.0401022844016552, -0.01922902651131153, -0.030803842470049858, -0.008134095929563046, 0.05772065371274948, -0.02586446888744831, 0.002674618735909462, 0.0742107555270195, 0.046348072588443756, 0.018557660281658173, 0.013084816746413708, -0.01...
0 to 18, 446, 744, 073, 709, 551, 615 table 7. 2 contrast between integer data types in java and c + we learned that strong typing refers to the characteristic of an hll in which a variable is restricted to holding values of the type with which it is defined. the concept of coercion refers to the ability of a variable ...
openstax_introduction_to_computer_science_-_web
[ -0.002771911211311817, -0.04309717193245888, 0.048279110342264175, 0.0055726999416947365, -0.05290573462843895, -0.009438876062631607, 0.020699303597211838, -0.009268789552152157, -0.02944701351225376, 0.06179363280534744, 0.05610859766602516, 0.01589837297797203, -0.003882529679685831, -0...
consisting of multiple primitive types used as its building blocks which is why we also call them composite types. these multiple types may be of the same type, as in a complex data type known as an array, or they may consist of collections of different data types in one construct, such as a c # class. arrays an array ...
openstax_introduction_to_computer_science_-_web
[ -0.034427497535943985, -0.03702815622091293, 0.036847103387117386, 0.0013637876836583018, -0.030479468405246735, -0.016896476969122887, 0.014667350798845291, -0.022963417693972588, 0.01597260870039463, 0.06233745440840721, 0.06095188856124878, -0.010034678503870964, -0.018288251012563705, ...
##number = numbers [ 5 ] ; figure 7. 10 each value in an array is assigned an index and a memory address. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) strings strings, which are another composite data type, are arrays of characters in most hlls. in object - oriented
openstax_introduction_to_computer_science_-_web
[ -0.022264521569013596, -0.024140777066349983, 0.025303270667791367, -0.022349409759044647, -0.033490560948848724, -0.04573794826865196, 0.019610386341810226, -0.022157086059451103, 0.01574152521789074, 0.06325460225343704, 0.057485222816467285, 0.01564655266702175, 0.0020970222540199757, -...
7. 2 • programming language constructs 319 languages, they are quite a bit more complex. they are implemented in some hlls as an array which holds individual characters as its elements. the oop languages usually implement strings as objects with built - in functions ( methods ). here is an example of a string in java :...
openstax_introduction_to_computer_science_-_web
[ 0.001340288552455604, -0.03403406962752342, 0.060323771089315414, -0.03982759639620781, -0.02621818333864212, -0.03867470100522041, 0.02442229725420475, -0.017624717205762863, -0.01013458427041769, 0.030861759558320045, 0.07102551311254501, 0.00015694729518145323, 0.027856474742293358, -0....
in computer science we have many instances of this type of construct, which we call a name - value pair, a construct - like variable that is named and can hold values. the types of values that they may hold consist of the legal data types of the language. identifiers a variable name is called an identifier. different h...
openstax_introduction_to_computer_science_-_web
[ 0.003088213037699461, -0.014120286330580711, 0.02662724070250988, 0.013958427123725414, -0.014851098880171776, -0.032761361449956894, 0.022475125268101692, -0.028196346014738083, -0.05550503358244896, 0.032079171389341354, 0.04824962466955185, 0.009614050388336182, 0.010338259860873222, -0...
any language, which is made possible via unicode. unicode can represent most international character sets, allowing programmers to use characters from almost any language alongside the english keywords. but what about the future? as technology evolves, will programming languages find ways to become even more natural la...
openstax_introduction_to_computer_science_-_web
[ -0.03576371818780899, -0.023493226617574692, 0.030506012961268425, -0.035321012139320374, -0.03507043048739433, -0.01955781690776348, 0.06269674003124237, -0.015129958279430866, -0.046437062323093414, 0.030058838427066803, 0.05580290034413338, 0.022632889449596405, 0.002188127487897873, -0...
is numeric, which may be represented by either the literal whole number 2 or by the floating - point number 2. 0. in c + +, a literal of the type char may be written as the single quoted sequence a. storing a value in a variable is carried out by creating an assignment statement : the value assigned may be a literal, o...
openstax_introduction_to_computer_science_-_web
[ -0.04104151576757431, -0.023248596116900444, 0.02856789343059063, -0.007432182319462299, -0.025583961978554726, -0.03859540820121765, 0.05825900658965111, -0.0022637364454567432, -0.041400711983442307, 0.05383915826678276, 0.050327278673648834, 0.028999704867601395, -0.005238352343440056, ...
7. 2 • programming language constructs 321 $ myage = 21 ; in programming languages, we refer to the left hand of a variable assignment statement ( the variable ) as the lvalue. the right - hand value ( the literal ) is referred to as the rvalue. the assignment operator is a binary operator, meaning it is surrounded by ...
openstax_introduction_to_computer_science_-_web
[ 0.0038602533750236034, -0.021134691312909126, 0.02310827560722828, -0.003008368657901883, -0.04159224033355713, -0.0320071242749691, 0.05179982632398605, -0.005998814012855291, -0.06225176155567169, 0.03997048735618591, 0.04514490067958832, 0.0121923154219985, 0.01337125152349472, -0.00202...
such value based on the data type of the variable. the addresses of the memory locations that the compiler assigns to variables are relocatable, meaning that the linker may change these addresses when creating the executable version of the program, and the program loader will also change them when running the program t...
openstax_introduction_to_computer_science_-_web
[ -0.01609693095088005, -0.017992975190281868, 0.017788751050829887, -0.005005836486816406, -0.02778182551264763, -0.02973335050046444, 0.02928011491894722, 0.009889171458780766, -0.05214585363864899, 0.034915123134851456, 0.057900551706552505, 0.002700658980756998, 0.02741139568388462, -0.0...
openstax. org different hlls may support operators differently. some examples of the types of operations by which values may be manipulated are arithmetic operators ( mathematical ), relational operators ( comparison ), logical operators, and string operators ( sequences of characters ). they perform these operations w...
openstax_introduction_to_computer_science_-_web
[ -0.017421904951334, -0.027209097519516945, -0.022976554930210114, -0.023695392534136772, -0.02819172479212284, -0.029320834204554558, 0.019751865416765213, -0.006524606142193079, -0.03288498893380165, 0.06449232995510101, 0.015984611585736275, 0.03815172240138054, 0.0052001518197357655, -0...