Skip to main content

Native Preemptive Threads in SWI-Prolog

  • Conference paper
Logic Programming (ICLP 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2916))

Included in the following conference series:

Abstract

Concurrency is an attractive property of a language to exploit multi-CPU hardware or perform multiple tasks concurrently. In recent years we see Prolog systems experimenting with multiple threads only sharing the database. Such systems are relatively easy to build and remain very close to standard Prolog while providing valuable extra functionality. This article describes the introduction of multiple threads in SWI-Prolog exploiting OS-native threading. We discuss the extra primitives available to the Prolog programmer as well as implementation issues. We explored speedup on multi-processor hardware and speed degradation when executing a single task.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Appleby, K., Carlsson, M., Haridi, S., Sahlin, D.: Garbage collection for Prolog based on WAM. Communications of the ACM 31(6), 719–741 (1988)

    Article  Google Scholar 

  2. Butenhof, D.R.: Programming with POSIX threads. Addison-Wesley, Reading (1997)

    Google Scholar 

  3. Carriero, N., Gelernter, D.: Linda in context. Communications of the ACM 32(4), 444–458 (1989)

    Article  Google Scholar 

  4. Carro, M., Hermenegildo, M.V.: Concurrency in Prolog using threads and a shared database. In: International Conference on Logic Programming, pp. 320–334 (1999)

    Google Scholar 

  5. de Bosschere, K., Jacquet, J.-M.: Multi-Prolog: Definition, operational semantics and implementation. In: Warren, D.S. (ed.) Proceedings of the Tenth International Conference on Logic Programming, Budapest, Hungary, pp. 299–313. The MIT Press, Cambridge (1993)

    Google Scholar 

  6. Deransart, P., Ed-Dbali, A., Cervoni, L.: Prolog: The Standard. Springer, New York (1996)

    MATH  Google Scholar 

  7. Eskilson, J., Carlsson, M.: SICStus MT—a multithreaded execution environment for SICStus Prolog. In: Palamidessi, C., Meinke, K., Glaser, H. (eds.) ALP 1998 and PLILP 1998. LNCS, vol. 1490, pp. 36–53. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  8. Graham, S.L., Kessler, P.B., McKusick, M.K.: gprof: a call graph execution profiler. In: SIGPLAN Symposium on Compiler Construction, pp. 120–126 (1982)

    Google Scholar 

  9. King, R.D., Srinivasan, A.: Prediction of rodent carcinogenicity bioassays from molecular structure using inductive logic programming. Environmental Health Perspectives 104(5), 1031–1040 (1996)

    Article  Google Scholar 

  10. Muggleton, S.: Inverse entailment and Progol. New Generation Computing, Special issue on Inductive Logic Programming 13(3-4), 245–286 (1995)

    Google Scholar 

  11. Srinivasan, A.: The Aleph Manual (2003)

    Google Scholar 

  12. Železný, F., Srinivasan, A., Page, D.: Lattice-search runtime distributions may be heavy-tailed. In: Matwin, S., Sammut, C. (eds.) ILP 2002. LNCS (LNAI), vol. 2583, pp. 333–345. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  13. Wielemaker, J.: SWI-Prolog 5.1: Reference Manual. SWI, University of Amsterdam, Roetersstraat 15, 1018 WB Amsterdam, The Netherlands (1997-2003), E-mail: jan@swi.psy.uva.nl

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Wielemaker, J. (2003). Native Preemptive Threads in SWI-Prolog. In: Palamidessi, C. (eds) Logic Programming. ICLP 2003. Lecture Notes in Computer Science, vol 2916. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24599-5_23

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24599-5_23

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20642-2

  • Online ISBN: 978-3-540-24599-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics